-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (47 loc) · 1.39 KB
/
test.yml
File metadata and controls
57 lines (47 loc) · 1.39 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
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
name: Build and Test
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [native, llvm]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
compiler: native
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install LLVM and Clang 17
uses: KyleMayes/install-llvm-action@v1
with:
version: "17"
env: true
if: ${{ matrix.compiler == 'llvm' && matrix.os != 'macos-latest' }}
- name: Install LLVM and Clang 15
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0.7"
env: true
if: ${{ matrix.compiler == 'llvm' && matrix.os == 'macos-latest' }}
- name: Configure for native compiler
run: cmake -B build -DCPPSPEC_BUILD_TESTS=YES
if: ${{ matrix.compiler == 'native'}}
- name: Configure for non-native compiler
run: cmake -B build -G Ninja -DCPPSPEC_BUILD_TESTS=YES -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX"
if: ${{ matrix.compiler != 'native'}}
- name: Build
run: cmake --build build --config Release
- name: Test
run: ctest --test-dir build --build-config Release