From 951b29e5ccb9f2a3ade005708948190274fdad8e Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Thu, 26 May 2022 18:32:43 -0700 Subject: [PATCH] build(actions): skip plugin features for non supported platform (#37229) * build(actions): skip plugin features for non supported platform * test builds * update turbo config * Revert "test builds" This reverts commit 50bdb9765b9fcd4c09e4dcf6566f512ac1a30da0. Co-authored-by: JJ Kasper --- .github/workflows/build_test_deploy.yml | 6 +++--- packages/next-swc/Cargo.lock | 2 ++ packages/next-swc/package.json | 1 + turbo.json | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 4ce9bd41049ff..758b239f4a25a 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1214,7 +1214,7 @@ jobs: sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y build: | npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf + turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf arm-linux-gnueabihf-strip packages/next-swc/native/next-swc.*.node - host: ubuntu-latest target: aarch64-linux-android @@ -1234,7 +1234,7 @@ jobs: export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++" export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}" npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native --cache-dir=".turbo" -- --release --target armv7-linux-androideabi + turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-linux-androideabi ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip packages/next-swc/native/next-swc.*.node - host: ubuntu-latest target: 'aarch64-unknown-linux-musl' @@ -1251,7 +1251,7 @@ jobs: target: 'aarch64-pc-windows-msvc' build: | npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc + turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc if: ${{ needs.build.outputs.isRelease == 'true' }} needs: build name: stable - ${{ matrix.settings.target }} - node@16 diff --git a/packages/next-swc/Cargo.lock b/packages/next-swc/Cargo.lock index aa2ef0e404679..715974500503f 100644 --- a/packages/next-swc/Cargo.lock +++ b/packages/next-swc/Cargo.lock @@ -2673,6 +2673,8 @@ checksum = "21f40169fe465e9a93cda5fe397c3afcb69be5ba2f76c4ab22137af6effaebcc" dependencies = [ "is-macro", "num-bigint", + "rkyv", + "scoped-tls", "serde", "string_enum", "swc_atoms", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index a079665b9288a..677e0d67a918a 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "build-native": "napi build --platform -p next-swc-napi --cargo-name next_swc_napi native --features plugin", + "build-native-no-plugin": "napi build --platform -p next-swc-napi --cargo-name next_swc_napi native", "build-wasm": "wasm-pack build crates/wasm --scope=next" }, "napi": { diff --git a/turbo.json b/turbo.json index 62b903aeb59f2..472e6fcaa4a63 100644 --- a/turbo.json +++ b/turbo.json @@ -4,6 +4,10 @@ "dependsOn": ["^build-native"], "outputs": ["native/*.node"] }, + "build-native-no-plugin": { + "dependsOn": ["^build-native-no-plugin"], + "outputs": ["native/*.node"] + }, "build-wasm": { "dependsOn": ["^build-wasm"], "outputs": ["crates/wasm/pkg/*"]