1
+ ---
1
2
name : CMake
2
3
3
4
on : [push]
8
9
9
10
jobs :
10
11
build :
11
- # The CMake configure and build commands are platform agnostic and should work equally
12
- # well on Windows or Mac. You can convert this to a matrix build if you need
13
- # cross-platform coverage.
12
+ # The CMake configure and build commands are platform agnostic and should
13
+ # work equally well on Windows or Mac. You can convert this to a matrix
14
+ # build if you need cross-platform coverage.
14
15
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
15
16
runs-on : ${{ matrix.os }}
16
17
strategy :
@@ -21,32 +22,36 @@ jobs:
21
22
- os : macos-latest
22
23
23
24
steps :
24
- - uses : actions/checkout@v2
25
-
26
- - name : Create Build Environment
27
- # Some projects don't allow in-source building, so create a separate build directory
28
- # We'll use this as our working directory for all subsequent commands
29
- run : cmake -E make_directory ${{github.workspace}}/build
30
-
31
- - name : Configure CMake
32
- # Use a bash shell so we can use the same syntax for environment variable
33
- # access regardless of the host operating system
34
- shell : bash
35
- working-directory : ${{github.workspace}}/build
36
- # Note the current convention is to use the -S and -B options here to specify source
37
- # and build directories, but this is only available with CMake 3.13 and higher.
38
- # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
39
- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
40
-
41
- - name : Build
42
- working-directory : ${{github.workspace}}/build
43
- shell : bash
44
- # Execute the build. You can specify a specific target with "--target <NAME>"
45
- run : cmake --build . --config $BUILD_TYPE
46
-
47
- - name : Test
48
- working-directory : ${{github.workspace}}/build
49
- shell : bash
50
- # Execute tests defined by the CMake configuration.
51
- # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
52
- run : ctest -C $BUILD_TYPE
25
+ - uses : actions/checkout@v2
26
+
27
+ - name : Create Build Environment
28
+ # Some projects don't allow in-source building, so create a separate
29
+ # build directory. We'll use this as our working directory for all
30
+ # subsequent commands
31
+ run : cmake -E make_directory ${{github.workspace}}/build
32
+
33
+ - name : Configure CMake
34
+ # Use a bash shell so we can use the same syntax for environment
35
+ # variable access regardless of the host operating system
36
+ shell : bash
37
+ working-directory : ${{github.workspace}}/build
38
+ # Note the current convention is to use the -S and -B options here to
39
+ # specify source and build directories, but this is only available
40
+ # with CMake 3.13 and higher. The CMake binaries on the Github Actions
41
+ # machines are (as of this writing) 3.12
42
+ run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
43
+
44
+ - name : Build
45
+ working-directory : ${{github.workspace}}/build
46
+ shell : bash
47
+ # Execute the build. You can specify a specific target
48
+ # with "--target <NAME>"
49
+ run : cmake --build . --config $BUILD_TYPE
50
+
51
+ - name : Test
52
+ working-directory : ${{github.workspace}}/build
53
+ shell : bash
54
+ # Execute tests defined by the CMake configuration.
55
+ # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more
56
+ # detail
57
+ run : ctest -C $BUILD_TYPE
0 commit comments