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

Add support for ARMv6 & ARMv7 builds (for Raspberry Pi) #339

Merged
merged 3 commits into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: goreleaser/goreleaser-action@5df302e5e9e4c66310a6b6493a8865b12c555af2
with:
distribution: goreleaser
version: v0.176.0
version: v0.184.0
args: release --rm-dist --release-notes=tmp/release_changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ jobs:
uses: goreleaser/goreleaser-action@5df302e5e9e4c66310a6b6493a8865b12c555af2
with:
distribution: goreleaser
version: v0.176.0
version: v0.184.0
args: build --snapshot --rm-dist --skip-post-hooks --skip-validate
65 changes: 65 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,40 @@ builds:
ignore:
- goos: windows
goarch: arm64
- goarch: arm

ldflags:
- -s -w -X github.com/Shopify/toxiproxy/v2.Version={{.Version}}

- <<: *build_default
id: server-arm
goarch:
- arm
goarm:
- 6
- 7
ignore:
- goos: windows
goarch: arm
binary: toxiproxy-server-{{.Os}}-{{.Arch}}v{{.Arm}}

- &build_client
<<: *build_default
id: client
main: ./cmd/cli
binary: toxiproxy-cli-{{.Os}}-{{.Arch}}

- <<: *build_client
id: client-arm
goarch:
- arm
goarm:
- 6
- 7
ignore:
- goos: windows
goarch: arm
binary: toxiproxy-cli-{{.Os}}-{{.Arch}}v{{.Arm}}

- <<: *build_default
id: pkg-server
Expand Down Expand Up @@ -122,18 +147,58 @@ dockers:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
- <<: *docker
goarch: arm
goarm: 7
image_templates:
- ghcr.io/shopify/toxiproxy:{{ .Version }}-armv7
- ghcr.io/shopify/toxiproxy:v{{ .Major }}-armv7
- ghcr.io/shopify/toxiproxy:v{{ .Major }}.{{ .Minor }}-armv7
build_flag_templates:
- --platform=linux/arm/v6
- --no-cache
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/Shopify/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/Shopify/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
- <<: *docker
goarch: arm
goarm: 6
image_templates:
- ghcr.io/shopify/toxiproxy:{{ .Version }}-armv6
- ghcr.io/shopify/toxiproxy:v{{ .Major }}-armv6
- ghcr.io/shopify/toxiproxy:v{{ .Major }}.{{ .Minor }}-armv6
build_flag_templates:
- --platform=linux/arm/v6
- --no-cache
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/Shopify/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/Shopify/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT

docker_manifests:
-
name_template: ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-armv6
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-armv7
-
name_template: ghcr.io/shopify/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-armv6
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-armv7

changelog:
sort: asc
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* client.Populate assign client to proxy. (#291, @hellodudu)
* fix: The release-test task is always success.
add: Allow to run release-test on arm machines. (#340, @miry)
* Upgrade `goreleaser`. Support `armv7` and `armv6` oses. (#339, @mitchellrj)

# [2.2.0]

Expand Down