Skip to content

Commit 4ee4370

Browse files
authored
Merge pull request #141 from mgerhold/fix-cmake-regression
Fix CMake CI failures
2 parents 9884e28 + 2b9bdde commit 4ee4370

File tree

1 file changed

+8
-33
lines changed

1 file changed

+8
-33
lines changed

.github/workflows/cmake.yml

Lines changed: 8 additions & 33 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
@@ -45,16 +45,10 @@ jobs:
4545
sudo apt-get update
4646
sudo apt install curl pkg-config zip unzip tar cmake git -y
4747
48-
- name: Install cmake >= 3.25 (Linux)
49-
if: matrix.config.os == 'ubuntu'
50-
shell: bash
51-
run: |
52-
sudo apt-get update
53-
sudo apt-get install gpg wget
54-
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
55-
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
56-
sudo apt-get update
57-
sudo apt-get install cmake -y
48+
- name: Install cmake 3.29.0 and ninja
49+
uses: lukka/get-cmake@latest
50+
with:
51+
cmakeVersion: 3.29.0
5852

5953
- name: Setup GCC (Linux)
6054
if: matrix.config.os == 'ubuntu'
@@ -63,31 +57,12 @@ jobs:
6357
version: 13
6458
platform: x64
6559

66-
67-
- name: Install vcpkg
68-
shell: bash
69-
run: |
70-
cd "${{github.workspace}}"
71-
git clone https://github.com/Microsoft/vcpkg.git
72-
"${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh"
73-
74-
- uses: abdes/gha-setup-ninja@master
75-
76-
- name: Configure CMake (Windows only)
77-
if: matrix.config.os == 'windows'
78-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
79-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
80-
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
81-
82-
- name: Configure CMake (Linux only)
83-
if: matrix.config.os == 'ubuntu'
84-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
85-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
86-
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
8762

8863
- name: Build
8964
# Build your program with the given configuration
90-
run: cmake --build ${{github.workspace}}/build -j --config ${{ matrix.config.buildtype }}
65+
run: cmake --build ./build -j --config ${{ matrix.config.buildtype }}
9166

9267
- name: Upload artifacts - Linux
9368
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)