Skip to content

Commit 065938b

Browse files
committed
ci: Fix packaging for arm64-linux in release assets
1 parent e16fd68 commit 065938b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ jobs:
6363
matrix:
6464
node-version: [12, 14, 16, 17]
6565
target: ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu"]
66+
include:
67+
- target: aarch64-unknown-linux-gnu
68+
# We use cross for this type, it's why we need to override package
69+
package_target_arch: arm64
70+
package_target_platform: linux
71+
package_target_libc: glibc
6672
fail-fast: false
6773
container:
6874
image: cubejs/rust-cross:${{ matrix.target }}-10052021
@@ -104,6 +110,9 @@ jobs:
104110
- name: Build native
105111
env:
106112
CARGO_BUILD_TARGET: ${{ matrix.target }}
113+
PACKAGE_TARGET_ARCH: ${{ matrix.package_target_arch }}
114+
PACKAGE_TARGET_PLATFORM: ${{ matrix.package_target_platform }}
115+
PACKAGE_TARGET_LIBC: ${{ matrix.package_target_libc }}
107116
run: cd packages/cubejs-backend-native && npm run native:build-release
108117
- name: Upload artifact
109118
uses: nick-invision/retry@v2

packages/cubejs-backend-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"native:build-debug": "npm run native:build --",
1717
"native:build-release": "npm run native:build -- --release",
1818
"install": "node-pre-gyp install || echo 'Your system is not supported by @cubejs-backend/native, some feature will be unavailable.'",
19-
"upload-binary": "mkdir -p native && cp index.node native/index.node && node-pre-gyp package && node-pre-gyp-github publish",
19+
"upload-binary": "mkdir -p native && cp index.node native/index.node && node-pre-gyp package --target_arch=$PACKAGE_TARGET_ARCH --target_platform=$PACKAGE_TARGET_PLATFORM --target_libc=$PACKAGE_TARGET_LIBC && node-pre-gyp-github publish",
2020
"test:unit": "jest --forceExit test",
2121
"test:cargo": "cargo test"
2222
},

0 commit comments

Comments
 (0)