@@ -2,28 +2,57 @@ name: Libenvpp CI
2
2
3
3
on : [push, pull_request]
4
4
5
- env :
6
- BUILD_TYPE : Debug
7
-
8
5
jobs :
9
6
build-and-test :
10
7
strategy :
11
8
matrix :
9
+ build-type : [Debug, Release]
10
+ compiler : [g++, clang++]
12
11
os : [ubuntu-latest, ubuntu-20.04, windows-latest, macos-latest]
13
12
14
13
runs-on : ${{ matrix.os }}
15
14
16
15
steps :
17
- - uses : actions/checkout@v3
16
+ - uses : actions/checkout@v4
17
+ with :
18
+ submodules : recursive
19
+
20
+ - name : Configure CMake
21
+ run : cmake -B ${{ github.workspace }}/build_${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
22
+
23
+ - name : Build
24
+ run : cmake --build ${{ github.workspace }}/build_${{ matrix.compiler }} --config ${{ matrix.build-type }}
25
+
26
+ - name : Run tests
27
+ working-directory : ${{ github.workspace }}/build_${{ matrix.compiler }}
28
+ run : ctest -C ${{ matrix.build-type }}
29
+
30
+ build-and-test-mingw :
31
+ strategy :
32
+ matrix :
33
+ build-type : [Debug, Release]
34
+ compiler : [g++, clang++]
35
+ os : [windows-latest]
36
+
37
+ runs-on : ${{ matrix.os }}
38
+
39
+ steps :
40
+ - uses : msys2/setup-msys2@v2
41
+ with :
42
+ install : mingw-w64-x86_64-cmake
43
+ - uses : actions/checkout@v4
18
44
with :
19
45
submodules : recursive
20
46
21
47
- name : Configure CMake
22
- run : cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
48
+ shell : msys2 {0}
49
+ run : cmake -B ${{ github.workspace }}/build_${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
23
50
24
51
- name : Build
25
- run : cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}
52
+ shell : msys2 {0}
53
+ run : cmake --build ${{ github.workspace }}/build_${{ matrix.compiler }} --config ${{ matrix.build-type }}
26
54
27
55
- name : Run tests
28
- working-directory : ${{ github.workspace }}/build
29
- run : ctest -C ${{ env.BUILD_TYPE }}
56
+ shell : msys2 {0}
57
+ working-directory : ${{ github.workspace }}/build_${{ matrix.compiler }}
58
+ run : ctest -C ${{ matrix.build-type }}
0 commit comments