Skip to content
Draft
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
8 changes: 3 additions & 5 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,11 @@ jobs:
- name: normalize versions
run: node scripts/normalize-version-bump.js

- name: Cache on ${{ github.ref_name }}
- name: Cache Rust targets on ${{ github.ref_name }}
if: ${{ !matrix.docker && !env.NEXT_SKIP_BUILD_CACHE }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we even use this step nowadays? NEXT_SKIP_BUILD_CACHE is true for production, staging, and force-preview. So we only enable the build cache for the automated preview. However, the automated preview only builds Linux which runs in Docker. Seems like this always evaluates to false.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right. gh cache list --key 'build-' --limit 1000 confirms.

uses: ijjk/rust-cache@a34594c450817c9860143c79797a8770c4e587f5 # turbo-cache-v1.0.9
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
save-if: 'true'
cache-provider: 'turbo'
shared-key: build-${{ matrix.target }}-${{ hashFiles('.cargo/config.toml') }}
shared-key: build-and-deploy-rust-cache-${{ matrix.target }}-${{ hashFiles('.cargo/config.toml') }}

- name: Clear native build
run: rm -rf packages/next-swc/native
Expand Down
Loading