Skip to content

Commit

Permalink
gh-actions: Test traditional cargo workflow
Browse files Browse the repository at this point in the history
Make sure it works without cargo-make

Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Sep 4, 2023
1 parent cfde97e commit ccb5928
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup Rust toolchain
run: rustup show
Expand All @@ -93,8 +91,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup Rust toolchain
run: rustup show
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/traditional-cargo.yml
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

0 comments on commit ccb5928

Please sign in to comment.