-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (30 loc) · 1.15 KB
/
build.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
name: build
on: [ push, pull_request ]
jobs:
build:
permissions: write-all
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Linux Clang, os: ubuntu-latest, admin: sudo, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: Windows VS2019, os: windows-2019 }
- { name: Windows VS2022, os: windows-2022 }
- { name: MacOS XCode, os: macos-latest }
- { name: Linux GCC, os: ubuntu-latest, admin: sudo }
config:
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Configure project
run: mkdir build && cmake -S . -B build
- name: Install Header Library
run: ${{ matrix.platform.admin }} cmake --install build --config Release
- name: Compile Test Executable
run: cmake --build build --config Release
- name: Run Test Executable
run: ./build/tests-cmake.out