Skip to content

Commit

Permalink
CI: Build i686 and aarch64 binaries on release
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <[email protected]>
  • Loading branch information
thetredev committed Oct 2, 2023
1 parent 9a25945 commit 33102ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ jobs:
- name: Build binaries
env:
TAG_NAME: ${{ steps.branch_name.outputs.TAG_NAME }}
CGO_ENABLED: 0
GOOS: linux
# currently only amd64 is supported
GOARCH: amd64
run: ./build.sh
run: |
./scripts/build.sh
./scripts/checksums.sh
- name: Create release and upload binaries
uses: softprops/action-gh-release@v1
Expand Down
15 changes: 15 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

export CGO_ENABLED=0
export GOOS=linux

BUILD_ARCHITECTURES="amd64/x86_64 386/i686 arm64/aarch64"

go get

for build_arch in ${BUILD_ARCHITECTURES}; do
export GOARCH=$(echo "${build_arch}" | cut -d '/' -f 1)
void_arch=$(echo "${build_arch}" | cut -d '/' -f 2)

go build -ldflags="-extldflags=-static" -o bin/xdeb-install-linux-${void_arch}
done
3 changes: 0 additions & 3 deletions build.sh → scripts/checksums.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash

go get
go build -ldflags="-extldflags=-static" -o bin/xdeb-install-linux-$(uname -m)

echo "# What's Changed" > bin/checksums.md
echo >> bin/checksums.md

Expand Down

0 comments on commit 33102ef

Please sign in to comment.