| 1 |
name: Linux builds (meson) |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
build: |
| 7 |
name: meson ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} |
| 8 |
runs-on: ubuntu-22.04 |
| 9 |
strategy: |
| 10 |
matrix: |
| 11 |
cxx: |
| 12 |
- g++-11 |
| 13 |
- clang++-11 |
| 14 |
build_type: [debug, release] |
| 15 |
std: [14, 17] |
| 16 |
include: |
| 17 |
- cxx: clang++-11 |
| 18 |
other_pkgs: clang-11 |
| 19 |
|
| 20 |
steps: |
| 21 |
- uses: actions/checkout@v2 |
| 22 |
|
| 23 |
- name: Prepare environment |
| 24 |
run: sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}} |
| 25 |
|
| 26 |
- name: Configure build |
| 27 |
env: |
| 28 |
CXX: ${{matrix.cxx}} |
| 29 |
CXXFLAGS: -std=c++${{matrix.std}} ${{matrix.cxxflags}} |
| 30 |
|
| 31 |
|
| 32 |
run: | |
| 33 |
meson -Dbuildtype=${{matrix.build_type}} ${{runner.workspace}}/meson-build |
| 34 |
|
| 35 |
- name: Build tests + lib |
| 36 |
working-directory: ${{runner.workspace}}/meson-build |
| 37 |
run: ninja |
| 38 |
|
| 39 |
- name: Run tests |
| 40 |
working-directory: ${{runner.workspace}}/meson-build |
| 41 |
|
| 42 |
run: | |
| 43 |
meson test --verbose |