From 00d15761a561bb60bfb20cdf0eb953513a8c527a Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 12 Aug 2022 15:41:05 +0800 Subject: [PATCH] Fix preinstall failed in yarn@1.x on FreeBSD with npm@8.17 --- .github/workflows/build_test_deploy.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 1537037ceab9..16abc34de4a2 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1445,7 +1445,7 @@ jobs: path: packages/next-swc/native/next-swc.*.node build-native-freebsd: - if: ${{ needs.build.outputs.isRelease == 'true' }} + # if: ${{ needs.build.outputs.isRelease == 'true' }} needs: build name: stable - x86_64-unknown-freebsd - node@16 runs-on: macos-12 @@ -1472,13 +1472,13 @@ jobs: # Disable LTO, or the lld may crash with OOM CARGO_PROFILE_RELEASE_LTO: false with: - envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO NAPI_CLI_VERSION TURBO_VERSION RUST_TOOLCHAIN + envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO NAPI_CLI_VERSION TURBO_VERSION RUST_TOOLCHAIN PNPM_VERSION usesh: true mem: 6000 prepare: | - pkg install -y curl node14 + pkg install -y curl node16 curl -qL https://www.npmjs.com/install.sh | sh - npm install -g yarn + npm i -g pnpm@${PNPM_VERSION} "@napi-rs/cli@${NAPI_CLI_VERSION}" curl https://sh.rustup.rs -sSf --output rustup.sh sh rustup.sh -y --profile minimal --default-toolchain stable export PATH="/usr/local/cargo/bin:$PATH" @@ -1493,8 +1493,7 @@ jobs: whoami env freebsd-version - npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" - cd packages/next-swc && napi build --platform -p next-swc-napi --cargo-name next_swc_napi native --release --target x86_64-unknown-freebsd + pnpm --filter=@next/swc run build-native-no-plugin --platform --release --target x86_64-unknown-freebsd rm -rf node_modules rm -rf packages/next-swc/target - name: Upload artifact