Skip to content

Commit ccb5928

Browse files
committed
gh-actions: Test traditional cargo workflow
Make sure it works without cargo-make Signed-off-by: Daniel Schaefer <[email protected]>
1 parent cfde97e commit ccb5928

File tree

2 files changed

+89
-4
lines changed

2 files changed

+89
-4
lines changed

.github/workflows/firmware.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ jobs:
6565
runs-on: ubuntu-latest
6666
steps:
6767
- uses: actions/checkout@v3
68-
with:
69-
submodules: true
7068

7169
- name: Setup Rust toolchain
7270
run: rustup show
@@ -93,8 +91,6 @@ jobs:
9391
runs-on: ubuntu-latest
9492
steps:
9593
- uses: actions/checkout@v3
96-
with:
97-
submodules: true
9894

9995
- name: Setup Rust toolchain
10096
run: rustup show
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Test builds without cargo-make
2+
# Not the recommended path, but should make sure it still works
3+
name: Traditional Cargo Workflow
4+
5+
on:
6+
push
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
CARGO_NET_GIT_FETCH_WITH_CLI: true
11+
12+
jobs:
13+
firmware:
14+
name: Building
15+
runs-on: [ubuntu-latest]
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Setup Rust toolchain
20+
run: rustup show
21+
22+
- run: cargo install flip-link
23+
24+
- run: cargo build -p ledmatrix
25+
- run: cargo build -p b1display
26+
- run: cargo build -p c1minimal
27+
28+
linux-software:
29+
name: Build Linux
30+
runs-on: ubuntu-22.04
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
- name: Install dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y libudev-dev libasound2-dev
38+
39+
- name: Setup Rust toolchain
40+
run: rustup show
41+
42+
- name: Build tool
43+
run: cargo build --release --target x86_64-unknown-linux-gnu -p inputmodule-control
44+
45+
- name: Check if tool can start
46+
run: cargo run --release --target x86_64-unknown-linux-gnu -p inputmodule-control -- --help | grep 'RAW Hid and VIA commandline'
47+
48+
windows-software:
49+
name: Build Windows
50+
runs-on: windows-2022
51+
steps:
52+
- uses: actions/checkout@v3
53+
54+
- name: Setup Rust toolchain
55+
run: rustup show
56+
57+
- run: cargo install cargo-make
58+
59+
- name: Build tool
60+
run: cargo build --release --target x86_64-pc-windows-msvc -p inputmodule-control
61+
62+
- name: Check if tool can start
63+
run: cargo run --release --target x86_64-pc-windows-msvc -p inputmodule-control -- --help | grep 'RAW Hid and VIA commandline'
64+
65+
lint-format:
66+
name: Lint and format check
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v3
70+
71+
- name: Install dependencies
72+
run: |
73+
sudo apt-get update
74+
sudo apt-get install -y libudev-dev libasound2-dev
75+
76+
- name: Setup Rust toolchain
77+
run: rustup show
78+
79+
- name: Firmware clippy
80+
run: |
81+
cargo clippy -p b1display -- --deny=warnings
82+
cargo clippy -p c1minimal -- --deny=warnings
83+
cargo clippy -p ledmatrix -- --deny=warnings
84+
85+
- name: Software clippy
86+
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings
87+
88+
- name: All cargo fmt
89+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)