diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 9d1ccf875b0..a8ed245cc76 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -118,6 +118,7 @@ jobs: env: MINT_PATH: ${{ github.workspace }}/mint + USE_LATEST_CMAKE: false runs-on: ${{ matrix.os }} steps: @@ -142,6 +143,11 @@ jobs: with: python-version: '3.11' + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: '3.31.1' + - name: Setup build run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake @@ -168,6 +174,7 @@ jobs: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} MINT_PATH: ${{ github.workspace }}/mint TARGET_DATABASE_ID: ${{ matrix.databaseId }} + USE_LATEST_CMAKE: false runs-on: ${{ matrix.os }} steps: @@ -230,6 +237,11 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ../google-service-account.json continue-on-error: true + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: '3.31.1' + - name: Setup build run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake @@ -255,6 +267,7 @@ jobs: env: SANITIZERS: ${{ matrix.sanitizer }} + USE_LATEST_CMAKE: false steps: - uses: actions/checkout@v4 @@ -271,6 +284,11 @@ jobs: with: python-version: '3.11' + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: '3.31.1' + - name: Setup build run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake @@ -301,6 +319,7 @@ jobs: env: SANITIZERS: ${{ matrix.sanitizer }} ASAN_OPTIONS: detect_leaks=0 + USE_LATEST_CMAKE: false steps: - uses: actions/checkout@v3 @@ -317,6 +336,11 @@ jobs: with: python-version: '3.11' + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: '3.31.1' + - name: Setup build run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake diff --git a/scripts/install_prereqs.sh b/scripts/install_prereqs.sh index 079ff6076ac..8e36a85b30a 100755 --- a/scripts/install_prereqs.sh +++ b/scripts/install_prereqs.sh @@ -104,7 +104,13 @@ case "$project-$platform-$method" in ;; Firestore-iOS-cmake | Firestore-tvOS-cmake | Firestore-macOS-cmake) - brew outdated cmake || brew upgrade cmake + # Only skip upgrade when explicitly ask for + if [[ "${USE_LATEST_CMAKE:-true}" == "true" ]]; then + echo "Use latest CMake because USE_LATEST_CMAKE=true" + brew outdated cmake || brew upgrade cmake + else + echo "Skipping CMake upgrade" + fi brew outdated go || brew upgrade go # Somehow the build for Abseil requires this. brew install ccache brew install ninja