-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-actions: Test traditional cargo workflow
Make sure it works without cargo-make Signed-off-by: Daniel Schaefer <[email protected]>
- Loading branch information
1 parent
cfde97e
commit ccb5928
Showing
2 changed files
with
89 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Test builds without cargo-make | ||
# Not the recommended path, but should make sure it still works | ||
name: Traditional Cargo Workflow | ||
|
||
on: | ||
push | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
firmware: | ||
name: Building | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust toolchain | ||
run: rustup show | ||
|
||
- run: cargo install flip-link | ||
|
||
- run: cargo build -p ledmatrix | ||
- run: cargo build -p b1display | ||
- run: cargo build -p c1minimal | ||
|
||
linux-software: | ||
name: Build Linux | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev libasound2-dev | ||
- name: Setup Rust toolchain | ||
run: rustup show | ||
|
||
- name: Build tool | ||
run: cargo build --release --target x86_64-unknown-linux-gnu -p inputmodule-control | ||
|
||
- name: Check if tool can start | ||
run: cargo run --release --target x86_64-unknown-linux-gnu -p inputmodule-control -- --help | grep 'RAW Hid and VIA commandline' | ||
|
||
windows-software: | ||
name: Build Windows | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust toolchain | ||
run: rustup show | ||
|
||
- run: cargo install cargo-make | ||
|
||
- name: Build tool | ||
run: cargo build --release --target x86_64-pc-windows-msvc -p inputmodule-control | ||
|
||
- name: Check if tool can start | ||
run: cargo run --release --target x86_64-pc-windows-msvc -p inputmodule-control -- --help | grep 'RAW Hid and VIA commandline' | ||
|
||
lint-format: | ||
name: Lint and format check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev libasound2-dev | ||
- name: Setup Rust toolchain | ||
run: rustup show | ||
|
||
- name: Firmware clippy | ||
run: | | ||
cargo clippy -p b1display -- --deny=warnings | ||
cargo clippy -p c1minimal -- --deny=warnings | ||
cargo clippy -p ledmatrix -- --deny=warnings | ||
- name: Software clippy | ||
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings | ||
|
||
- name: All cargo fmt | ||
run: cargo fmt --all -- --check |