Skip to content

Commit

Permalink
Disable turbo for build-native temporarily (vercel#32621)
Browse files Browse the repository at this point in the history
* Disable turbo for build-native temporarily

* update args

* re-add working directory config

* comment out caching
  • Loading branch information
ijjk authored and natew committed Feb 16, 2022
1 parent a5e0460 commit 268f9e1
Showing 1 changed file with 99 additions and 91 deletions.
190 changes: 99 additions & 91 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -663,16 +663,16 @@ 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 }}-${{ 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
Expand All @@ -693,7 +693,8 @@ jobs:

- name: Build
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: turbo run build-native --cache-dir=".turbo"
working-directory: packages/next-swc
run: yarn build-native
env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
Expand Down Expand Up @@ -847,15 +848,15 @@ 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 }}-${{ 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' }}
Expand All @@ -878,7 +879,8 @@ jobs:
next-swc-cargo-cache-${{ matrix.os }}
- name: 'Build'
run: turbo run build-native --cache-dir=".turbo" -- --release --target ${{ matrix.target }}
working-directory: packages/next-swc
run: yarn build-native --release --target ${{ matrix.target }}
env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
TURBO_TOKEN: ${{secrets.TURBO_TOKEN}}
Expand Down Expand Up @@ -934,19 +936,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 }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-

- name: Build
shell: bash
run: turbo run build-native --cache-dir=".turbo" -- --release --target i686-pc-windows-msvc
working-directory: packages/next-swc
run: yarn build-native --release --target i686-pc-windows-msvc

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -981,19 +984,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 }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-

- name: Build
shell: bash
run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc
working-directory: packages/next-swc
run: yarn build-native --release --target aarch64-pc-windows-msvc

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -1031,19 +1035,19 @@ 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 }}-${{ 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/[email protected] && npm i -g [email protected] && turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl"
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/[email protected] && npm i -g [email protected] && yarn build-native --release --target x86_64-unknown-linux-musl"
- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -1093,19 +1097,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 }}-${{ 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: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-gnu
run: yarn build-native --release --target aarch64-unknown-linux-gnu

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -1152,18 +1157,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 }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-

- name: Cross build aarch64
run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl
working-directory: packages/next-swc
run: yarn build-native --release --target aarch64-unknown-linux-musl

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -1213,18 +1219,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 }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
# turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-

- name: Cross build aarch64
run: turbo run build-native --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf
working-directory: packages/next-swc
run: yarn build-native --release --target armv7-unknown-linux-gnueabihf

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -1260,21 +1267,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 }}-${{ 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"
turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android
yarn build-native --release --target aarch64-linux-android
- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 268f9e1

Please sign in to comment.