-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (83 loc) · 2.52 KB
/
run-checks.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Run Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
check-control-station:
name: Check Control Station
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./control-station
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install frontend dependencies
run: npm install
- name: Format with Prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
workdir: control-station/
level: warning
reporter: github-pr-review
prettier_flags: src
- name: Lint with ESLint (review)
uses: reviewdog/action-eslint@v1
if: github.event_name == 'pull_request'
with:
workdir: control-station/
level: error
reporter: github-pr-review
eslint_flags: src
- name: Lint with ESLint (check)
uses: reviewdog/action-eslint@v1
if: github.event_name == 'push'
with:
workdir: control-station/
level: error
reporter: github-check
eslint_flags: src
- name: Test building
run: npm run build
check-pod-operation:
name: Check Pod Operation
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./pod-operation
env:
TARGET: aarch64-unknown-linux-gnu
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Add target
run: rustup target add $TARGET
- name: Install target building dependencies
run: sudo apt-get update && sudo apt-get -qq install crossbuild-essential-arm64
- name: Run cargo test
run: cargo test
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Lint pod operation (w/o rpi)
run: cargo clippy -- -D warnings
- name: Lint pod operation (w/ rpi)
run: cargo clippy --features rpi -- -D warnings
- name: Build Pod Operation Program (debug)
run: cargo build --target $TARGET --config target.$TARGET.linker=\"aarch64-linux-gnu-gcc\"
- name: Build Pod Operation Program (release)
run: cargo brpi --config target.$TARGET.linker=\"aarch64-linux-gnu-gcc\"