Skip to content

Commit

Permalink
fix goreleaser build
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Dec 18, 2023
1 parent a3e3e8b commit 56bb159
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ jobs:
node-version: 18
- name: Run apt-get update
run: sudo apt-get update
- name: Install compiler
run: sudo apt-get -y install gcc clang make
- name: Install cross-compiler for linux/arm64
run: sudo apt-get -y install gcc-aarch64-linux-gnu
- name: Install make
run: sudo apt-get -y install make
- name: Install cross-compiler for windows/amd64
run: sudo apt-get -y install gcc-mingw-w64-x86-64
- name: OSXCross for CGO Support
run: |
mkdir ../../osxcross
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Context for Buildx
Expand Down
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ builds:
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags:
- -s -w -X github.com/ethpandaops/assertoor/pkg/coordinator/buildinfo.BuildRelease={{.Tag}} -X github.com/ethpandaops/assertoor/pkg/coordinator/buildinfo.BuildVersion={{.ShortCommit}}
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- goos: darwin
goarch: amd64
env:
- CC=/home/runner/work/osxcross/target/bin/o64-clang
- CXX=/home/runner/work/osxcross/target/bin/o64-clang++
- goos: darwin
goarch: arm64
env:
- CC=/home/runner/work/osxcross/target/bin/o64-clang
- CXX=/home/runner/work/osxcross/target/bin/o64-clang++
- goos: windows
goarch: amd64
env:
- CC=x86_64-w64-mingw32-cpp
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit 56bb159

Please sign in to comment.