Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating symlinks for ccache on CI instead of modifying PATH #6742

Closed
wants to merge 9 commits into from
30 changes: 5 additions & 25 deletions .github/workflows/pr-realm-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,7 @@ jobs:
with:
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.arch }}
max-size: '2.0G'

- name: Prepend ccache executables to the PATH
if: ${{ runner.os != 'Windows' }}
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
Comment on lines -186 to -189
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action will create symlinks in /usr/local/bin, which is why we no longer need to modify the path.


# in CI file timestamps change with every run so instead rely on file content hashing
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci
- name: Configure ccache
run: ccache --set-config="compiler_check=content"
Comment on lines -191 to -194
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per hendrikmuhs/ccache-action#147 this is already set by the action on macOS.

create-symlink: true

- name: Install dependencies
# Ignoring scripts to prevent a prebuilt from getting fetched / built
Expand Down Expand Up @@ -265,10 +256,8 @@ jobs:
with:
key: ${{ runner.os }}-${{ matrix.platform }}
max-size: '2.0G'
# On CI, file timestamps change with every run so instead rely on file content hashing
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci
- name: Configure ccache
run: ccache --set-config="compiler_check=content"
create-symlink: true

- name: Install dependencies
run: npm ci
- name: Build archive
Expand Down Expand Up @@ -351,11 +340,7 @@ jobs:
with:
key: ${{ runner.os }}-android-${{ matrix.architecture }}
max-size: '2.0G'

# On CI, file timestamps change with every run so instead rely on file content hashing
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci
- name: Configure ccache
run: ccache --set-config="compiler_check=content"
create-symlink: true

- name: Setup Java
uses: actions/setup-java@v3
Expand Down Expand Up @@ -495,12 +480,7 @@ jobs:
with:
key: ${{ runner.os }}-${{ matrix.variant.os }}-${{ matrix.variant.arch }}
max-size: '2.0G'

# in CI file timestamps change with every run so instead rely on file content hashing
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci
- name: Configure ccache
if: ${{ matrix.variant.environment == 'react-native-test-app' }}
run: ccache --set-config="compiler_check=content"
create-symlink: true

# Hermes doesn't work with Cocoapods 1.15.0
# https://forums.developer.apple.com/forums/thread/745518
Expand Down
Loading