|
14 | 14 | strategy: |
15 | 15 | fail-fast: false |
16 | 16 | matrix: |
17 | | - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 17 | + |
18 | 18 | config: |
19 | 19 | - name: Windows MSVC Release |
20 | 20 | os: windows |
@@ -57,29 +57,12 @@ jobs: |
57 | 57 | version: 13 |
58 | 58 | platform: x64 |
59 | 59 |
|
60 | | - |
61 | | - - name: Install vcpkg |
62 | | - shell: bash |
63 | | - run: | |
64 | | - cd "${{github.workspace}}" |
65 | | - git clone https://github.com/Microsoft/vcpkg.git |
66 | | - "${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh" |
67 | | -
|
68 | | - - name: Configure CMake (Windows only) |
69 | | - if: matrix.config.os == 'windows' |
70 | | - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
71 | | - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
72 | | - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} -DCMAKE_TOOLCHAIN_FILE="${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake" ${{github.workspace}} -DVCPKG_TARGET_TRIPLET=x64-windows-static -G Ninja |
73 | | - |
74 | | - - name: Configure CMake (Linux only) |
75 | | - if: matrix.config.os == 'ubuntu' |
76 | | - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
77 | | - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
78 | | - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} -DCMAKE_TOOLCHAIN_FILE="${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake" ${{github.workspace}} -G Ninja |
| 60 | + - name: Configure CMake |
| 61 | + run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} -DCMAKE_TOOLCHAIN_FILE="${{matrix.config.os == 'windows' && 'C:/vcpkg' || '/usr/local/share/vcpkg'}}/scripts/buildsystems/vcpkg.cmake" . -DVCPKG_TARGET_TRIPLET="${{ matrix.config.os == 'windows' && 'x64-windows-static' || 'x64-linux' }}" -G Ninja |
79 | 62 |
|
80 | 63 | - name: Build |
81 | 64 | # Build your program with the given configuration |
82 | | - run: cmake --build ${{github.workspace}}/build -j --config ${{ matrix.config.buildtype }} |
| 65 | + run: cmake --build ./build -j --config ${{ matrix.config.buildtype }} |
83 | 66 |
|
84 | 67 | - name: Upload artifacts - Linux |
85 | 68 | uses: actions/upload-artifact@v4 |
|
0 commit comments