-
Notifications
You must be signed in to change notification settings - Fork 505
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup-go does not work on macos-14 (M1) #454
Comments
Hello @Le0Developer |
The action should be using the darwin-arm64 ? @Le0Developer have you tried specifying a version? According to the official docs the arm64 m1 based images do not come with golang preinstalled. Source: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md Try the following and it should work: jobs:
build:
name: Build on macOS 14 (M1)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.x'
check-latest: true
- run: go run hello.go |
@HarithaVattikuti This action should default to installing the latest Golang on darwin platforms. |
🤔 how should this action behaviour in general when Golang is not installed in the system and not version is given. At the moment: the line Line 65 in 6c1fd22
goPath == '' and run:
cp.execSync(` version`) Resulting in the rather unclear error In this case I suppose the action could:
|
I'd expect setup-go to setup go, regardless of if it's already installed or not.
That does work! I was expecting it to default to the latest version, but that works! |
Hello @Le0Developer, Apologies for the delay in the response and we have investigated the issue and we are able to reproduce the error with go-version input was not specified in the workflow file. The go-version input should specify the version of Go that we want to set up. If it's not provided, the action tries to use a pre-installed version, which seems to be failing. Here is an example of how to specify the go-version input:
Thank you for the confirmation and we have checked your workflow and the action is successful after adding the go-version. To set up the latest stable version of Go, you can use the @latest version specifier in your workflow file:
Proceeding to close this as the issue resolved with go-version. Please feel free to reach us in case of any further clarifications to reopen this issue. |
According to actions/setup-go#454 this should resolve the issues installing go in the macos workflows
Description:
actions/setup-go
is erroring when used onmacos-14
(M1 runners)Action version:
v5
Platform:
Runner type:
Tools version:
Repro steps:
https://github.com/Le0Developer/go-setup-macos-14
Expected behavior:
Should build & print hello world.
Actual behavior:
The text was updated successfully, but these errors were encountered: