Skip to content
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

chore: update go version to enable darwin/arm64 (m1) support #787

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

remyleone
Copy link
Member

Archive from @bflad

You may have noticed that Go 1.16 released yesterday and includes support for the new Apple M1 (“silicon”) hardware via a new release platform: darwin/arm64. If you are using goreleaser for provider releases, allow it to use the latest goreleaser version (most common), and update the release process to use Go 1.16, it will automatically include the new platform in releases. The Terraform Registry should ingress and serve them just fine, but please note that native Terraform CLI support for darwin/arm64 can be tracked in hashicorp/terraform#27257 which will be updated with our timelines to prevent confusing errors for practitioners while the provider ecosystem starts rolling out this new platform.
One caveat to the typical goreleaser configuration for releases is that if you do not update to Go 1.16, it will still try to build on the unsupported platform (for the older Go versions). Example error:

   ⨯ release failed after 16.92s error=failed to build for darwin_arm64: # github.com/example/terraform-provider-example
/opt/hostedtoolcache/go/1.15.8/x64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-710842256/go.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status

You can choose one of these options remediate this:
Update the provider codebase and .github/workflows/release.yml to Go 1.16
Pin the goreleaser version in your .github/workflows/release.yml to v0.155.0

      -
        name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v2
        with:
          version: v0.155.0
          args: ...

Ignore the new platform in .goreleaser.yml under builds

ignore:
  - goos: darwin
    goarch: arm64

@bflad
Copy link

bflad commented Feb 24, 2021

Drive-by note: You may want to double check that other places in the codebase are verifying Go 1.16 support before attempting a release, e.g. other GitHub Actions workflows such as

Copy link
Contributor

@kindermoumoute kindermoumoute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@remyleone remyleone merged commit c1ca6bf into scaleway:master Mar 10, 2021
@remyleone remyleone deleted the update_release_action branch March 10, 2021 12:42
@remyleone remyleone added the apple-silicon Apple Silicon issues, bugs and feature requests label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple-silicon Apple Silicon issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants