Skip to content

Commit

Permalink
Utilize the gcc-aarch64-linux-gnu toolchain to cross-arch compile on …
Browse files Browse the repository at this point in the history
…amd64 Linux machines
  • Loading branch information
mmizutani committed Oct 2, 2023
1 parent dce9a96 commit 78a3521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install sqlite3
sudo apt-get install sqlite3 gcc-aarch64-linux-gnu
- name: Install aws-cli
uses: isbang/[email protected]
Expand Down
27 changes: 7 additions & 20 deletions .goreleaser/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ before:
- go mod tidy
builds:
-
id: tbls-linux-amd64
id: tbls-linux
flags:
- -a
- -tags
Expand All @@ -21,26 +21,13 @@ builds:
- linux
goarch:
- amd64
-
id: tbls-linux-arm64
flags:
- -a
- -tags
- netgo
- -installsuffix
- netgo
ldflags:
- -s -w -X github.com/k1LoW/tbls.version={{.Version}} -X github.com/k1LoW/tbls.commit={{.FullCommit}} -X github.com/k1LoW/tbls.date={{.Date}} -X github.com/k1LoW/tbls/version.Version={{.Version}}
- -linkmode external
- -extldflags '-static'
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
goos:
- linux
goarch:
- arm64
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
archives:
-
id: tbls-archive
Expand Down

0 comments on commit 78a3521

Please sign in to comment.