Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 38e50a9

Browse filesBrowse files
Add macos-arm64 to the test builds
1 parent 28152f8 commit 38e50a9
Copy full SHA for 38e50a9

File tree

Expand file treeCollapse file tree

2 files changed

+26
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+26
-6
lines changed

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

Copy file name to clipboardExpand all lines: .github/workflows/publish-go-tester-task.yml
+25-4Lines changed: 25 additions & 4 deletions
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,38 @@ 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: Build the Agent for macos amd 64
134+
env:
135+
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
136+
CGO_CFLAGS: -mmacosx-version-min=10.15
137+
CGO_LDFLAGS: -mmacosx-version-min=10.15
138+
GOARCH: arm64
139+
CGO_ENABLED: 1
140+
run: |
141+
task go:build
142+
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_arm64
143+
if: runner.os == 'macOS'
144+
145+
- name: Create universal macos executable
146+
run: |
147+
lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
148+
rm ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
128149
if: runner.os == 'macOS'
129150

130151
- name: Upload artifacts
131152
uses: actions/upload-artifact@v4
132153
with:
133-
name: arduino-create-agent-${{ matrix.os }}${{ matrix.arch }}
154+
name: ${{ env.PROJECT_NAME}}-${{ matrix.os }}${{ matrix.arch }}
134155
path: |
135-
arduino-create-agent*
156+
${{ env.PROJECT_NAME}}*
136157
if-no-files-found: error

‎Taskfile.yml

Copy file name to clipboardExpand all lines: Taskfile.yml
+1-2Lines changed: 1 addition & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.