Skip to content

Commit 04e3bfc

Browse files
authored
Manually set cmake version in github action (#14775)
1 parent a96d7d9 commit 04e3bfc

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/firestore.yml

+24
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118

119119
env:
120120
MINT_PATH: ${{ github.workspace }}/mint
121+
USE_LATEST_CMAKE: false
121122

122123
runs-on: ${{ matrix.os }}
123124
steps:
@@ -142,6 +143,11 @@ jobs:
142143
with:
143144
python-version: '3.11'
144145

146+
- name: Setup cmake
147+
uses: jwlawson/actions-setup-cmake@v2
148+
with:
149+
cmake-version: '3.31.1'
150+
145151
- name: Setup build
146152
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
147153

@@ -168,6 +174,7 @@ jobs:
168174
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
169175
MINT_PATH: ${{ github.workspace }}/mint
170176
TARGET_DATABASE_ID: ${{ matrix.databaseId }}
177+
USE_LATEST_CMAKE: false
171178

172179
runs-on: ${{ matrix.os }}
173180
steps:
@@ -230,6 +237,11 @@ jobs:
230237
GOOGLE_APPLICATION_CREDENTIALS: ../google-service-account.json
231238
continue-on-error: true
232239

240+
- name: Setup cmake
241+
uses: jwlawson/actions-setup-cmake@v2
242+
with:
243+
cmake-version: '3.31.1'
244+
233245
- name: Setup build
234246
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
235247

@@ -255,6 +267,7 @@ jobs:
255267

256268
env:
257269
SANITIZERS: ${{ matrix.sanitizer }}
270+
USE_LATEST_CMAKE: false
258271

259272
steps:
260273
- uses: actions/checkout@v4
@@ -271,6 +284,11 @@ jobs:
271284
with:
272285
python-version: '3.11'
273286

287+
- name: Setup cmake
288+
uses: jwlawson/actions-setup-cmake@v2
289+
with:
290+
cmake-version: '3.31.1'
291+
274292
- name: Setup build
275293
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
276294

@@ -301,6 +319,7 @@ jobs:
301319
env:
302320
SANITIZERS: ${{ matrix.sanitizer }}
303321
ASAN_OPTIONS: detect_leaks=0
322+
USE_LATEST_CMAKE: false
304323

305324
steps:
306325
- uses: actions/checkout@v3
@@ -317,6 +336,11 @@ jobs:
317336
with:
318337
python-version: '3.11'
319338

339+
- name: Setup cmake
340+
uses: jwlawson/actions-setup-cmake@v2
341+
with:
342+
cmake-version: '3.31.1'
343+
320344
- name: Setup build
321345
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
322346

scripts/install_prereqs.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ case "$project-$platform-$method" in
104104
;;
105105

106106
Firestore-iOS-cmake | Firestore-tvOS-cmake | Firestore-macOS-cmake)
107-
brew outdated cmake || brew upgrade cmake
107+
# Only skip upgrade when explicitly ask for
108+
if [[ "${USE_LATEST_CMAKE:-true}" == "true" ]]; then
109+
echo "Use latest CMake because USE_LATEST_CMAKE=true"
110+
brew outdated cmake || brew upgrade cmake
111+
else
112+
echo "Skipping CMake upgrade"
113+
fi
108114
brew outdated go || brew upgrade go # Somehow the build for Abseil requires this.
109115
brew install ccache
110116
brew install ninja

0 commit comments

Comments
 (0)