Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Create a single universal executable for macOS#964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions.github/workflows/publish-go-tester-task.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@ on:
repository_dispatch:

env:
PROJECT_NAME: arduino-create-agent
GO_VERSION: "1.21"

jobs:
Expand DownExpand Up@@ -119,18 +120,38 @@ jobs:
run: task go:build-win # GOARCH=amd64 by default on the runners
if: runner.os == 'Windows' && matrix.arch == '-amd64'

- name: Build the Agent for macos
- name: Build the Agent for macos amd 64
env:
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
run: task go:build
run: |
task go:build
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64
if: runner.os == 'macOS'

- name: Build the Agent for macos amd 64
env:
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
GOARCH: arm64
CGO_ENABLED: 1
run: |
task go:build
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_arm64
if: runner.os == 'macOS'

- name: Create universal macos executable
run: |
lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
rm ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
if: runner.os == 'macOS'

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name:arduino-create-agent-${{ matrix.os }}${{ matrix.arch }}
name:${{ env.PROJECT_NAME}}-${{ matrix.os }}${{ matrix.arch }}
path: |
arduino-create-agent*
${{ env.PROJECT_NAME}}*
if-no-files-found: error
25 changes: 22 additions & 3 deletions.github/workflows/release.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -107,21 +107,40 @@ jobs:
run: task go:build-win # GOARCH=amd64 by default on the runners
if: matrix.os == 'windows-2019' && matrix.arch == 'amd64'

- name: Build the Agent for macos
- name: Build the Agent for macos amd64
env:
CGO_ENABLED: 1
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
run: task go:build
run: |
task go:build
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64
if: matrix.os == 'macos-12'

- name: Build the Agent for macos arm64
env:
CGO_ENABLED: 1
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
GOARCH: arm64
run: |
task go:build
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_arm64
if: matrix.os == 'macos-12'

- name: Create universal macos executable
run: |
lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64
rm ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64
if: matrix.os == 'macos-12'

# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
- name: Create autoupdate files
run: go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
if: matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'

# for now we do not distribute m1 build, this is a workaround for now
- name: Copy autoupdate file for darwin-arm64 (m1 arch)
working-directory: public/
run: |
Expand Down
4 changes: 2 additions & 2 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@ Get the [latest version](https://github.com/arduino/arduino-create-agent/release
## Apple silicon support

The Arduino Agent is supported both on Intel and Apple silicon computers. This includes devices with the M1, M2 and M3 processors.
At the moment theArduino Agent isonlybuilt for Intel architectures, but Apple silicon devices can run it thanks to the [Rosetta 2](https://support.apple.com/en-us/HT211861) translation layer by Apple.
TheArduino Agent is builtbothfor Intel architectures and Apple silicon devices, but distributed as a single universal executable for macOS.

## Documentation

Expand All@@ -50,7 +50,7 @@ The documentation has been moved to the [wiki](https://github.com/arduino/arduin

### Submitting an issue

When submitting a new issue please search for duplicates before creating a new one. Help us by providinguseful context and information. Please attach the output of the commands running at the debug console or attach [crash reports](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality) if useful.
When submitting a new issue please search for duplicates before creating a new one. Help us by providing useful context and information. Please attach the output of the commands running at the debug console or attach [crash reports](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality) if useful.

#### Security

Expand Down
3 changes: 1 addition & 2 deletionsTaskfile.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,7 +84,7 @@ tasks:
cmds:
- poetry run pytest tests

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


vars:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/release-go-task/Taskfile.yml
PROJECT_NAME: arduino-create-agent
Expand Down
2 changes: 1 addition & 1 deletionupdater/updater_darwin.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -143,7 +143,7 @@ func checkForUpdates(currentVersion string, updateURL string, cmdName string) (s

// Install new app
logrus.WithField("from", tmpAppPath).WithField("to", currentAppPath).Info("Copying updated app")
if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil {
if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil|| !paths.New(executablePath).Exist(){
// Try rollback changes
_ = currentAppPath.RemoveAll()
_ = oldAppPath.Rename(currentAppPath)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp