mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
ci: Build for aarch64
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
parent
8d6a27a6b5
commit
69421137ec
1 changed files with 8 additions and 8 deletions
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
|
|
@ -10,12 +10,12 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
# Target for 32-bit Raspberry Pi (Raspberry Pi OS)
|
# Target for 64-bit Raspberry Pi (Raspberry Pi OS)
|
||||||
RUST_TARGET: armv7-unknown-linux-gnueabihf
|
RUST_TARGET: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build for armv7
|
name: Build for aarch64
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -27,21 +27,21 @@ jobs:
|
||||||
|
|
||||||
- name: Install cross-compilation dependencies
|
- name: Install cross-compilation dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo dpkg --add-architecture armhf
|
sudo dpkg --add-architecture arm64
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y gcc-arm-linux-gnueabihf libudev-dev:armhf
|
sudo apt-get install -y gcc-aarch64-linux-gnu libudev-dev:arm64
|
||||||
|
|
||||||
- name: Build release binary
|
- name: Build release binary
|
||||||
run: cargo build --release --target ${{ env.RUST_TARGET }}
|
run: cargo build --release --target ${{ env.RUST_TARGET }}
|
||||||
env:
|
env:
|
||||||
# Set linker for the target
|
# Set linker for the target
|
||||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
# Configure pkg-config for cross-compilation
|
# Configure pkg-config for cross-compilation
|
||||||
PKG_CONFIG_ALLOW_CROSS: 1
|
PKG_CONFIG_ALLOW_CROSS: 1
|
||||||
PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
|
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: timeturner-armv7
|
name: timeturner-aarch64
|
||||||
path: target/${{ env.RUST_TARGET }}/release/timeturner
|
path: target/${{ env.RUST_TARGET }}/release/timeturner
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue