-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (56 loc) · 1.86 KB
/
main.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
51
52
53
54
55
56
57
58
59
60
61
62
name: Build & Test
on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]
jobs:
build-and-test:
name: ${{ matrix.os }} -x- ${{ matrix.compiler }} -x- ${{ matrix.config }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
os: [ubuntu-latest, windows-latest]
compiler: [g++-13, clang++-15, MSVC]
exclude:
- os: ubuntu-latest
compiler: MSVC
- os: windows-latest
compiler: g++-13
- os: windows-latest
compiler: clang++-15
steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
- name: Install C++ compilers, and CMake
if: matrix.os == 'ubuntu-latest'
run: |
# https://github.com/actions/runner-images/issues/7192
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt update && sudo apt-get -y upgrade --fix-missing
sudo apt-get install build-essential cmake
sudo apt-get install ${{ matrix.compiler }}
- name: Configure and build
uses: lukka/run-cmake@v3
if: matrix.os == 'ubuntu-latest'
with:
buildDirectory: build
cmakeBuildType: ${{ matrix.config }}
buildWithCMakeArgs: --parallel
cmakeAppendedArgs: -DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
- name: Configure and build
uses: lukka/run-cmake@v3
if: matrix.os == 'windows-latest'
with:
buildDirectory: build
buildWithCMakeArgs: --parallel --config ${{ matrix.config }}
cmakeGenerator: Ninja
- name: Run Tests
run: ctest build