Skip to content

Commit

Permalink
use arm based linux runners for arm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jurica committed Jan 17, 2025
1 parent fdfd13b commit 61089d7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
path: zk

build-linux-arm:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -58,16 +58,11 @@ jobs:
run: echo "version=$(git describe --tags --match v[0-9]* 2> /dev/null)" >> $GITHUB_OUTPUT
- name: Pull docker image
run: docker pull ghcr.io/zk-org/zk-xcompile:linux-arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build
run: |
docker run --rm \
-v $(pwd):/usr/src/zk \
-w /usr/src/zk \
--platform=linux/arm64 \
-u root \
ghcr.io/zk-org/zk-xcompile:linux-arm64 \
/bin/bash -c 'go build -buildvcs=false -tags "fts5" -ldflags "-X=main.Version=${{ steps.vars.outputs.version }} -X=main.Build=${{ steps.vars.outputs.version }}"'
Expand Down Expand Up @@ -113,7 +108,7 @@ jobs:
path: zk

build-alpine-arm:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -130,16 +125,11 @@ jobs:
run: echo "version=$(git describe --tags --match v[0-9]* 2> /dev/null)" >> $GITHUB_OUTPUT
- name: Pull dockedr image
run: docker pull ghcr.io/zk-org/zk-xcompile:alpine-arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: build
run: |
docker run --rm \
-v $(pwd):/usr/src/zk \
-w /usr/src/zk \
--platform=linux/arm64 \
-u root \
ghcr.io/zk-org/zk-xcompile:alpine-arm64 \
/bin/bash -c 'go build -buildvcs=false -tags "fts5" -ldflags "-extldflags=-static -X=main.Version=${{ steps.vars.outputs.version }} -X=main.Build=${{ steps.vars.outputs.version }}"'
Expand Down

0 comments on commit 61089d7

Please sign in to comment.