-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uplink-sys(build): Fix cross-compilation
This fixes cross-compilation by setting the Go `GOOS` and `GOARCH` flags for `uplink-c`.
- Loading branch information
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Cross-compile uplink-sys to aarch64 Linux | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- 'uplink-sys/**' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'docker-compose.yaml' | ||
- 'Makefile' | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- 'uplink-sys/**' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'docker-compose.yaml' | ||
- 'Makefile' | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu | ||
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/aarch64-linux-gnu" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up `aarch64-unknown-linux-gnu` Rust target | ||
run: rustup target add aarch64-unknown-linux-gnu | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang libclang-dev libc6-dev-arm64-cross && sudo snap install zig --classic --beta | ||
|
||
- name: Build | ||
run: make -C uplink-sys build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: uplink-sys | |
|
||
on: | ||
push: | ||
branches: main | ||
branches: ["main"] | ||
paths: | ||
- 'uplink-sys/**' | ||
- 'Cargo.lock' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule uplink-c
updated
6 files
+25 −7 | GNUmakefile | |
+1 −0 | Jenkinsfile | |
+1 −1 | go.mod | |
+2 −2 | go.sum | |
+110 −0 | scripts/build-lib | |
+4 −5 | scripts/version |