@@ -46,7 +46,7 @@ references:
46
46
# Dependency Anchors
47
47
# -------------------------
48
48
dependency_versions :
49
- xcode_version : &xcode_version "14.2 .0"
49
+ xcode_version : &xcode_version "14.3 .0"
50
50
nodelts_image : &nodelts_image "cimg/node:18.12.1"
51
51
nodeprevlts_image : &nodeprevlts_image "cimg/node:16.18.1"
52
52
@@ -62,7 +62,8 @@ references:
62
62
hermes_workspace_cache_key : &hermes_workspace_cache_key v4-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
63
63
hermes_workspace_debug_cache_key : &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
64
64
hermes_workspace_release_cache_key : &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
65
- hermes_windows_cache_key : &hermes_windows_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
65
+ hermes_linux_cache_key : &hermes_linux_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
66
+ hermes_windows_cache_key : &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
66
67
hermes_tarball_debug_cache_key : &hermes_tarball_debug_cache_key v4-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
67
68
hermes_tarball_release_cache_key : &hermes_tarball_release_cache_key v3-hermes-tarball-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
68
69
pods_cache_key : &pods_cache_key v8-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
@@ -317,11 +318,24 @@ commands:
317
318
- run :
318
319
name : Get React Native version
319
320
command : |
320
- VERSION=$( grep '"version"' packages/react-native/package.json | cut -d '"' -f 4 | head -1 )
321
+ VERSION=$(cat packages/react-native/package.json | jq -r '.version' )
321
322
# Save the react native version we are building in a file so we can use that file as part of the cache key.
322
323
echo "$VERSION" > /tmp/react-native-version
323
324
echo "React Native Version is $(cat /tmp/react-native-version)"
324
- echo "Hermes commit is $(cat /tmp/hermes/hermesversion)"
325
+ HERMES_VERSION="$(cat /tmp/hermes/hermesversion)"
326
+ echo "Hermes commit is $HERMES_VERSION"
327
+
328
+ get_react_native_version_windows :
329
+ steps :
330
+ - run :
331
+ name : Get React Native version on Windows
332
+ command : |
333
+ $VERSION=cat packages/react-native/package.json | jq -r '.version'
334
+ # Save the react native version we are building in a file so we can use that file as part of the cache key.
335
+ echo "$VERSION" > /tmp/react-native-version
336
+ echo "React Native Version is $(cat /tmp/react-native-version)"
337
+ $HERMES_VERSION=cat C:\Users\circleci\project\tmp\hermes\hermesversion
338
+ echo "Hermes commit is $HERMES_VERSION"
325
339
326
340
with_hermes_tarball_cache_span :
327
341
parameters :
@@ -624,7 +638,7 @@ jobs:
624
638
- run :
625
639
name : Run Ruby Tests
626
640
command : |
627
- cd scripts
641
+ cd packages/react-native/ scripts
628
642
sh run_ruby_tests.sh
629
643
- run_yarn
630
644
- *attach_hermes_workspace
@@ -723,60 +737,6 @@ jobs:
723
737
- store_test_results :
724
738
path : ./reports/junit
725
739
726
- # -------------------------
727
- # JOBS: Test Buck
728
- # -------------------------
729
- test_buck :
730
- executor : reactnativeandroid
731
- environment :
732
- KOTLIN_HOME=packages/react-native/third-party/kotlin
733
- steps :
734
- - checkout
735
- - setup_artifacts
736
- - run_yarn
737
-
738
- - run :
739
- name : Download Dependencies Using Buck
740
- command : ./scripts/buck/buck_fetch.sh
741
-
742
- - run :
743
- name : Build & Test React Native using Buck
744
- command : |
745
- buck build packages/react-native/ReactAndroid/src/main/java/com/facebook/react
746
- buck build packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell
747
-
748
- - run :
749
- name : Run Tests - Android Unit Tests with Buck
750
- command : buck test packages/react-native/ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ./reports/buck/all-results-raw.xml
751
-
752
- - run :
753
- name : Build JavaScript Bundle for instrumentation tests
754
- working_directory : ~/react-native/packages/react-native
755
- command : node cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
756
-
757
- - run :
758
- name : Build Tests - Android Instrumentation Tests with Buck
759
- # Here, just build the instrumentation tests. There is a known issue with installing the APK to android-21+ emulator.
760
- command : |
761
- if [[ ! -e packages/react-native/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
762
- echo "JavaScript bundle missing, cannot run instrumentation tests. Verify Build JavaScript Bundle step completed successfully."; exit 1;
763
- fi
764
- source scripts/android-setup.sh && NO_BUCKD=1 scripts/retry3 timeout 300 buck build packages/react-native/ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
765
-
766
- - run :
767
- name : Collect Test Results
768
- command : |
769
- find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ./reports/build/ \;
770
- find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ./reports/outputs/ \;
771
- find . -type f -regex ".*/buck-out/gen/packages/react-native/ReactAndroid/src/test/.*/.*xml" -exec cp {} ./reports/buck/ \;
772
- if [ -f ~/react-native/reports/buck/all-results-raw.xml ]; then
773
- ~/react-native/scripts/circleci/buckToJunit/buckToJunit.sh ~/react-native/reports/buck/all-results-raw.xml ~/react-native/reports/junit/results.xml
774
- fi
775
- when : always
776
-
777
- - store_test_results :
778
- path : ./reports/junit
779
-
780
740
# -------------------------
781
741
# JOBS: Test Android
782
742
# -------------------------
@@ -1090,9 +1050,15 @@ jobs:
1090
1050
name : Enable Yarn with corepack
1091
1051
command : corepack enable
1092
1052
1053
+ # it looks like that, last week, envinfo released version 7.9.0 which does not works
1054
+ # with Windows. I have opened an issue here: https://github.com/tabrindle/envinfo/issues/238
1055
+ # TODO: T156811874 - Revert this to npx envinfo@latest when the issue is addressed
1093
1056
- run :
1094
1057
name : Display Environment info
1095
- command : npx envinfo@latest
1058
+ command : |
1059
+ npm install -g envinfo
1060
+ envinfo -v
1061
+ envinfo
1096
1062
1097
1063
- restore_cache :
1098
1064
keys :
@@ -1176,7 +1142,7 @@ jobs:
1176
1142
- image : debian:11
1177
1143
environment :
1178
1144
- HERMES_WS_DIR : *hermes_workspace_root
1179
- - HERMES_VERSION_FILE : " sdks/.hermesversion"
1145
+ - HERMES_VERSION_FILE : " packages/react-native/ sdks/.hermesversion"
1180
1146
- BUILD_FROM_SOURCE : true
1181
1147
steps :
1182
1148
- run :
@@ -1195,8 +1161,10 @@ jobs:
1195
1161
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
1196
1162
1197
1163
if [ -f "$HERMES_VERSION_FILE" ]; then
1164
+ echo "Hermes version file found. Using the latest commit"
1198
1165
cat $HERMES_VERSION_FILE > /tmp/hermes/hermesversion
1199
1166
else
1167
+ echo "No hermes version file found. Using the latest commit"
1200
1168
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
1201
1169
echo $HERMES_TAG_SHA > /tmp/hermes/hermesversion
1202
1170
fi
@@ -1228,17 +1196,18 @@ jobs:
1228
1196
- image : debian:bullseye
1229
1197
# [macOS] Change resource_class to large as we're on the free CircleCI plan
1230
1198
resource_class : " large"
1231
- working_directory : /root
1232
1199
steps :
1200
+ - checkout_code_with_cache
1233
1201
- run :
1234
1202
name : Install dependencies
1235
1203
command : |
1236
1204
apt update
1237
1205
apt install -y git openssh-client cmake build-essential \
1238
- libreadline-dev libicu-dev zip python3
1206
+ libreadline-dev libicu-dev jq zip python3
1239
1207
- *attach_hermes_workspace
1208
+ - get_react_native_version
1240
1209
- restore_cache :
1241
- key : *hermes_workspace_cache_key
1210
+ key : *hermes_linux_cache_key
1242
1211
- run :
1243
1212
name : Set up workspace
1244
1213
command : |
@@ -1257,7 +1226,7 @@ jobs:
1257
1226
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
1258
1227
fi
1259
1228
- save_cache :
1260
- key : *hermes_workspace_cache_key
1229
+ key : *hermes_linux_cache_key
1261
1230
paths :
1262
1231
- /tmp/hermes/linux64-bin/
1263
1232
- /tmp/hermes/hermes/destroot/
@@ -1378,7 +1347,9 @@ jobs:
1378
1347
- MSBUILD_DIR : ' C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
1379
1348
- CMAKE_DIR : ' C:\Program Files\CMake\bin'
1380
1349
steps :
1350
+ - checkout_code_with_cache
1381
1351
- *attach_hermes_workspace
1352
+ - get_react_native_version_windows
1382
1353
- restore_cache :
1383
1354
key : *hermes_windows_cache_key
1384
1355
- run :
@@ -1595,6 +1566,19 @@ jobs:
1595
1566
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
1596
1567
# END: Stable releases
1597
1568
1569
+ poll_maven :
1570
+ docker :
1571
+ - image : cimg/node:current
1572
+ resource_class : small
1573
+ steps :
1574
+ - checkout_code_with_cache
1575
+ - run_yarn
1576
+ - run :
1577
+ name : Poll Maven for Artifacts
1578
+ command : |
1579
+ node scripts/circleci/poll-maven.js
1580
+
1581
+
1598
1582
# -------------------------
1599
1583
# JOBS: Nightly
1600
1584
# -------------------------
@@ -1702,7 +1686,6 @@ workflows:
1702
1686
# jsengine: ["Hermes", "JSC"]
1703
1687
# flavor: ["Debug", "Release"]
1704
1688
# macOS]
1705
- - test_buck
1706
1689
- test_ios_template :
1707
1690
requires :
1708
1691
- build_npm_package
@@ -1938,6 +1921,9 @@ workflows:
1938
1921
- build_hermesc_linux
1939
1922
- build_hermes_macos
1940
1923
- build_hermesc_windows
1924
+ - poll_maven :
1925
+ requires :
1926
+ - build_and_publish_npm_package
1941
1927
1942
1928
package_and_publish_release_dryrun :
1943
1929
when :
0 commit comments