49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
linux:
|
|
name: ci
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: ubuntu:22.04
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- CC: gcc
|
|
CXX: g++
|
|
- CC: clang
|
|
CXX: clang++
|
|
|
|
# don't run pull requests from local branches twice
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
|
|
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
steps:
|
|
- name: Install packages
|
|
run: |
|
|
apt-get -q -y update
|
|
apt-get -q -y install build-essential cmake git clang
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Build source
|
|
run: |
|
|
mkdir -p build
|
|
cd build
|
|
CC=${{ matrix.CC }} CXX=${{ matrix.CXX }} cmake ..
|
|
cmake --build .
|
|
DESTDIR=../out cmake --install .
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: cppdap-${{ matrix.CC }}
|
|
path: out/usr/local/
|