-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (39 loc) · 1.31 KB
/
linux.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: linux
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build-type: [ Release, RelWithDebInfo ]
compiler: [
{ cxx: g++-11, pkgs: g++-11 },
{ cxx: g++-12, pkgs: g++-12 },
{ cxx: g++-13, pkgs: g++-13 },
{ cxx: clang++-14, pkgs: clang-14 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04 },
{ cxx: clang++-15, pkgs: clang-15 },
]
defaults:
run:
working-directory: ${{ github.workspace }}/build
name: ${{ matrix.compiler.cxx }}, ${{ matrix.build-type }}
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: setup-compiler
run: sudo apt update && sudo apt install --allow-downgrades -y ${{ matrix.compiler.pkgs }}
- name: setup-catch
env:
CXX: ${{ matrix.compiler.cxx }}
run: sudo bash ./install_catch.sh
- name: setup-build
env:
CXX: ${{ matrix.compiler.cxx }}
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DGAPP_USE_WERROR=ON -DGAPP_USE_LTO=ON
- name: build
run: cmake --build . --parallel 8
- name: run-tests
run: ctest --output-on-failure --schedule-random
- name: install
run: sudo cmake --install .