Skip to content

Commit

Permalink
Merge pull request #134 from SpaceTeam/crosscompile-CI
Browse files Browse the repository at this point in the history
Add cross config file and build artifacts in CI
  • Loading branch information
florg-32 authored Dec 31, 2023
2 parents c0c466e + 12d8e2e commit 068c070
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
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"]

0 comments on commit 068c070

Please sign in to comment.