mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
eca78c30c7
Summary: The test_ios_rntester-Hermes which runs in github actions was created to make sure that recent commits on Hermes/main won't be breaking React Native However, we discovered that the job was using a cached version of hermes and it was't really downloading the latest hermes every time. With this change, the cocoapods cache will be invalidated whenever there is a commit on hermes/main, forcing the job to reinstall the dependencies when that happens. bypass-github-export-checks ## Changelog: [internal] - Fixed GH Action job to properly refetch newest version on Hermes when it changes. Pull Request resolved: https://github.com/facebook/react-native/pull/43067 Test Plan: Github Actions must be green and the action should show that a new version of Hermes is downloaded. The commit is downloaded here: {F1457505882} And it is used here, notice the last hash: {F1457505989} Reviewed By: motiz88 Differential Revision: D53853963 Pulled By: cipolleschi fbshipit-source-id: 7a65dd72a21b6da12b826273d1c92bb90b678652
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: ios-tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
|
|
jobs:
|
|
test_ios_rntester-Hermes:
|
|
runs-on: macos-latest-large
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'yarn'
|
|
- name: Yarn Install
|
|
run: yarn install
|
|
- name: Get latest commit from Hermes
|
|
run: |
|
|
mkdir -p tmp/hermes
|
|
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
|
|
echo "Latest Commit is:"
|
|
cat tmp/hermes/hermesversion
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
ruby-version: '3.2'
|
|
- name: Cache cocoapods
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/rn-tester/Pods
|
|
key: v1-${{ runner.os }}-RNTesterPods-${{ hashFiles('packages/rn-tester/Podfile.lock') }}-${{ hashFiles('packages/rn-tester/Podfile') }}-${{ hashFiles('tmp/hermes/hermesversion') }}
|
|
- name: Pod Install
|
|
run: |
|
|
cd packages/rn-tester
|
|
bundle install
|
|
bundle exec pod install
|
|
- name: Install XCBeautify
|
|
run: brew install xcbeautify
|
|
- name: Build iOS
|
|
run: ./scripts/objc-test.sh
|