-
Notifications
You must be signed in to change notification settings - Fork 8
25 lines (23 loc) · 1.01 KB
/
linux.yml
File metadata and controls
25 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Linux
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
compiler: [g++-7, g++-8, g++-9, g++-10, g++-11, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12]
configuration: [Debug, Release]
runs-on: ubuntu-latest
name: build and test (${{ matrix.compiler }}, ${{ matrix.configuration }})
steps:
- uses: actions/checkout@v2
- name: Add toolchain PPA
if: matrix.compiler == 'g++-11'
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- name: Install compiler
run: sudo apt-get install -y ${{ matrix.compiler }}
- name: configure
run: CXX=${{ matrix.compiler }} cmake -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D BUILD_EXAMPLES=1 -D BUILD_TESTS=1 -S . -B ${{ matrix.configuration }}
- name: build
run: cmake --build ${{ matrix.configuration }} -j $(nproc --all)
- name: Run unit tests
run: cd ${{ matrix.configuration }} && ctest --output-on-failure --schedule-random -j $(nproc --all)