|
| 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