Skip to content

Commit

Permalink
Support linux ARM and ARM64 architectures (closes #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeyax committed Dec 16, 2023
1 parent fd5fb33 commit c7b5a2c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Execute CGO builds using XGO
uses: crazy-max/ghaction-xgo@v2
uses: crazy-max/ghaction-xgo@v3
# docs: https://github.com/marketplace/actions/golang-cgo-cross-compiler#inputs
with:
xgo_version: latest
go_version: 1.20.0
dest: build
pkg: cmd
prefix: server
targets: windows/386,windows/amd64,linux/386,linux/amd64,darwin/amd64,darwin/arm64
targets: windows/386,windows/amd64,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64,darwin/arm64
# Prints the build commands as compilation progresses (default false)
x: true
ldflags: -w
Expand Down
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ copy_linux_amd64() {
copy "server-linux-amd64.so" "linux-x86-64"
}

copy_linux_arm() {
copy "server-linux-arm-5.so" "linux-arm"
}

copy_linux_arm64() {
copy "server-linux-arm64.so" "linux-aarch64"
}

copy_windows_amd64() {
copy "server-windows-amd64.dll" "win32-x86-64"
}
Expand All @@ -73,6 +81,14 @@ cleanup
copy_linux_amd64
buildJar "linux-amd64"

cleanup
copy_linux_arm
buildJar "linux-arm"

cleanup
copy_linux_arm64
buildJar "linux-arm64"

cleanup
copy_windows_amd64
buildJar "windows-amd64"
Expand All @@ -87,6 +103,8 @@ copy_macos
copy_macos_arm64
copy_linux_386
copy_linux_amd64
copy_linux_arm
copy_linux_arm64
copy_windows_amd64
copy_windows_386
buildJar "fat"

0 comments on commit c7b5a2c

Please sign in to comment.