From c77cd6f1ea4891ae58ac3a7df403f6eb963c54f3 Mon Sep 17 00:00:00 2001 From: Apprentice-Alchemist <53486764+Apprentice-Alchemist@users.noreply.github.com> Date: Tue, 1 Jul 2025 21:18:44 +0200 Subject: [PATCH 1/2] Support ARM64 Linux --- .github/workflows/test.yml | 2 ++ dist/index.js | 9 ++++++--- src/asset.ts | 10 +++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 126ba41..0191fe2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,8 @@ jobs: - lib_hxml: lib.hxml - haxe: 3.4.7 lib_hxml: lib_haxe3.hxml + - haxe: latest + os: ubuntu-24.04-arm steps: diff --git a/dist/index.js b/dist/index.js index 7648784..2d1642e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -211,6 +211,9 @@ class NekoAsset extends Asset { if (this.env.platform === 'osx' && this.version.startsWith('2.4')) { return 'osx-universal'; } + if (this.env.platform === 'linux' && this.env.arch === 'arm64') { + return 'linux-arm64'; + } return `${this.env.platform}${this.env.arch}`; } get fileNameWithoutExt() { @@ -252,7 +255,7 @@ class HaxeAsset extends Asset { return 'mac'; } case 'linux': { - return 'linux64'; + return this.env.arch === 'arm64' ? 'linux-arm64' : 'linux64'; } case 'win': { return 'windows64'; @@ -295,8 +298,8 @@ class Env { if (arch === 'x64') { return '64'; } - if (arch === 'arm64' && this.platform === 'osx') { - return '64'; + if (arch === 'arm64') { + return this.platform === 'osx' ? '64' : 'arm64'; } throw new Error(`${arch} not supported`); } diff --git a/src/asset.ts b/src/asset.ts index 39a3894..05ca5a8 100644 --- a/src/asset.ts +++ b/src/asset.ts @@ -170,6 +170,10 @@ export class NekoAsset extends Asset { return 'osx-universal'; } + if (this.env.platform === 'linux' && this.env.arch === 'arm64') { + return 'linux-arm64'; + } + return `${this.env.platform}${this.env.arch}`; } @@ -224,7 +228,7 @@ export class HaxeAsset extends Asset { } case 'linux': { - return 'linux64'; + return this.env.arch === 'arm64' ? 'linux-arm64' : 'linux64'; } case 'win': { @@ -279,8 +283,8 @@ export class Env { return '64'; } - if (arch === 'arm64' && this.platform === 'osx') { - return '64'; + if (arch === 'arm64') { + return this.platform === 'osx' ? '64' : 'arm64'; } throw new Error(`${arch} not supported`); From 9d1527c4bb9d1d449d196a0822118692ceeac457 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Sat, 21 Feb 2026 20:29:24 +0000 Subject: [PATCH 2/2] [ci] Fix test hxml path for linux arm build --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0191fe2..62d6968 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,12 +34,14 @@ jobs: - 4.3.7 - 3.4.7 include: - - lib_hxml: lib.hxml - haxe: 3.4.7 - lib_hxml: lib_haxe3.hxml + hxml_suffix: _haxe3 - haxe: latest os: ubuntu-24.04-arm + env: + TEST_LIB_HXML: test-workflow/lib${{ matrix.hxml_suffix }}.hxml + steps: - name: Git Checkout @@ -59,11 +61,11 @@ jobs: uses: ./ with: haxe-version: ${{ matrix.haxe }} - cache-dependency-path: 'test-workflow/${{ matrix.lib_hxml }}' + cache-dependency-path: ${{ env.TEST_LIB_HXML }} - run: haxe -version - - run: haxelib install test-workflow/${{ matrix.lib_hxml }} --always + - run: haxelib install ${{ env.TEST_LIB_HXML }} --always - name: Compile test code run: |