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 <jj@jjsweb.site>
This commit is contained in:
OJ Kwon 2022-05-26 18:32:43 -07:00 committed by GitHub
parent d5706dc417
commit 951b29e5cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -2673,6 +2673,8 @@ checksum = "21f40169fe465e9a93cda5fe397c3afcb69be5ba2f76c4ab22137af6effaebcc"
dependencies = [
"is-macro",
"num-bigint",
"rkyv",
"scoped-tls",
"serde",
"string_enum",
"swc_atoms",

View file

@ -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": {

View file

@ -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/*"]