generated from pbentes/ProjectTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.54 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build
on:
push:
branches: [ main ]
paths:
- '**/*.cpp'
- '**/*.c'
- '**/*.hpp'
- '**/*.h'
- '**/CMakeLists.txt'
- '**/*.cmake'
pull_request:
branches: [ main ]
jobs:
linux-clang:
runs-on: ubuntu-22.04
name: Linux Clang
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=clang++ .
- name: Build
run: cmake --build ${{github.workspace}}/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -j 2
- name: Test
working-directory: ${{github.workspace}}/Linux_${{matrix.build_type}}_${{matrix.clang_version}}
run: ./tests/tests
msvc_cl:
runs-on: windows-latest
name: Visual Studio CL
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/VS2022_CL -G "Visual Studio 17 2022" -A x64 .
- name: Build
run: msbuild VS2022_CL\Project.sln /property:Configuration=${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}\VS2022_CL\tests\${{matrix.build_type}}
run: .\tests.exe