Pin cmake version to 3.31.6 (#50464)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50464

Runners in GHA has been updated by github and they now ship with CMake 4.0. (actions/runner-images#11926)

This version is not compatible with React Native, so we are pinning cmake to 3.36.1

## Changelog:
[Internal] - Pin cmake to 3.36.1

Reviewed By: cortinico

Differential Revision: D72379834

fbshipit-source-id: ab09009102118e6590f02cf57fa6f9149482f62b
This commit is contained in:
Riccardo Cipolleschi
2025-07-01 13:27:50 +00:00
committed by React Native Bot
parent 5fd25e3ebb
commit cdbd01100b
2 changed files with 8 additions and 1 deletions
@@ -14,8 +14,12 @@ runs:
shell: bash
run: |
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
sudo apt install -y git openssh-client build-essential \
libreadline-dev libicu-dev jq zip python3
# Install cmake 3.28.3-1build7
sudo apt-get install cmake=3.28.3-1build7
sudo ln -sf /usr/bin/cmake /usr/local/bin/cmake
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
@@ -39,6 +39,9 @@ runs:
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
- name: Downgrade CMake
shell: powershell
run: choco install cmake --version 3.31.6 --force
- name: Build HermesC for Windows
shell: powershell
run: |