Skip to content

Commit c7b5a2c

Browse files
committed
Support linux ARM and ARM64 architectures (closes #34)
1 parent fd5fb33 commit c7b5a2c

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Execute CGO builds using XGO
16-
uses: crazy-max/ghaction-xgo@v2
16+
uses: crazy-max/ghaction-xgo@v3
1717
# docs: https://github.com/marketplace/actions/golang-cgo-cross-compiler#inputs
1818
with:
1919
xgo_version: latest
2020
go_version: 1.20.0
2121
dest: build
2222
pkg: cmd
2323
prefix: server
24-
targets: windows/386,windows/amd64,linux/386,linux/amd64,darwin/amd64,darwin/arm64
24+
targets: windows/386,windows/amd64,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64,darwin/arm64
2525
# Prints the build commands as compilation progresses (default false)
2626
x: true
2727
ldflags: -w

build.sh

+18
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ copy_linux_amd64() {
4848
copy "server-linux-amd64.so" "linux-x86-64"
4949
}
5050

51+
copy_linux_arm() {
52+
copy "server-linux-arm-5.so" "linux-arm"
53+
}
54+
55+
copy_linux_arm64() {
56+
copy "server-linux-arm64.so" "linux-aarch64"
57+
}
58+
5159
copy_windows_amd64() {
5260
copy "server-windows-amd64.dll" "win32-x86-64"
5361
}
@@ -73,6 +81,14 @@ cleanup
7381
copy_linux_amd64
7482
buildJar "linux-amd64"
7583

84+
cleanup
85+
copy_linux_arm
86+
buildJar "linux-arm"
87+
88+
cleanup
89+
copy_linux_arm64
90+
buildJar "linux-arm64"
91+
7692
cleanup
7793
copy_windows_amd64
7894
buildJar "windows-amd64"
@@ -87,6 +103,8 @@ copy_macos
87103
copy_macos_arm64
88104
copy_linux_386
89105
copy_linux_amd64
106+
copy_linux_arm
107+
copy_linux_arm64
90108
copy_windows_amd64
91109
copy_windows_386
92110
buildJar "fat"

0 commit comments

Comments
 (0)