-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.38 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build & Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: sudo apt install socat libudev-dev
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --release --features mock
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: sudo apt install libudev-dev
- name: Clippy
run: cargo clippy -- -D warnings
- name: Formatting
run: cargo fmt --all --check
cross-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
run: |
cross build --examples --bins --release --target aarch64-unknown-linux-gnu
mv target/aarch64-unknown-linux-gnu/release/STS1_EDU_Scheduler .
mv target/aarch64-unknown-linux-gnu/release/examples/cli .
cp scheduler/config.toml .
cp scheduler/scheduler.service .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: aarch64 package
path: |
STS1_EDU_Scheduler
config.toml
scheduler.service
cli