Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cross config file and build artifacts in CI #134

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Software Tests
name: Build & Test

on:
push:
Expand All @@ -10,10 +10,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:

test:
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"]