@@ -268,6 +268,29 @@ commands:
268
268
- sdks/hermesc
269
269
- sdks/hermes
270
270
271
+ get_react_native_version :
272
+ steps :
273
+ - run :
274
+ name : Get React Native version
275
+ command : |
276
+ VERSION=$(cat package.json | jq -r '.version')
277
+ # Save the react native version we are building in a file so we can use that file as part of the cache key.
278
+ echo "$VERSION" > /tmp/react-native-version
279
+ echo "React Native Version is $(cat /tmp/react-native-version)"
280
+ HERMES_VERSION="$(cat /tmp/hermes/hermesversion)"
281
+ echo "Hermes commit is $HERMES_VERSION"
282
+ get_react_native_version_windows :
283
+ steps :
284
+ - run :
285
+ name : Get React Native version on Windows
286
+ command : |
287
+ $VERSION=cat packages/react-native/package.json | jq -r '.version'
288
+ # Save the react native version we are building in a file so we can use that file as part of the cache key.
289
+ echo "$VERSION" > /tmp/react-native-version
290
+ echo "React Native Version is $(cat /tmp/react-native-version)"
291
+ $HERMES_VERSION=cat C:\Users\circleci\project\tmp\hermes\hermesversion
292
+ echo "Hermes commit is $HERMES_VERSION"
293
+
271
294
# -------------------------
272
295
# JOBS
273
296
# -------------------------
@@ -618,6 +641,12 @@ jobs:
618
641
command : ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
619
642
no_output_timeout : 30m
620
643
644
+ - store_test_results :
645
+ path : ~/react-native/ReactAndroid/build/test-results
646
+
647
+ - store_test_results :
648
+ path : ~/react-native/packages/react-native-gradle-plugin/build/test-results
649
+
621
650
# Build JavaScript Bundle for instrumentation tests
622
651
- run :
623
652
name : Build JavaScript Bundle
@@ -957,15 +986,17 @@ jobs:
957
986
resource_class : " xlarge"
958
987
working_directory : /root
959
988
steps :
989
+ - checkout
960
990
- run :
961
991
name : Install dependencies
962
992
command : |
963
993
apt update
964
994
apt install -y git openssh-client cmake build-essential \
965
- libreadline-dev libicu-dev zip python3
995
+ libreadline-dev libicu-dev zip jq python3
966
996
- *attach_hermes_workspace
997
+ - get_react_native_version
967
998
- restore_cache :
968
- key : v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
999
+ key : v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux- {{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version " }}
969
1000
- run :
970
1001
name : Set up workspace
971
1002
command : |
@@ -984,7 +1015,7 @@ jobs:
984
1015
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
985
1016
fi
986
1017
- save_cache :
987
- key : v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
1018
+ key : v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux- {{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version " }}
988
1019
paths :
989
1020
- /tmp/hermes/linux64-bin/
990
1021
- /tmp/hermes/hermes/destroot/
@@ -1065,9 +1096,11 @@ jobs:
1065
1096
- MSBUILD_DIR : ' C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
1066
1097
- CMAKE_DIR : ' C:\Program Files\CMake\bin'
1067
1098
steps :
1099
+ - checkout
1068
1100
- *attach_hermes_workspace
1101
+ - get_react_native_version_windows
1069
1102
- restore_cache :
1070
- key : v1 -hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
1103
+ key : v2 -hermes-{{ .Environment.CIRCLE_JOB }}-windows- {{ checksum "/Users/circleci/project/ tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version " }}
1071
1104
- run :
1072
1105
name : Set up workspace
1073
1106
command : |
@@ -1117,7 +1150,7 @@ jobs:
1117
1150
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
1118
1151
}
1119
1152
- save_cache :
1120
- key : v1 -hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
1153
+ key : v2 -hermes-{{ .Environment.CIRCLE_JOB }}-windows- {{ checksum "/Users/circleci/project/ tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version " }}
1121
1154
paths :
1122
1155
- C:\tmp\hermes\win64-bin\
1123
1156
- C:\tmp\hermes\hermes\icu\
0 commit comments