From cd432c74546f1ddfe0d5b3bf0e0a236b6e0494cd Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Fri, 4 Jun 2021 03:21:26 -0700 Subject: [PATCH] Use Node v14 in Windows CircleCI jobs Summary: CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following https://github.com/facebook/react-native/pull/30637, ultimately due to https://github.com/facebook/jest/pull/10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](https://github.com/circleci/circleci-docs/issues/3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we align the Windows config with the one for non-Windows jobs (in the `nodelts` executor) by running against the latest available Node v14 release. Changelog: [Internal] Differential Revision: D28896581 fbshipit-source-id: bd9dd3eb1921f7ab28f05088db23a54cf1a6478d --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 681996fb5fde10..7c42dfeb72111f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,6 +27,7 @@ executors: nodelts: <<: *defaults docker: + # Note: Version set separately for Windows builds, see below. - image: circleci/node:14 nodeprevlts: <<: *defaults @@ -618,12 +619,17 @@ jobs: - ANDROID_HOME: "C:\\Android\\android-sdk" - ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944" - ANDROID_BUILD_VERSION: 30 - - ANDROID_TOOLS_VERSION: 30.0.2 + - ANDROID_TOOLS_VERSION: 29.0.3 - GRADLE_OPTS: -Dorg.gradle.daemon=false - NDK_VERSION: 20.1.5948944 steps: - checkout + - run + name: Install Node + # Note: Version set separately for non-Windows builds, see above. + command: nvm install 14 && nvm use 14 + # Setup Dependencies - run: name: Install Yarn