Skip to content

Commit

Permalink
ci: install cmake straight from github on windows (#6348)
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop authored Nov 27, 2024
1 parent 95cc925 commit b537cd6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ parameters:
protoc_version:
type: string
default: "21.8"
# note the cmake version is only used for manual installs, not for installs from a package manager like apt or homebrew
cmake_version:
type: string
default: "3.31.1"
nightly:
type: boolean
default: false
Expand Down Expand Up @@ -245,15 +249,15 @@ commands:
- run:
name: Install CMake
command: |
choco install cmake -y
echo 'export PATH="/c/Program Files/CMake/bin:$PATH"' >> "$BASH_ENV"
SAVED_EXIT_CODE=$LASTEXITCODE
mkdir -p "$HOME/.local"
if [[ ! -f "$HOME/.local/bin/cmake" ]]; then
curl -L https://github.com/Kitware/CMake/releases/download/v<< pipeline.parameters.cmake_version >>/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64.zip --output cmake.zip
# The zip file has a root directory, so we put it somewhere else first before placing the files in .local
unzip cmake.zip -d /tmp > /dev/null
cp /tmp/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64/* -R "$HOME/.local"
fi
source "$BASH_ENV"
echo "Test CMake -- if this fails, play around with chocolatey, I guess."
cmake --version
exit $SAVED_EXIT_CODE
- when:
condition:
or:
Expand Down

0 comments on commit b537cd6

Please sign in to comment.