diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e9e5e8..26ca7ab 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-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 @@ -43,24 +64,35 @@ 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 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 && + rustup target add aarch64-unknown-linux-gnu && + pnpm build --target aarch64-unknown-linux-gnu && + 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 && + rustup target add aarch64-unknown-linux-musl && + pnpm build --target aarch64-unknown-linux-musl && + /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} steps: 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/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..1371861 100644 --- a/crates/node_binding/package.json +++ b/crates/node_binding/package.json @@ -10,7 +10,10 @@ "aarch64-apple-darwin", "aarch64-pc-windows-msvc", "x86_64-unknown-linux-musl", - "universal-apple-darwin" + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "universal-apple-darwin", + "i686-pc-windows-msvc" ] } },