Unverified Commit 665b29ec authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Add native build caching to main workflow also (#29920)

parent ba39ee45
...@@ -504,6 +504,17 @@ jobs: ...@@ -504,6 +504,17 @@ jobs:
export CXX=$(xcrun -f clang++); export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path); SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
# We use restore-key to pick latest cache.
# We will not get exact match, but doc says
# "If there are multiple partial matches for a restore key, the action returns the most recently created cache."
# So we get latest cache
- name: Cache built files
uses: actions/cache@v2
with:
path: ./packages/next/build/swc/target
key: next-swc-cargo-cache-${{ matrix.os }}--${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
next-swc-cargo-cache-${{ matrix.os }}
- name: 'Build' - name: 'Build'
if: ${{ steps.binary-cache.outputs.cache-hit != 'true' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} if: ${{ steps.binary-cache.outputs.cache-hit != 'true' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: yarn build-native --target ${{ matrix.target }} run: yarn build-native --target ${{ matrix.target }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment