Skip to content

Commit 651c505

Browse files
committed
feat: build arm64 binary
1 parent 963cdc5 commit 651c505

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

.github/workflows/go.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,30 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.24
20+
go-version-file: go.mod
2121

2222
- name: Install build dependencies
2323
run: |
24-
apt-get update
25-
apt-get install -y pkg-config build-essential xorg-dev
24+
dpkg --add-architecture arm64
25+
apt update
26+
apt install -y gcc xorg-dev gcc-aarch64-linux-gnu libgl-dev:arm64 libxcursor-dev:arm64 libxi-dev:arm64 libxinerama-dev:arm64 libxrandr-dev:arm64 libxxf86vm-dev:arm64
2627
2728
- name: Build
28-
run: go build -o vanilla-tools/ ./...
29-
30-
- name: Compress
31-
run: tar -czvf vanilla-tools.tar.gz vanilla-tools/*
32-
33-
- name: Calculate and Save Checksums
3429
run: |
35-
sha256sum vanilla-tools.tar.gz >> checksums.txt
30+
go build -o vanilla-tools/ ./...
31+
tar -czvf vanilla-tools-amd64.tar.gz vanilla-tools/*
32+
GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc go build -o vanilla-tools/ ./...
33+
tar -czvf vanilla-tools-arm64.tar.gz vanilla-tools/*
34+
35+
- name: Calculate and Save Checksums
36+
run: sha256sum vanilla-tools*.tar.gz >> checksums.txt
3637

3738
- uses: actions/upload-artifact@v4
3839
with:
3940
name: vanilla-tools
4041
path: |
4142
checksums.txt
42-
vanilla-tools.tar.gz
43+
vanilla-tools*.tar.gz
4344
4445
- name: Release
4546
if: github.ref == 'refs/heads/main'
@@ -51,4 +52,4 @@ jobs:
5152
name: "Continuous Build"
5253
files: |
5354
checksums.txt
54-
vanilla-tools.tar.gz
55+
vanilla-tools*.tar.gz

.github/workflows/release.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,30 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@v5
2020
with:
21-
go-version: 1.24
21+
go-version-file: go.mod
2222

2323
- name: Install build dependencies
2424
run: |
25-
apt-get update
26-
apt-get install -y pkg-config build-essential xorg-dev
25+
dpkg --add-architecture arm64
26+
apt update
27+
apt install -y gcc xorg-dev gcc-aarch64-linux-gnu libgl-dev:arm64 libxcursor-dev:arm64 libxi-dev:arm64 libxinerama-dev:arm64 libxrandr-dev:arm64 libxxf86vm-dev:arm64
2728
2829
- name: Build
29-
run: go build -o vanilla-tools/ ./...
30-
31-
- name: Compress
32-
run: tar -czvf vanilla-tools.tar.gz vanilla-tools/*
33-
34-
- name: Calculate and Save Checksums
3530
run: |
36-
sha256sum vanilla-tools.tar.gz >> checksums.txt
31+
go build -o vanilla-tools/ ./...
32+
tar -czvf vanilla-tools-amd64.tar.gz vanilla-tools/*
33+
GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc go build -o vanilla-tools/ ./...
34+
tar -czvf vanilla-tools-arm64.tar.gz vanilla-tools/*
35+
36+
- name: Calculate and Save Checksums
37+
run: sha256sum vanilla-tools*.tar.gz >> checksums.txt
3738

3839
- uses: actions/upload-artifact@v4
3940
with:
4041
name: vanilla-tools
4142
path: |
4243
checksums.txt
43-
vanilla-tools.tar.gz
44+
vanilla-tools*.tar.gz
4445
4546
release:
4647
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)