Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 20 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ references:
checkout_cache_key: &checkout_cache_key v1-checkout
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
hermes_cache_key: &hermes_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
hermes_windows_cache_key: &hermes_windows_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
hermes_tarball_cache_key: &hermes_tarball_cache_key v1-hermes-tarball-{{ checksum "/tmp/hermes/cache/.hermes-cache-key-file" }}
pods_cache_key: &pods_cache_key v6-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
hermes_cache_key: &hermes_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
hermes_tarball_cache_key: &hermes_tarball_cache_key v2-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
pods_cache_key: &pods_cache_key v7-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
windows_yarn_cache_key: &windows_yarn_cache_key v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
yarn_cache_key: &yarn_cache_key v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}

Expand Down Expand Up @@ -289,16 +289,6 @@ commands:
type: boolean
default: False
steps:
- run:
name: Setup Hermes cache
command: |
HERMES_CACHE_KEY_FILE="/tmp/hermes/cache/.hermes-cache-key-file"
if [ ! -f "$HERMES_CACHE_KEY_FILE" ]; then
echo "File not found. Creating it using latest commit from main"
mkdir -p /tmp/hermes/cache
git ls-remote https://github.com/facebook/hermes main | cut -f 1 > $HERMES_CACHE_KEY_FILE
fi
cat $HERMES_CACHE_KEY_FILE
- restore_cache:
keys:
- *hermes_tarball_cache_key
Expand Down Expand Up @@ -474,8 +464,7 @@ jobs:
cd scripts
sh run_ruby_tests.sh
- run_yarn
- attach_workspace:
at: /tmp/hermes/
- *attach_hermes_workspace
- run: |
cd packages/rn-tester
bundle check || bundle install
Expand Down Expand Up @@ -535,6 +524,16 @@ jobs:
- run:
name: "Run Tests: iOS Unit and Integration Tests"
command: yarn test-ios
- run:
name: Zip Derived data folder
when: always
command: |
echo "zipping tests results"
cd /Users/distiller/Library/Developer/Xcode
XCRESULT_PATH=$(find . -name '*.xcresult')
tar -zcvf xcresults.tar.gz $XCRESULT_PATH
- store_artifacts:
path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz

# Optionally, run disabled tests
- when:
Expand All @@ -561,6 +560,7 @@ jobs:
- store_test_results:
path: ./reports/junit


# -------------------------
# JOBS: Test Android
# -------------------------
Expand Down Expand Up @@ -745,6 +745,7 @@ jobs:
steps:
- checkout_code_with_cache
- run_yarn
- *attach_hermes_workspace

# The macOS machine can run out of storage if Hermes is enabled and built from source.
# Since this job does not use the iOS Simulator, deleting it provides a quick way to
Expand All @@ -765,9 +766,6 @@ jobs:
- brew_install:
package: cmake

- attach_workspace:
at: /tmp/hermes

- with_hermes_tarball_cache_span:
set_tarball_path: True
steps:
Expand Down Expand Up @@ -924,6 +922,7 @@ jobs:
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
echo $HERMES_TAG_SHA > /tmp/hermes/hermesversion
fi
cat /tmp/hermes/hermesversion
- restore_cache:
key: *hermes_cache_key
- run:
Expand All @@ -932,6 +931,8 @@ jobs:
node scripts/hermes/prepare-hermes-for-build $CIRCLE_PULL_REQUEST
cp sdks/download/* $HERMES_WS_DIR/download/.
cp -r sdks/hermes/* $HERMES_WS_DIR/hermes/.

cat /tmp/hermes/hermesversion
- save_cache:
key: *hermes_cache_key
paths:
Expand Down Expand Up @@ -1009,10 +1010,6 @@ jobs:
brew install cmake
- with_hermes_tarball_cache_span:
steps:
- persist_to_workspace:
root: /tmp/hermes/
paths:
- cache
- run:
name: Build the Hermes iOS frameworks
command: |
Expand Down