Skip to content

Commit eeaf8f3

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

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
include:
7070
- os: windows-2019
7171
arch: -386
72+
- os: macos-12
73+
arch: -arm64
7274

7375
defaults:
7476
run:
@@ -119,13 +121,21 @@ jobs:
119121
run: task go:build-win # GOARCH=amd64 by default on the runners
120122
if: runner.os == 'Windows' && matrix.arch == '-amd64'
121123

122-
- name: Build the Agent for macos
124+
- name: Build the Agent for macos amd 64
123125
env:
124126
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
125127
CGO_CFLAGS: -mmacosx-version-min=10.15
126128
CGO_LDFLAGS: -mmacosx-version-min=10.15
127129
run: task go:build
128-
if: runner.os == 'macOS'
130+
if: runner.os == 'macOS' && matrix.arch == '-amd64'
131+
132+
- name: Build the Agent for macos arm64
133+
env:
134+
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
135+
CGO_CFLAGS: -mmacosx-version-min=10.15
136+
CGO_LDFLAGS: -mmacosx-version-min=10.15
137+
run: task go:build-macos-arm64
138+
if: runner.os == 'macOS' && matrix.arch == '-arm64'
129139

130140
- name: Upload artifacts
131141
uses: actions/upload-artifact@v4

Taskfile.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ tasks:
4040
PROJECT_NAME: arduino-create-agent_cli
4141
ADDITIONAL_FLAGS: -tags cli
4242

43+
go:build-macos-arm64:
44+
desc: Build the project for macOS arm64
45+
env:
46+
GOOS: "darwin"
47+
GOARCH: "arm64"
48+
cmds:
49+
- task: go:build
50+
4351
go:build-win:
4452
desc: Build the project for win, to build 32bit `export GOARCH=386` and for 64 bit `export GOARCH=amd64` before `task build-win`
4553
cmds:
@@ -84,7 +92,7 @@ tasks:
8492
cmds:
8593
- poetry run pytest tests
8694

87-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
95+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
8896
poetry:install-deps:
8997
desc: Install dependencies managed by Poetry
9098
cmds:
@@ -138,7 +146,6 @@ tasks:
138146
- task: go:vet
139147
- task: go:lint
140148

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

0 commit comments

Comments
 (0)