File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CMake on multiple platforms
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ${{ matrix.os }}
12
+
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ os : [ubuntu-latest]
17
+ build_type : [Release, Debug]
18
+ cpp_compiler : [g++, clang++]
19
+
20
+ steps :
21
+ - uses : actions/checkout@v3
22
+
23
+ - name : Set reusable strings
24
+ id : strings
25
+ shell : bash
26
+ run : |
27
+ echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
28
+
29
+ - name : Configure CMake
30
+ run : >
31
+ cmake -B ${{ steps.strings.outputs.build-output-dir }}
32
+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
33
+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
34
+ -S ${{ github.workspace }}
35
+
36
+ - name : Build
37
+ run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
38
+
39
+ - name : Test
40
+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
41
+ run : ./tests >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments