Skip to content

Commit

Permalink
Merge pull request #428 from CodeLieutenant/feat/arm-builds
Browse files Browse the repository at this point in the history
feature(releaser): better goreleaser with arm support and optimized AMD64
  • Loading branch information
dkropachev authored Oct 1, 2024
2 parents 37f972f + 9b11be2 commit 4d348b9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
with:
go-version: '1.23'

# Needed for ARM64 Docker builds
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down
61 changes: 54 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,44 @@ version: 2

env:
- GO111MODULE=on
# ARM crypto extension for RANDOM Number generation
- GOARM64=v8.0,crypto
- CFLAGS="-O3"
- CXXFLAGS="-O3"

before:
hooks:
- go mod download

builds:
- id: gemini
ldflags: -s -w
main: ./cmd/gemini
env:
- env:
- CGO_ENABLED=0
goos:
- linux
ldflags: -s -w
goarch:
- amd64
- arm64
main: ./cmd/gemini
goamd64:
- v3 # v3 Enables AMD64 SIMD (SSE4.x,AVX2) optimizations

archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
files:
- README.md
- CHANGELOG.md
- LICENSE

source:
enabled: true
format: 'tar.gz'

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: '{{ .Tag }}-next'
version_template: '{{ .Tag }}-next'

changelog:
sort: asc
Expand All @@ -35,5 +50,37 @@ changelog:

dockers:
- image_templates:
- scylladb/gemini:{{ .Version }}
- scylladb/gemini:latest
- scylladb/gemini:{{ .Version }}-amd64
goarch: amd64
goamd64: v3
goos: linux
id: gemini-amd64
build_flag_templates:
- '--platform=linux/amd64'

- image_templates:
- scylladb/gemini:{{ .Version }}-arm64v8
goarch: arm64
id: gemini-arm
goos: linux
build_flag_templates:
- '--platform=linux/arm64/v8'

docker_manifests:
- name_template: 'scylladb/gemini:{{ .Version }}'
skip_push: false
image_templates:
- 'scylladb/gemini:{{ .Version }}-amd64'
- 'scylladb/gemini:{{ .Version }}-arm64v8'

- name_template: 'scylladb/gemini:latest'
skip_push: false
image_templates:
- 'scylladb/gemini:{{ .Version }}-amd64'
- 'scylladb/gemini:{{ .Version }}-arm64v8'

release:
mode: keep-existing
make_latest: true
prerelease: auto
skip_upload: false
2 changes: 1 addition & 1 deletion cmd/gemini/Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.8.7
v1.8.8

0 comments on commit 4d348b9

Please sign in to comment.