Skip to content

Commit 59dd402

Browse files
committed
build: add linux arm64 prebuilt package release support
1 parent aff43e0 commit 59dd402

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/release-prebuilt-npm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
include:
32+
- package_name: hunkdiff-linux-arm64
33+
runner: ubuntu-24.04-arm
3234
- package_name: hunkdiff-linux-x64
3335
runner: ubuntu-latest
3436
- package_name: hunkdiff-darwin-x64

scripts/prebuilt-package-helpers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ export const PLATFORM_PACKAGE_MATRIX: PlatformPackageSpec[] = [
4141
binaryName: "hunk",
4242
binaryRelativePath: "bin/hunk",
4343
},
44+
{
45+
packageName: "hunkdiff-linux-arm64",
46+
os: "linux",
47+
cpu: "arm64",
48+
binaryName: "hunk",
49+
binaryRelativePath: "bin/hunk",
50+
},
4451
{
4552
packageName: "hunkdiff-linux-x64",
4653
os: "linux",

test/prebuilt-package-helpers.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ describe("prebuilt package helpers", () => {
6868
expect(() => getPlatformPackageSpecForHost("linux", "ia32" as NodeJS.Architecture)).toThrow(
6969
"Unsupported host architecture for prebuilt packaging: ia32",
7070
);
71-
expect(() => getPlatformPackageSpecForHost("linux", "arm64")).toThrow(
72-
"No published prebuilt package spec matches linux/arm64",
71+
expect(getPlatformPackageSpecForHost("linux", "arm64").packageName).toBe(
72+
"hunkdiff-linux-arm64",
7373
);
7474
});
7575

@@ -84,6 +84,7 @@ describe("prebuilt package helpers", () => {
8484
expect(sortPlatformPackageSpecs(reversed).map((spec) => spec.packageName)).toEqual([
8585
"hunkdiff-darwin-arm64",
8686
"hunkdiff-darwin-x64",
87+
"hunkdiff-linux-arm64",
8788
"hunkdiff-linux-x64",
8889
]);
8990
});

0 commit comments

Comments
 (0)