From 9512a98295f43f162bc563f6441501a17ab8d100 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 14:17:19 +0800 Subject: [PATCH 01/11] fix: build more target --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e9e5e8..e3aee43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,12 +29,33 @@ jobs: target: x86_64-apple-darwin build: | cd crates/node_binding - pnpm build + pnpm build --target x86_64-apple-darwin + strip -x *.node + - host: macos-latest + name: darwin-arm64 + target: aarch64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target aarch64-apple-darwin strip -x *.node - host: windows-latest - build: cd crates/node_binding && pnpm build name: win32-x64-msvc target: x86_64-pc-windows-msvc + build: | + cd crates/node_binding + pnpm build --target x86_64-pc-windows-msvc + - host: windows-latest + target: aarch64-pc-windows-msvc + name: win32-arm64-msvc + build: | + cd crates/node_binding + pnpm build --target aarch64-pc-windows-msvc + - host: windows-latest + target: i686-pc-windows-msvc + name: win32-i686-msvc + build: | + cd crates/node_binding + pnpm build --target i686-pc-windows-msvc - host: ubuntu-latest target: x86_64-unknown-linux-gnu name: linux-x64-gnu @@ -50,17 +71,26 @@ jobs: target: x86_64-unknown-linux-musl docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine build: cd crates/node_binding && set -e && pnpm build && strip *.node - - host: macos-latest - name: darwin-arm64 - target: aarch64-apple-darwin - build: | - cd crates/node_binding - pnpm build --target aarch64-apple-darwin - strip -x *.node - - host: windows-latest - target: aarch64-pc-windows-msvc - name: win32-arm64-msvc - build: cd crates/node_binding && pnpm build --target aarch64-pc-windows-msvc + - host: ubuntu-latest + target: aarch64-unknown-linux-gnu + name: linux-arm64-gnu + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 + build: |- + set -e && + cd crates/node_binding && + export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && + pnpm build --target aarch64-unknown-linux-gnu && + strip *.node + - host: ubuntu-latest + target: aarch64-unknown-linux-musl + name: linux-arm64-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: |- + set -e && + cd crates/node_binding && + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc && + pnpm build --target aarch64-unknown-linux-musl && + strip *.node name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} steps: From 9c253ff7ab9d712bae1306f6a408baaf9023408c Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 14:17:52 +0800 Subject: [PATCH 02/11] chore: test --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3aee43..ba62851 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ permissions: on: push: branches: - - master + - fix/ci tags-ignore: - '**' paths-ignore: From 95145fd02e3540ce9bdc777d04b6f4d55e399c97 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 14:45:49 +0800 Subject: [PATCH 03/11] fix: add target --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba62851..0f09d3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: pnpm build --target aarch64-pc-windows-msvc - host: windows-latest target: i686-pc-windows-msvc - name: win32-i686-msvc + name: win32-ia32-msvc build: | cd crates/node_binding pnpm build --target i686-pc-windows-msvc @@ -64,7 +64,7 @@ jobs: set -e && cd crates/node_binding && unset CC_x86_64_unknown_linux_gnu && unset CC && - npm run build -- --target x86_64-unknown-linux-gnu && + pnpm build --target x86_64-unknown-linux-gnu && strip *.node - host: ubuntu-latest name: linux-x64-musl @@ -79,6 +79,7 @@ jobs: set -e && cd crates/node_binding && export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && + rustup target add aarch64-unknown-linux-gnu && pnpm build --target aarch64-unknown-linux-gnu && strip *.node - host: ubuntu-latest @@ -89,6 +90,7 @@ jobs: set -e && cd crates/node_binding && export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc && + rustup target add aarch64-unknown-linux-musl && pnpm build --target aarch64-unknown-linux-musl && strip *.node name: stable - ${{ matrix.settings.target }} - node@18 From 0a662ec9790b3ebb5e5e4e50665123bfb03082de Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 16:11:10 +0800 Subject: [PATCH 04/11] fix: test ci --- .github/workflows/release.yml | 98 +++++++++++++++++------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f09d3d..1932b8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,53 +24,53 @@ jobs: fail-fast: false matrix: settings: - - host: macos-latest - name: darwin-x64 - target: x86_64-apple-darwin - build: | - cd crates/node_binding - pnpm build --target x86_64-apple-darwin - strip -x *.node - - host: macos-latest - name: darwin-arm64 - target: aarch64-apple-darwin - build: | - cd crates/node_binding - pnpm build --target aarch64-apple-darwin - strip -x *.node - - host: windows-latest - name: win32-x64-msvc - target: x86_64-pc-windows-msvc - build: | - cd crates/node_binding - pnpm build --target x86_64-pc-windows-msvc - - host: windows-latest - target: aarch64-pc-windows-msvc - name: win32-arm64-msvc - build: | - cd crates/node_binding - pnpm build --target aarch64-pc-windows-msvc - - host: windows-latest - target: i686-pc-windows-msvc - name: win32-ia32-msvc - build: | - cd crates/node_binding - pnpm build --target i686-pc-windows-msvc - - host: ubuntu-latest - target: x86_64-unknown-linux-gnu - name: linux-x64-gnu - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - build: |- - set -e && - cd crates/node_binding && - unset CC_x86_64_unknown_linux_gnu && unset CC && - pnpm build --target x86_64-unknown-linux-gnu && - strip *.node - - host: ubuntu-latest - name: linux-x64-musl - target: x86_64-unknown-linux-musl - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - build: cd crates/node_binding && set -e && pnpm build && strip *.node + # - host: macos-latest + # name: darwin-x64 + # target: x86_64-apple-darwin + # build: | + # cd crates/node_binding + # pnpm build --target x86_64-apple-darwin + # strip -x *.node + # - host: macos-latest + # name: darwin-arm64 + # target: aarch64-apple-darwin + # build: | + # cd crates/node_binding + # pnpm build --target aarch64-apple-darwin + # strip -x *.node + # - host: windows-latest + # name: win32-x64-msvc + # target: x86_64-pc-windows-msvc + # build: | + # cd crates/node_binding + # pnpm build --target x86_64-pc-windows-msvc + # - host: windows-latest + # target: aarch64-pc-windows-msvc + # name: win32-arm64-msvc + # build: | + # cd crates/node_binding + # pnpm build --target aarch64-pc-windows-msvc + # - host: windows-latest + # target: i686-pc-windows-msvc + # name: win32-ia32-msvc + # build: | + # cd crates/node_binding + # pnpm build --target i686-pc-windows-msvc + # - host: ubuntu-latest + # target: x86_64-unknown-linux-gnu + # name: linux-x64-gnu + # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + # build: |- + # set -e && + # cd crates/node_binding && + # unset CC_x86_64_unknown_linux_gnu && unset CC && + # pnpm build --target x86_64-unknown-linux-gnu && + # strip *.node + # - host: ubuntu-latest + # name: linux-x64-musl + # target: x86_64-unknown-linux-musl + # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + # build: cd crates/node_binding && set -e && pnpm build && strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu name: linux-arm64-gnu @@ -81,7 +81,7 @@ jobs: export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && rustup target add aarch64-unknown-linux-gnu && pnpm build --target aarch64-unknown-linux-gnu && - strip *.node + aarch64-unknown-linux-gnu-strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-musl name: linux-arm64-musl @@ -92,7 +92,7 @@ jobs: export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc && rustup target add aarch64-unknown-linux-musl && pnpm build --target aarch64-unknown-linux-musl && - strip *.node + /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} steps: From 483a67021e0322c7761775f5bbefdae5648b8ca8 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 19:53:29 +0800 Subject: [PATCH 05/11] fix: test case --- .github/workflows/release.yml | 96 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1932b8d..27ccee0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,53 +24,53 @@ jobs: fail-fast: false matrix: settings: - # - host: macos-latest - # name: darwin-x64 - # target: x86_64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build --target x86_64-apple-darwin - # strip -x *.node - # - host: macos-latest - # name: darwin-arm64 - # target: aarch64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build --target aarch64-apple-darwin - # strip -x *.node - # - host: windows-latest - # name: win32-x64-msvc - # target: x86_64-pc-windows-msvc - # build: | - # cd crates/node_binding - # pnpm build --target x86_64-pc-windows-msvc - # - host: windows-latest - # target: aarch64-pc-windows-msvc - # name: win32-arm64-msvc - # build: | - # cd crates/node_binding - # pnpm build --target aarch64-pc-windows-msvc - # - host: windows-latest - # target: i686-pc-windows-msvc - # name: win32-ia32-msvc - # build: | - # cd crates/node_binding - # pnpm build --target i686-pc-windows-msvc - # - host: ubuntu-latest - # target: x86_64-unknown-linux-gnu - # name: linux-x64-gnu - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - # build: |- - # set -e && - # cd crates/node_binding && - # unset CC_x86_64_unknown_linux_gnu && unset CC && - # pnpm build --target x86_64-unknown-linux-gnu && - # strip *.node - # - host: ubuntu-latest - # name: linux-x64-musl - # target: x86_64-unknown-linux-musl - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - # build: cd crates/node_binding && set -e && pnpm build && strip *.node + - host: macos-latest + name: darwin-x64 + target: x86_64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target x86_64-apple-darwin + strip -x *.node + - host: macos-latest + name: darwin-arm64 + target: aarch64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target aarch64-apple-darwin + strip -x *.node + - host: windows-latest + name: win32-x64-msvc + target: x86_64-pc-windows-msvc + build: | + cd crates/node_binding + pnpm build --target x86_64-pc-windows-msvc + - host: windows-latest + target: aarch64-pc-windows-msvc + name: win32-arm64-msvc + build: | + cd crates/node_binding + pnpm build --target aarch64-pc-windows-msvc + - host: windows-latest + target: i686-pc-windows-msvc + name: win32-ia32-msvc + build: | + cd crates/node_binding + pnpm build --target i686-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + name: linux-x64-gnu + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + build: |- + set -e && + cd crates/node_binding && + unset CC_x86_64_unknown_linux_gnu && unset CC && + pnpm build --target x86_64-unknown-linux-gnu && + strip *.node + - host: ubuntu-latest + name: linux-x64-musl + target: x86_64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: cd crates/node_binding && set -e && pnpm build && strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu name: linux-arm64-gnu @@ -122,7 +122,7 @@ jobs: target/ key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} - uses: goto-bus-stop/setup-zig@v2 - if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} + if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'aarch64-unknown-linux-gnu' || matrix.settings.target == 'aarch64-unknown-linux-musl' }} with: version: 0.10.1 From 2e2c6209194cfe2a703d232edd2aca8a7f7dde84 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 8 May 2024 20:56:39 +0800 Subject: [PATCH 06/11] fix: ci --- .../npm/win32-ia32-msvc/README.md | 3 +++ .../npm/win32-ia32-msvc/package.json | 21 +++++++++++++++++++ crates/node_binding/package.json | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 crates/node_binding/npm/win32-ia32-msvc/README.md create mode 100644 crates/node_binding/npm/win32-ia32-msvc/package.json diff --git a/crates/node_binding/npm/win32-ia32-msvc/README.md b/crates/node_binding/npm/win32-ia32-msvc/README.md new file mode 100644 index 0000000..7cc8b7c --- /dev/null +++ b/crates/node_binding/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `@ice/pack-binding-win32-ia32-msvc` + +This is the **i686-pc-windows-msvc** binary for `@ice/pack-binding` diff --git a/crates/node_binding/npm/win32-ia32-msvc/package.json b/crates/node_binding/npm/win32-ia32-msvc/package.json new file mode 100644 index 0000000..afbc03f --- /dev/null +++ b/crates/node_binding/npm/win32-ia32-msvc/package.json @@ -0,0 +1,21 @@ +{ + "name": "@ice/pack-binding-win32-ia32-msvc", + "version": "0.0.1", + "os": [ + "win32" + ], + "cpu": [ + "i686" + ], + "main": "pack-binding.win32-ia32-msvc.node", + "files": [ + "pack-binding.win32-ia32-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "repository": { + "url": "https://github.com/ice-lab/icepack" + } +} \ No newline at end of file diff --git a/crates/node_binding/package.json b/crates/node_binding/package.json index c1c0f8f..457117b 100644 --- a/crates/node_binding/package.json +++ b/crates/node_binding/package.json @@ -10,7 +10,8 @@ "aarch64-apple-darwin", "aarch64-pc-windows-msvc", "x86_64-unknown-linux-musl", - "universal-apple-darwin" + "universal-apple-darwin", + "i686-pc-windows-msvc" ] } }, From 449d13a82a5e0ac476b0db7eca0b51b85bd66a15 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 09:48:49 +0800 Subject: [PATCH 07/11] fix: add npm target --- .../npm/linux-arm64-gnu/README.md | 3 +++ .../npm/linux-arm64-gnu/package.json | 24 +++++++++++++++++++ .../npm/linux-arm64-musl/README.md | 3 +++ .../npm/linux-arm64-musl/package.json | 24 +++++++++++++++++++ crates/node_binding/package.json | 2 ++ 5 files changed, 56 insertions(+) create mode 100644 crates/node_binding/npm/linux-arm64-gnu/README.md create mode 100644 crates/node_binding/npm/linux-arm64-gnu/package.json create mode 100644 crates/node_binding/npm/linux-arm64-musl/README.md create mode 100644 crates/node_binding/npm/linux-arm64-musl/package.json diff --git a/crates/node_binding/npm/linux-arm64-gnu/README.md b/crates/node_binding/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000..985fc64 --- /dev/null +++ b/crates/node_binding/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@ice/pack-binding-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@ice/pack-binding` diff --git a/crates/node_binding/npm/linux-arm64-gnu/package.json b/crates/node_binding/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000..63259fe --- /dev/null +++ b/crates/node_binding/npm/linux-arm64-gnu/package.json @@ -0,0 +1,24 @@ +{ + "name": "@ice/pack-binding-linux-arm64-gnu", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "pack-binding.linux-arm64-gnu.node", + "files": [ + "pack-binding.linux-arm64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ], + "repository": { + "url": "https://github.com/ice-lab/icepack" + } +} \ No newline at end of file diff --git a/crates/node_binding/npm/linux-arm64-musl/README.md b/crates/node_binding/npm/linux-arm64-musl/README.md new file mode 100644 index 0000000..6537949 --- /dev/null +++ b/crates/node_binding/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `@ice/pack-binding-linux-arm64-musl` + +This is the **arm64-unknown-linux-musl** binary for `@ice/pack-binding` diff --git a/crates/node_binding/npm/linux-arm64-musl/package.json b/crates/node_binding/npm/linux-arm64-musl/package.json new file mode 100644 index 0000000..38bdeec --- /dev/null +++ b/crates/node_binding/npm/linux-arm64-musl/package.json @@ -0,0 +1,24 @@ +{ + "name": "@ice/pack-binding-linux-arm64-musl", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "pack-binding.linux-arm64-musl.node", + "files": [ + "pack-binding.linux-arm64-musl.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "musl" + ], + "repository": { + "url": "https://github.com/ice-lab/icepack" + } +} \ No newline at end of file diff --git a/crates/node_binding/package.json b/crates/node_binding/package.json index 457117b..1371861 100644 --- a/crates/node_binding/package.json +++ b/crates/node_binding/package.json @@ -10,6 +10,8 @@ "aarch64-apple-darwin", "aarch64-pc-windows-msvc", "x86_64-unknown-linux-musl", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", "universal-apple-darwin", "i686-pc-windows-msvc" ] From ef581d074ffd35b994e6ef472ec176fb7c33345b Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 10:04:51 +0800 Subject: [PATCH 08/11] fix: ci --- .cargo/config.toml | 8 ++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 9178b3e..b898f05 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -50,3 +50,11 @@ rustflags = ["-C", "target-feature=+crt-static"] [target.x86_64-apple-darwin] rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"] + +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc" +rustflags = ["-C", "target-feature=-crt-static"] + +[target.aarch64-unknown-linux-gnu] +linker = "/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc" +rustflags = ["-C", "target-feature=-crt-static"] \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27ccee0..3691677 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -122,7 +122,7 @@ jobs: target/ key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} - uses: goto-bus-stop/setup-zig@v2 - if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'aarch64-unknown-linux-gnu' || matrix.settings.target == 'aarch64-unknown-linux-musl' }} + if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} with: version: 0.10.1 From e79f2603545d8daeeeb5bfbe0c3d882894286488 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 10:12:31 +0800 Subject: [PATCH 09/11] fix: test simple ci --- .github/workflows/release.yml | 94 +++++++++++++++++------------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3691677..1932b8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,53 +24,53 @@ jobs: fail-fast: false matrix: settings: - - host: macos-latest - name: darwin-x64 - target: x86_64-apple-darwin - build: | - cd crates/node_binding - pnpm build --target x86_64-apple-darwin - strip -x *.node - - host: macos-latest - name: darwin-arm64 - target: aarch64-apple-darwin - build: | - cd crates/node_binding - pnpm build --target aarch64-apple-darwin - strip -x *.node - - host: windows-latest - name: win32-x64-msvc - target: x86_64-pc-windows-msvc - build: | - cd crates/node_binding - pnpm build --target x86_64-pc-windows-msvc - - host: windows-latest - target: aarch64-pc-windows-msvc - name: win32-arm64-msvc - build: | - cd crates/node_binding - pnpm build --target aarch64-pc-windows-msvc - - host: windows-latest - target: i686-pc-windows-msvc - name: win32-ia32-msvc - build: | - cd crates/node_binding - pnpm build --target i686-pc-windows-msvc - - host: ubuntu-latest - target: x86_64-unknown-linux-gnu - name: linux-x64-gnu - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - build: |- - set -e && - cd crates/node_binding && - unset CC_x86_64_unknown_linux_gnu && unset CC && - pnpm build --target x86_64-unknown-linux-gnu && - strip *.node - - host: ubuntu-latest - name: linux-x64-musl - target: x86_64-unknown-linux-musl - docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - build: cd crates/node_binding && set -e && pnpm build && strip *.node + # - host: macos-latest + # name: darwin-x64 + # target: x86_64-apple-darwin + # build: | + # cd crates/node_binding + # pnpm build --target x86_64-apple-darwin + # strip -x *.node + # - host: macos-latest + # name: darwin-arm64 + # target: aarch64-apple-darwin + # build: | + # cd crates/node_binding + # pnpm build --target aarch64-apple-darwin + # strip -x *.node + # - host: windows-latest + # name: win32-x64-msvc + # target: x86_64-pc-windows-msvc + # build: | + # cd crates/node_binding + # pnpm build --target x86_64-pc-windows-msvc + # - host: windows-latest + # target: aarch64-pc-windows-msvc + # name: win32-arm64-msvc + # build: | + # cd crates/node_binding + # pnpm build --target aarch64-pc-windows-msvc + # - host: windows-latest + # target: i686-pc-windows-msvc + # name: win32-ia32-msvc + # build: | + # cd crates/node_binding + # pnpm build --target i686-pc-windows-msvc + # - host: ubuntu-latest + # target: x86_64-unknown-linux-gnu + # name: linux-x64-gnu + # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + # build: |- + # set -e && + # cd crates/node_binding && + # unset CC_x86_64_unknown_linux_gnu && unset CC && + # pnpm build --target x86_64-unknown-linux-gnu && + # strip *.node + # - host: ubuntu-latest + # name: linux-x64-musl + # target: x86_64-unknown-linux-musl + # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + # build: cd crates/node_binding && set -e && pnpm build && strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu name: linux-arm64-gnu From 6897ab2acd53b3add4cc44fd2aae395135bf56ed Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 10:17:20 +0800 Subject: [PATCH 10/11] fix: test ci --- .cargo/config.toml | 8 -------- .github/workflows/release.yml | 2 -- 2 files changed, 10 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index b898f05..9178b3e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -50,11 +50,3 @@ rustflags = ["-C", "target-feature=+crt-static"] [target.x86_64-apple-darwin] rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"] - -[target.aarch64-unknown-linux-musl] -linker = "aarch64-linux-musl-gcc" -rustflags = ["-C", "target-feature=-crt-static"] - -[target.aarch64-unknown-linux-gnu] -linker = "/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc" -rustflags = ["-C", "target-feature=-crt-static"] \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1932b8d..4a1e5de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,6 @@ jobs: build: |- set -e && cd crates/node_binding && - export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && rustup target add aarch64-unknown-linux-gnu && pnpm build --target aarch64-unknown-linux-gnu && aarch64-unknown-linux-gnu-strip *.node @@ -89,7 +88,6 @@ jobs: build: |- set -e && cd crates/node_binding && - export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc && rustup target add aarch64-unknown-linux-musl && pnpm build --target aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node From 6e595f95699f12a5508fef069b716ec1c6d63948 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 10:21:44 +0800 Subject: [PATCH 11/11] fix: test ci --- .github/workflows/release.yml | 98 ++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a1e5de..26ca7ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ permissions: on: push: branches: - - fix/ci + - master tags-ignore: - '**' paths-ignore: @@ -24,53 +24,53 @@ jobs: fail-fast: false matrix: settings: - # - host: macos-latest - # name: darwin-x64 - # target: x86_64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build --target x86_64-apple-darwin - # strip -x *.node - # - host: macos-latest - # name: darwin-arm64 - # target: aarch64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build --target aarch64-apple-darwin - # strip -x *.node - # - host: windows-latest - # name: win32-x64-msvc - # target: x86_64-pc-windows-msvc - # build: | - # cd crates/node_binding - # pnpm build --target x86_64-pc-windows-msvc - # - host: windows-latest - # target: aarch64-pc-windows-msvc - # name: win32-arm64-msvc - # build: | - # cd crates/node_binding - # pnpm build --target aarch64-pc-windows-msvc - # - host: windows-latest - # target: i686-pc-windows-msvc - # name: win32-ia32-msvc - # build: | - # cd crates/node_binding - # pnpm build --target i686-pc-windows-msvc - # - host: ubuntu-latest - # target: x86_64-unknown-linux-gnu - # name: linux-x64-gnu - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - # build: |- - # set -e && - # cd crates/node_binding && - # unset CC_x86_64_unknown_linux_gnu && unset CC && - # pnpm build --target x86_64-unknown-linux-gnu && - # strip *.node - # - host: ubuntu-latest - # name: linux-x64-musl - # target: x86_64-unknown-linux-musl - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - # build: cd crates/node_binding && set -e && pnpm build && strip *.node + - host: macos-latest + name: darwin-x64 + target: x86_64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target x86_64-apple-darwin + strip -x *.node + - host: macos-latest + name: darwin-arm64 + target: aarch64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target aarch64-apple-darwin + strip -x *.node + - host: windows-latest + name: win32-x64-msvc + target: x86_64-pc-windows-msvc + build: | + cd crates/node_binding + pnpm build --target x86_64-pc-windows-msvc + - host: windows-latest + target: aarch64-pc-windows-msvc + name: win32-arm64-msvc + build: | + cd crates/node_binding + pnpm build --target aarch64-pc-windows-msvc + - host: windows-latest + target: i686-pc-windows-msvc + name: win32-ia32-msvc + build: | + cd crates/node_binding + pnpm build --target i686-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + name: linux-x64-gnu + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + build: |- + set -e && + cd crates/node_binding && + unset CC_x86_64_unknown_linux_gnu && unset CC && + pnpm build --target x86_64-unknown-linux-gnu && + strip *.node + - host: ubuntu-latest + name: linux-x64-musl + target: x86_64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: cd crates/node_binding && set -e && pnpm build && strip *.node - host: ubuntu-latest target: aarch64-unknown-linux-gnu name: linux-arm64-gnu @@ -78,6 +78,7 @@ jobs: build: |- set -e && cd crates/node_binding && + export JEMALLOC_SYS_WITH_LG_PAGE=16 && export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && rustup target add aarch64-unknown-linux-gnu && pnpm build --target aarch64-unknown-linux-gnu && aarch64-unknown-linux-gnu-strip *.node @@ -88,6 +89,7 @@ jobs: build: |- set -e && cd crates/node_binding && + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc && rustup target add aarch64-unknown-linux-musl && pnpm build --target aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node