Skip to content

Commit 4eb2f16

Browse files
Add macos-arm64 to the test builds
1 parent 6110d33 commit 4eb2f16

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

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

+13-4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
repository_dispatch:
3131

3232
env:
33+
PROJECT_NAME: arduino-create-agent
3334
GO_VERSION: "1.21"
3435

3536
jobs:
@@ -119,18 +120,26 @@ jobs:
119120
run: task go:build-win # GOARCH=amd64 by default on the runners
120121
if: runner.os == 'Windows' && matrix.arch == '-amd64'
121122

122-
- name: Build the Agent for macos
123+
- name: Build the Agent for macos amd 64
123124
env:
124125
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
125126
CGO_CFLAGS: -mmacosx-version-min=10.15
126127
CGO_LDFLAGS: -mmacosx-version-min=10.15
127-
run: task go:build
128+
run: |
129+
task go:build
130+
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64
131+
if: runner.os == 'macOS'
132+
133+
- name: Create universal macos executable
134+
run: |
135+
lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64
136+
rm ${{ env.PROJECT_NAME}}_amd64
128137
if: runner.os == 'macOS'
129138

130139
- name: Upload artifacts
131140
uses: actions/upload-artifact@v4
132141
with:
133-
name: arduino-create-agent-${{ matrix.os }}${{ matrix.arch }}
142+
name: ${{ env.PROJECT_NAME}}-${{ matrix.os }}${{ matrix.arch }}
134143
path: |
135-
arduino-create-agent*
144+
${{ env.PROJECT_NAME}}*
136145
if-no-files-found: error

Taskfile.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tasks:
8484
cmds:
8585
- poetry run pytest tests
8686

87-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
87+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
8888
poetry:install-deps:
8989
desc: Install dependencies managed by Poetry
9090
cmds:
@@ -138,7 +138,6 @@ tasks:
138138
- task: go:vet
139139
- task: go:lint
140140

141-
142141
vars:
143142
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/release-go-task/Taskfile.yml
144143
PROJECT_NAME: arduino-create-agent

0 commit comments

Comments
 (0)