Skip to content

Commit

Permalink
Add hermes commit to github action cache (facebook#43067)
Browse files Browse the repository at this point in the history
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: facebook#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
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 16, 2024
1 parent 80ec096 commit eca78c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ios-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
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
Expand All @@ -29,7 +36,7 @@ jobs:
uses: actions/cache@v3
with:
path: packages/rn-tester/Pods
key: ${{ runner.os }}-RNTesterPods-${{ hashFiles('packages/rn-tester/Podfile.lock') }}-${{ hashFiles('packages/rn-tester/Podfile') }}
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
Expand Down

0 comments on commit eca78c3

Please sign in to comment.