Skip to content

Commit 2b9bdde

Browse files
committed
cleanup the cmake CI action
1 parent 09768d7 commit 2b9bdde

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
17+
1818
config:
1919
- name: Windows MSVC Release
2020
os: windows
@@ -57,29 +57,12 @@ jobs:
5757
version: 13
5858
platform: x64
5959

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
7962

8063
- name: Build
8164
# 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 }}
8366

8467
- name: Upload artifacts - Linux
8568
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)