Skip to content

Commit

Permalink
Add cross config file and build artifacts in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Guggi committed Dec 31, 2023
1 parent c0c466e commit d0628b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install
Expand All @@ -22,3 +20,17 @@ jobs:
run: cargo build --release
- name: Run tests
run: cargo test --release --features mock

cross-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
run: cross build --release --target aarch64-unknown-linux-gnu
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: aarch64 binary
path: target/aarch64-unknown-linux-gnu/release/STS1_EDU_Scheduler
2 changes: 2 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.aarch64-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libudev-dev:arm64"]

0 comments on commit d0628b2

Please sign in to comment.