From 282063edb568a7a43236b6eca08260691ef34a1a Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sat, 18 Jan 2025 00:12:57 +0100 Subject: [PATCH 1/3] Run linux arm64 build and release on native arm64 runners --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab9057257ce..f91213badd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: devScript: ./dev.sh - runtime: linux-arm64 - os: ubuntu-latest + os: ubuntu-24.04-arm devScript: ./dev.sh - runtime: linux-arm @@ -63,7 +63,7 @@ jobs: run: | ${{ matrix.devScript }} test working-directory: src - if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm' && matrix.runtime != 'osx-arm64' && matrix.runtime != 'win-arm64' + if: matrix.runtime != 'linux-arm' && matrix.runtime != 'osx-arm64' && matrix.runtime != 'win-arm64' # Create runner package tar.gz/zip - name: Package Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7342ccba69..ee1c854f669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: devScript: ./dev.sh - runtime: linux-arm64 - os: ubuntu-latest + os: ubuntu-24.04-arm devScript: ./dev.sh - runtime: linux-arm From 72b88ccfebcc6711164195b5928f511027769cfb Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sat, 18 Jan 2025 00:16:50 +0100 Subject: [PATCH 2/3] Add support for running JavaScript actions on Alpine Linux arm64 --- src/Runner.Worker/Handlers/StepHost.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Runner.Worker/Handlers/StepHost.cs b/src/Runner.Worker/Handlers/StepHost.cs index 1270dd90e6f..24c9d8d3212 100644 --- a/src/Runner.Worker/Handlers/StepHost.cs +++ b/src/Runner.Worker/Handlers/StepHost.cs @@ -265,11 +265,11 @@ await containerHookManager.RunScriptStepAsync(context, private string CheckPlatformForAlpineContainer(IExecutionContext executionContext, string preferredVersion) { string nodeExternal = preferredVersion; - if (!Constants.Runner.PlatformArchitecture.Equals(Constants.Architecture.X64)) + if (!Constants.Runner.PlatformArchitecture.Equals(Constants.Architecture.X64) && !Constants.Runner.PlatformArchitecture.Equals(Constants.Architecture.Arm64)) { var os = Constants.Runner.Platform.ToString(); var arch = Constants.Runner.PlatformArchitecture.ToString(); - var msg = $"JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected {os} {arch}"; + var msg = $"JavaScript Actions in Alpine containers are only supported on x64 and arm64 Linux runners. Detected {os} {arch}"; throw new NotSupportedException(msg); } nodeExternal = $"{preferredVersion}_alpine"; From c7ea81c5f5df8e76c937560ea44ad217405af983 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Sat, 18 Jan 2025 00:30:04 +0100 Subject: [PATCH 3/3] Add NODE_ALPINE_URL for arm64 in preparation for its support --- src/Misc/externals.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 2a0db24aa9e..27787271e24 100755 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -172,6 +172,7 @@ fi if [[ "$PACKAGERUNTIME" == "linux-arm64" ]]; then acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-arm64.tar.gz" node20 fix_nested_dir + acquireExternalTool "$NODE_ALPINE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-alpine-arm64.tar.gz" node20_alpine fi if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then