1- name : CMake Windows
1+ name : CMake
22
3- on :
4- - push
5- - pull_request
3+ on : [push, pull_request]
64
75env :
6+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
87 BUILD_TYPE : Release
98
109jobs :
1110 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.
14+ # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
1215 strategy :
1316 matrix :
1417 include :
@@ -25,31 +28,27 @@ jobs:
2528 runs-on : ${{ matrix.runner }}
2629
2730 steps :
28- - name : Checkout
29- uses : actions/checkout@v4
31+ - uses : actions/checkout@v2
3032
3133 - name : Run vcpkg for ${{ matrix.arch }}
3234 uses : lukka/run-vcpkg@v11
3335 with :
34- vcpkgArguments : >
35- getopt:${{ matrix.vcpkg_triplet }}
36- libiconv:${{ matrix.vcpkg_triplet }}
37- libpng:${{ matrix.vcpkg_triplet }}
38- zlib:${{ matrix.vcpkg_triplet }}
39- vcpkgGitCommitId : ' cd61e1e26a038e82d6550a3ebbe0fbbfe7da78e3'
40-
41- - name : Show vcpkg environment
42- shell : bash
43- run : |
44- echo "VCPKG_ROOT=$VCPKG_ROOT"
45- "$VCPKG_ROOT/vcpkg" list
36+ vcpkgGitCommitId : cd61e1e26a038e82d6550a3ebbe0fbbfe7da78e3
37+ vcpkgJsonGlob : ' **/vcpkg.json'
4638
4739 - name : Create Build Environment
40+ # Some projects don't allow in-source building, so create a separate build directory
41+ # We'll use this as our working directory for all subsequent commands
4842 run : cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.arch }}
4943
5044 - name : Configure CMake for ${{ matrix.arch }}
45+ # Use a bash shell so we can use the same syntax for environment variable
46+ # access regardless of the host operating system
5147 shell : bash
5248 working-directory : ${{ runner.workspace }}/build-${{ matrix.arch }}
49+ # Note the current convention is to use the -S and -B options here to specify source
50+ # and build directories, but this is only available with CMake 3.13 and higher.
51+ # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
5352 run : |
5453 cmake "$GITHUB_WORKSPACE" \
5554 -A ${{ matrix.cmake_platform }} \
@@ -62,11 +61,12 @@ jobs:
6261 - name : Build for ${{ matrix.arch }}
6362 shell : bash
6463 working-directory : ${{ runner.workspace }}/build-${{ matrix.arch }}
65- run : |
66- cmake --build . --config $BUILD_TYPE
64+ # Execute the build. You can specify a specific target with "--target <NAME>"
65+ run : cmake --build . --config $BUILD_TYPE
6766
6867 - name : Test for ${{ matrix.arch }}
6968 shell : bash
7069 working-directory : ${{ runner.workspace }}/build-${{ matrix.arch }}
71- run : |
72- ctest -C $BUILD_TYPE --output-on-failure
70+ # Execute tests defined by the CMake configuration.
71+ # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
72+ run : ctest -C $BUILD_TYPE --output-on-failure
0 commit comments