-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 2.03 KB
/
ctests.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
name: ctests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-others:
name: ${{ matrix.platform.name }} C++${{matrix.config.cxx_version}}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
# - { name: Windows VS2019, gp: where, ls: dir, os: windows-2019, flags: -DCMAKE_BUILD_TYPE=Debug }
- { name: Windows VS2022, gp: where, ls: dir, os: windows-2022, flags: -DCMAKE_BUILD_TYPE=Debug }
- { name: Windows Clang, gp: where, ls: dir, os: windows-latest, flags: -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER="C\Program Files\LLVM\bin\clang" -DCMAKE_CXX_COMPILER="C\Program Files\LLVM\bin\clang++" }
- { name: Windows GCC, gp: where, ls: dir, os: windows-latest, flags: -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ }
# - { name: Linux Clang, gp: which, ls: ls, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
# - { name: Linux GCC, gp: which, ls: ls, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ }
# - { name: MacOS XCode, gp: which, ls: ls, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug }
# - { name: MacOS Clang, gp: which, ls: ls, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
config:
- { cxx_version: 20 }
# - { cxx_version: 23 }
steps:
- uses: actions/checkout@v4
- name: Cmake Help
run: cmake --help
- name: Config
run: cmake -S tests -B tests ${{matrix.platform.flags}} -DCMAKE_CXX_STANDARD=${{matrix.config.cxx_version}}
- name: Build
run: cmake --build tests --config Debug
- name: View Test Executables
run: cd tests && ${{matrix.platform.ls}} && cd ..
- name: Tests
run: ctest --test-dir tests --build-config Debug --output-on-failure