Skip to content

Commit 0b61281

Browse files
authored
[skip changelog] Use compatible runner for macOS Apple Silicon nightly builds (#3007)
The `docker.elastic.co/beats-dev/golang-crossbuild:1.24.4-darwin-arm64-debian10` container is used for the release builds for the macOS Apple Silicon host. This container will only run on hosts of the linux/arm64 architecture. The GitHub Actions runner machine previously used to perform the release builds is of the linux/amd64 architecture and so is not compatible with the container. This caused the release builds to fail: ``` Status: Downloaded newer image for docker.elastic.co/beats-dev/golang-crossbuild:1.24.4-darwin-arm64-debian10 WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested exec /crossbuild: exec format error task: Failed to run task "dist:macOS_ARM64": exit status 255 ``` The failure is resolved by configuring the release workflows to use the `ubuntu-24.04-arm` runner machine that is compatible with the container. This was already done for the release and tester build workflows, but the fix was not applied to the nightly build workflow at that time. It is standard practice to use the "latest" GitHub Actions runner identifiers in the project's workflows, which causes the workflow runs to always use the newest stable runner version. However, GitHub has broken from this established convention by choosing to not provide "latest" identifiers for the Linux ARM runners. For this reason, the version-specific runner name was used in the workflow. It will be necessary to manually update the runner name as new stable versions are made available (or more likely after GitHub's removal of the runner in use breaks the workflows).
1 parent d5ef61d commit 0b61281

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

.github/workflows/publish-go-nightly-task.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,34 @@ permissions:
2525

2626
jobs:
2727
create-nightly-artifacts:
28+
name: Build ${{ matrix.os.task }}
2829
outputs:
2930
version: ${{ steps.get-version.outputs.version }}
30-
runs-on: ubuntu-latest
31+
runs-on: ${{ matrix.os.runner }}
3132

3233
strategy:
3334
matrix:
3435
os:
35-
- Windows_32bit
36-
- Windows_64bit
37-
- Linux_32bit
38-
- Linux_64bit
39-
- Linux_ARMv6
40-
- Linux_ARMv7
41-
- Linux_ARM64
42-
- macOS_64bit
43-
- macOS_ARM64
44-
- jsonschema
36+
- task: Windows_32bit
37+
runner: ubuntu-latest
38+
- task: Windows_64bit
39+
runner: ubuntu-latest
40+
- task: Linux_32bit
41+
runner: ubuntu-latest
42+
- task: Linux_64bit
43+
runner: ubuntu-latest
44+
- task: Linux_ARMv6
45+
runner: ubuntu-latest
46+
- task: Linux_ARMv7
47+
runner: ubuntu-latest
48+
- task: Linux_ARM64
49+
runner: ubuntu-latest
50+
- task: macOS_64bit
51+
runner: ubuntu-latest
52+
- task: macOS_ARM64
53+
runner: ubuntu-24.04-arm
54+
- task: jsonschema
55+
runner: ubuntu-latest
4556

4657
steps:
4758
- name: Checkout repository
@@ -56,7 +67,7 @@ jobs:
5667
- name: Build
5768
env:
5869
NIGHTLY: true
59-
run: task dist:${{ matrix.os }}
70+
run: task dist:${{ matrix.os.task }}
6071

6172
- name: Output Version
6273
id: get-version
@@ -68,7 +79,7 @@ jobs:
6879
uses: actions/upload-artifact@v4
6980
with:
7081
if-no-files-found: error
71-
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os }}
82+
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os.task }}
7283
path: ${{ env.DIST_DIR }}
7384

7485
notarize-macos:

0 commit comments

Comments
 (0)