Re-enable turbo caching for swc build jobs (#32617)
* Fix build-native jobs * Update to latest turbo * fix extra space * fix windows shell * Update to latest turbo * Bump Turbo (#32703) * Bump turbo to canary * Bump turbo * Update yaml too * add less specific restore key * update more restore keys * Fix non-unique key and cache wasm build * ensure turbo is installed for new jobs * remove old wasm cache * update directory check * bump * re-add if publish checks Co-authored-by: Jared Palmer <jared@jaredpalmer.com>
This commit is contained in:
parent
3ad2035ae6
commit
5e5f1df445
3 changed files with 219 additions and 141 deletions
277
.github/workflows/build_test_deploy.yml
vendored
277
.github/workflows/build_test_deploy.yml
vendored
|
@ -552,7 +552,7 @@ jobs:
|
|||
- build-windows-aarch64
|
||||
- build-linux-musl
|
||||
- build-linux-arm7
|
||||
- build-linux-aarch64
|
||||
- build-linux-aarch64-gnu
|
||||
- build-android-aarch64
|
||||
- build-linux-aarch64-musl
|
||||
env:
|
||||
|
@ -664,16 +664,17 @@ jobs:
|
|||
- id: get-week
|
||||
run: echo ::set-output name=WEEK::$(date +%U)
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
|
||||
# turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
|
||||
turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
|
||||
|
||||
# We use restore-key to pick latest cache.
|
||||
# We will not get exact match, but doc says
|
||||
|
@ -683,19 +684,18 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./packages/next-swc/target
|
||||
key: next-swc-cargo-cache-ubuntu-18.04--${{ hashFiles('**/Cargo.lock') }}
|
||||
key: next-swc-cargo-cache-dev-ubuntu-18.04-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
next-swc-cargo-cache-ubuntu-18.04
|
||||
next-swc-cargo-cache-dev-ubuntu-18.04
|
||||
|
||||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Build
|
||||
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native
|
||||
run: turbo run build-native --cache-dir=".turbo"
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
@ -829,6 +829,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Install
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -849,15 +850,16 @@ jobs:
|
|||
path: ~/.cargo/git
|
||||
key: stable-${{ matrix.os }}-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
# - name: Turbo cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-${{ matrix.name }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-${{ matrix.name }}-
|
||||
turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-${{ matrix.name }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Cross build aarch64 setup
|
||||
if: ${{ matrix.target == 'aarch64-apple-darwin' }}
|
||||
|
@ -880,8 +882,8 @@ jobs:
|
|||
next-swc-cargo-cache-${{ matrix.os }}
|
||||
|
||||
- name: 'Build'
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native --release --target ${{ matrix.target }}
|
||||
shell: bash
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target ${{ matrix.target }}
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
TURBO_TOKEN: ${{secrets.TURBO_TOKEN}}
|
||||
|
@ -928,7 +930,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -937,20 +939,20 @@ jobs:
|
|||
override: true
|
||||
target: i686-pc-windows-msvc
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native --release --target i686-pc-windows-msvc
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target i686-pc-windows-msvc
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -976,7 +978,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -985,20 +987,20 @@ jobs:
|
|||
override: true
|
||||
target: aarch64-pc-windows-msvc
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native --release --target aarch64-pc-windows-msvc
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1036,19 +1038,20 @@ jobs:
|
|||
docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: 'Build'
|
||||
run: |
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/packages/next-swc:/build -w /build builder sh -c "npm i -g @napi-rs/cli@1.2.1 && npm i -g turbo@1.0.14 && yarn build-native --release --target x86_64-unknown-linux-musl"
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "npm i -g @napi-rs/cli@1.2.1 && npm i -g turbo@1.0.24 && turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1056,7 +1059,7 @@ jobs:
|
|||
name: next-swc-binaries
|
||||
path: packages/next-swc/native/next-swc.linux-x64-musl.node
|
||||
|
||||
build-linux-aarch64:
|
||||
build-linux-aarch64-gnu:
|
||||
needs: build
|
||||
if: ${{ needs.build.outputs.isRelease == 'true' }}
|
||||
name: next-swc - aarch64-unknown-linux-gnu - node@14
|
||||
|
@ -1076,7 +1079,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -1098,20 +1101,20 @@ jobs:
|
|||
sudo apt-get update
|
||||
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Cross build aarch64
|
||||
working-directory: packages/next-swc
|
||||
if: ${{ steps.binary-cache.outputs.cache-hit != 'true' }}
|
||||
run: yarn build-native --release --target aarch64-unknown-linux-gnu
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-gnu
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1137,7 +1140,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -1158,19 +1161,19 @@ jobs:
|
|||
sudo apt-get update
|
||||
sudo apt-get install gcc-aarch64-linux-gnu -y
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Cross build aarch64
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native --release --target aarch64-unknown-linux-musl
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1198,7 +1201,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -1220,19 +1223,19 @@ jobs:
|
|||
sudo apt-get update
|
||||
sudo apt-get install gcc-arm-linux-gnueabihf -y
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Cross build aarch64
|
||||
working-directory: packages/next-swc
|
||||
run: yarn build-native --release --target armv7-unknown-linux-gnueabihf
|
||||
run: turbo run build-native --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1258,7 +1261,7 @@ jobs:
|
|||
# since the repo's dependencies aren't installed we need
|
||||
# to install napi globally
|
||||
- run: npm i -g @napi-rs/cli@1.2.1
|
||||
- run: npm i -g turbo@1.0.14
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -1268,22 +1271,22 @@ jobs:
|
|||
override: true
|
||||
target: aarch64-linux-android
|
||||
|
||||
# - name: Turbo Cache
|
||||
# id: turbo-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: .turbo
|
||||
# key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: packages/next-swc
|
||||
run: |
|
||||
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang"
|
||||
yarn build-native --release --target aarch64-linux-android
|
||||
turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1318,22 +1321,27 @@ jobs:
|
|||
override: true
|
||||
target: wasm32-unknown-unknown
|
||||
|
||||
- name: Cache
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Turbo cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/
|
||||
**/target/
|
||||
key: ${{ runner.os }}-publish-integration
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ matrix.target }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-${{ matrix.target }}-
|
||||
turbo-${{ github.job }}-${{ matrix.target }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
|
||||
turbo-${{ github.job }}-${{ matrix.target }}-canary-${{ needs.build.outputs.weekNum }}-
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Build
|
||||
run: (wasm-pack build packages/next-swc/crates/wasm --release --scope=next --target ${{ matrix.target }})
|
||||
run: turbo run build-wasm --cache-dir=".turbo" -- --target ${{ matrix.target }}
|
||||
|
||||
- name: Add target to folder name
|
||||
run: mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }}
|
||||
run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }} || ls packages/next-swc/crates/wasm'
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
@ -1358,6 +1366,8 @@ jobs:
|
|||
with:
|
||||
node-version: 14
|
||||
|
||||
- run: npm i -g turbo@1.0.24
|
||||
|
||||
- name: Install Rust
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -1367,34 +1377,29 @@ jobs:
|
|||
override: true
|
||||
target: wasm32-unknown-unknown
|
||||
|
||||
- name: Cache
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
- name: Turbo Cache
|
||||
id: turbo-cache
|
||||
uses: actions/cache@v2
|
||||
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/
|
||||
**/target/
|
||||
key: ${{ runner.os }}-publish-integration
|
||||
|
||||
- name: Cache wasm binary
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
id: binary-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: packages/next-swc/crates/wasm/pkg-nodejs
|
||||
key: dev-wasm-next-swc-nightly-2021-11-15-${{ hashFiles('.github/workflows/build_test_deploy.yml', 'packages/next-swc/**') }}
|
||||
path: .turbo
|
||||
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ github.job }}-
|
||||
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
|
||||
turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
|
||||
|
||||
- name: Install wasm-pack
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change' && steps.binary-cache.outputs.cache-hit != 'true'}}
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Build
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change' && steps.binary-cache.outputs.cache-hit != 'true'}}
|
||||
run: (wasm-pack build packages/next-swc/crates/wasm --dev --scope=next --target nodejs)
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
run: turbo run build-wasm --cache-dir=".turbo" -- --target nodejs --dev
|
||||
|
||||
- name: Add target to folder name
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change' && steps.binary-cache.outputs.cache-hit != 'true'}}
|
||||
run: mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs || ls packages/next-swc/crates/wasm'
|
||||
|
||||
- name: Upload artifact
|
||||
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
"tailwindcss": "1.1.3",
|
||||
"taskr": "1.1.0",
|
||||
"tree-kill": "1.2.2",
|
||||
"turbo": "1.0.14",
|
||||
"turbo": "1.0.24",
|
||||
"typescript": "4.4.3",
|
||||
"wait-port": "0.2.2",
|
||||
"web-streams-polyfill": "2.1.1",
|
||||
|
|
81
yarn.lock
81
yarn.lock
|
@ -19017,10 +19017,83 @@ tunnel-agent@^0.6.0:
|
|||
dependencies:
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
turbo@1.0.14:
|
||||
version "1.0.14"
|
||||
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.0.14.tgz#42ace0d1c699f0c1cb19b589b6d629dfa72b62b4"
|
||||
integrity sha512-FfKP1rjx8LF/n8eibVOVlv7XzTszMHCg43RHCLFxGAEKluDCw3hyFAFNJumECktiGOt19M54h+HEGW/BDZeW2g==
|
||||
turbo-darwin-64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.0.24.tgz#f135baff0e44f9160c9b027e8c4dd2d5c8bb10a7"
|
||||
integrity sha512-A65Wxp+jBMfI3QX2uObX6DKvk+TxNXTf7ufQTHvRSLeAreB8QiVzJdYE0nC6YdrRwfPgFY3L72dhYd2v8ouXDg==
|
||||
|
||||
turbo-darwin-arm64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.0.24.tgz#c360d7cc6a7403855733e3aebb841b1227fbbb2e"
|
||||
integrity sha512-31zfexqUhvk/CIfAUk2mwjlpEjIURXu4QG8hoWlGxpcpAhlnkIX6CXle+LoQSnU3+4EbNe2SE92fYXsT/SnHAg==
|
||||
|
||||
turbo-freebsd-64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-freebsd-64/-/turbo-freebsd-64-1.0.24.tgz#9ef8914e7d1aaa995a8001a0ad81f7cc4520d332"
|
||||
integrity sha512-vZYbDkOHH5eeQrxsAYldrh2nDY884irtmgJdGbpjryJgnJx+xzriZfoFalm/d1ZfG3ArENRJqGU+k6BriefZzw==
|
||||
|
||||
turbo-freebsd-arm64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-freebsd-arm64/-/turbo-freebsd-arm64-1.0.24.tgz#12644e8f1b077f9d7afb367f2b8c2a2e0592ca72"
|
||||
integrity sha512-TDIu1PlyusY8AB69KGM4wGrCjtfbzmVF4Hlgf9mVeSWVKzqkRASorOEq1k8KvfZ+sBTS2GBMpqwpa1KVkYpVhw==
|
||||
|
||||
turbo-linux-32@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-32/-/turbo-linux-32-1.0.24.tgz#6129f7560f5c48214c1724ae7e8196dedc56de21"
|
||||
integrity sha512-lhhK7914sUtuWYcDO8LV7NQkvTIwpAZlYH0XEOC/OTiYRQJvtKbEySLvefvtwuGjx7cGNI6OYraUsY3WWoK3FA==
|
||||
|
||||
turbo-linux-64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.0.24.tgz#221e3e14037e8fc3108e12a62de209d8a47f0348"
|
||||
integrity sha512-EbfdrkwVsHDG7AIVQ1enWHoD6riAApx4VRAuFcQHTvJU9e+BuOQBMjb7e9jO4mUrpumtN3n20tP+86odRwsk5g==
|
||||
|
||||
turbo-linux-arm64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.0.24.tgz#95891e7d4375ccbf2478677568557948be33717a"
|
||||
integrity sha512-H4rqlgP2L7G3iAB/un/7DclExzLUkQ1NoZ0p/1Oa7Wb8H1YUlc8GkwUmpIFd5AOFSPL75DjYvlS8T5Tm23i+1A==
|
||||
|
||||
turbo-linux-arm@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-arm/-/turbo-linux-arm-1.0.24.tgz#f5acb74170a8b5a787915e799e7b52840c7c6982"
|
||||
integrity sha512-lCNDVEkwxcn0acyPFVJgV5N5vKAP4LfXb+8uW/JpGHVoPHSONKtzYQG05J1KbHXpIjUT+DNgFtshtsdZYOewZQ==
|
||||
|
||||
turbo-linux-mips64le@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-mips64le/-/turbo-linux-mips64le-1.0.24.tgz#f2cc99570222ac42fdcc0d0638f13bc0176859f9"
|
||||
integrity sha512-AmrgQUDIe9AdNyh5YrI6pfMTUHD/gYfbylNmedLuN5Al3xINdZObcISzd/7VWd+V8wNW/1b9lUnt70Rv/KExfA==
|
||||
|
||||
turbo-linux-ppc64le@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-linux-ppc64le/-/turbo-linux-ppc64le-1.0.24.tgz#4d9508290d24cfdbaca24e57d8bcd0127281e2ed"
|
||||
integrity sha512-+6ESjsfrvRUr1AsurNcRTrqYr+XHG8g763+hXLog1MP9mn1cufZqWlAyE4G8/MLXDHsEKgK+tXqPLIyLBRjLEw==
|
||||
|
||||
turbo-windows-32@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-windows-32/-/turbo-windows-32-1.0.24.tgz#2bf906c0cc9d675afc4693221fc339ade29e6c13"
|
||||
integrity sha512-pqRys+FfHxuLVmW/AariITL5qpItp4WPAsYnWLx4u7VpCOO/qmTAI/SL7/jnTm4gxjBv3uf//lisu0AvEZd+TA==
|
||||
|
||||
turbo-windows-64@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.0.24.tgz#5dd30b10110f2bb69caa479ddd72b4c471fb0dea"
|
||||
integrity sha512-YHAWha5XkW0Ate1HtwhzFD32kZFXtC8KB4ReEvHc9GM2inQob1ZinvktS0xi5MC5Sxl9+bObOWmsxeZPOgNCFA==
|
||||
|
||||
turbo@1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.0.24.tgz#5efdeb44aab2f5e97b24a3e0ed4a159bfcd0a877"
|
||||
integrity sha512-bfOr7iW48+chDl+yKiZ5FIWzXOF6xOIyrAGPaWI+I5CdD27IZCEGvqvTV/weaHvjLbV7otybHQ56XCybBlVjoA==
|
||||
optionalDependencies:
|
||||
turbo-darwin-64 "1.0.24"
|
||||
turbo-darwin-arm64 "1.0.24"
|
||||
turbo-freebsd-64 "1.0.24"
|
||||
turbo-freebsd-arm64 "1.0.24"
|
||||
turbo-linux-32 "1.0.24"
|
||||
turbo-linux-64 "1.0.24"
|
||||
turbo-linux-arm "1.0.24"
|
||||
turbo-linux-arm64 "1.0.24"
|
||||
turbo-linux-mips64le "1.0.24"
|
||||
turbo-linux-ppc64le "1.0.24"
|
||||
turbo-windows-32 "1.0.24"
|
||||
turbo-windows-64 "1.0.24"
|
||||
|
||||
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
||||
version "0.14.5"
|
||||
|
|
Loading…
Reference in a new issue