From 007c4215f9abd93f10bceb4f4a96684b86e5c939 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 8 Jul 2022 23:05:12 -0700 Subject: [PATCH 1/3] build(ci): enable rustls as default --- .github/workflows/build_test_deploy.yml | 10 +++++----- packages/next-swc/crates/napi/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 601a8faf2225..9a71084ef7ab 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1261,7 +1261,7 @@ jobs: rustup default "${RUST_TOOLCHAIN}" && rustup target add x86_64-unknown-linux-musl && npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi && - turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl --cargo-flags=--no-default-features --features sentry_rustls && + turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl && strip packages/next-swc/native/next-swc.*.node - host: macos-latest target: 'aarch64-apple-darwin' @@ -1293,7 +1293,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}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi - turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf --cargo-flags=--no-default-features --features sentry_rustls + 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 @@ -1303,7 +1303,7 @@ jobs: export CXX="/usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++" export PATH="/usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}" npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi - turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android --cargo-flags=--no-default-features --features sentry_rustls + turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android /usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip packages/next-swc/native/next-swc.*.node - host: ubuntu-latest target: armv7-linux-androideabi @@ -1313,7 +1313,7 @@ jobs: export CXX="/usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++" export PATH="/usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}" npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" - turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-linux-androideabi --cargo-flags=--no-default-features --features sentry_rustls + turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-linux-androideabi /usr/local/lib/android/sdk/ndk/21.4.7075529/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' @@ -1324,7 +1324,7 @@ jobs: rustup toolchain install "${RUST_TOOLCHAIN}" && rustup default "${RUST_TOOLCHAIN}" && rustup target add aarch64-unknown-linux-musl && - turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl --cargo-flags=--no-default-features --features sentry_rustls && + turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl && llvm-strip -x packages/next-swc/native/next-swc.*.node - host: windows-latest target: 'aarch64-pc-windows-msvc' diff --git a/packages/next-swc/crates/napi/Cargo.toml b/packages/next-swc/crates/napi/Cargo.toml index 312f61f048b0..04880ee0eb16 100644 --- a/packages/next-swc/crates/napi/Cargo.toml +++ b/packages/next-swc/crates/napi/Cargo.toml @@ -8,7 +8,7 @@ publish = false crate-type = ["cdylib", "rlib"] [features] -default = ["sentry_native_tls"] +default = ["sentry_rustls"] # Instead of enabling all the plugin-related features by default, make it explicitly specified # when build (i.e napi --build --features plugin), same for the wasm as well. # this is due to some of transitive dependencies have features cannot be enabled at the same time From 76ef46835b4f46621a708b854bdb2b2c5bd13f49 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 9 Jul 2022 13:47:32 -0500 Subject: [PATCH 2/3] test build --- .github/workflows/build_test_deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 9a71084ef7ab..83467470367a 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1331,7 +1331,7 @@ jobs: build: | npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc --cargo-flags=--no-default-features - if: ${{ needs.build.outputs.isRelease == 'true' }} + # if: ${{ needs.build.outputs.isRelease == 'true' }} needs: build name: stable - ${{ matrix.settings.target }} - node@16 runs-on: ${{ matrix.settings.host }} @@ -1427,7 +1427,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-10.15 @@ -1488,7 +1488,7 @@ jobs: build-wasm: needs: build - if: ${{ needs.build.outputs.isRelease == 'true' }} + # if: ${{ needs.build.outputs.isRelease == 'true' }} strategy: matrix: target: [web, nodejs] From f55d77936d6dfb492d771f9aa48d8b4b22bf5aa5 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 9 Jul 2022 13:55:21 -0500 Subject: [PATCH 3/3] Revert "test build" This reverts commit 76ef46835b4f46621a708b854bdb2b2c5bd13f49. --- .github/workflows/build_test_deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 83467470367a..9a71084ef7ab 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -1331,7 +1331,7 @@ jobs: build: | npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" turbo run build-native-no-plugin --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc --cargo-flags=--no-default-features - # if: ${{ needs.build.outputs.isRelease == 'true' }} + if: ${{ needs.build.outputs.isRelease == 'true' }} needs: build name: stable - ${{ matrix.settings.target }} - node@16 runs-on: ${{ matrix.settings.host }} @@ -1427,7 +1427,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-10.15 @@ -1488,7 +1488,7 @@ jobs: build-wasm: needs: build - # if: ${{ needs.build.outputs.isRelease == 'true' }} + if: ${{ needs.build.outputs.isRelease == 'true' }} strategy: matrix: target: [web, nodejs]