ledmatrix: Use new driver repo #235
Workflow file for this run
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
name: Firmware CI Checks | |
on: | |
push | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
jobs: | |
building: | |
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 | |
- run: cargo build -p ledmatrix --release | |
- run: cargo build -p b1display --release | |
- run: cargo build -p c1minimal --release | |
- name: Convert to UF2 format | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
cargo install elf2uf2-rs | |
elf2uf2-rs target/thumbv6m-none-eabi/release/b1display b1display.uf2 | |
elf2uf2-rs target/thumbv6m-none-eabi/release/c1minimal c1minimal.uf2 | |
elf2uf2-rs target/thumbv6m-none-eabi/release/ledmatrix ledmatrix.uf2 | |
- name: Upload UF2 files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: inputmodule_fw_uf2 | |
path: | | |
b1display.uf2 | |
c1minimal.uf2 | |
ledmatrix.uf2 | |
- name: Convert to bin format | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y llvm | |
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/b1display b1display.bin | |
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/c1minimal c1minimal.bin | |
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/ledmatrix ledmatrix.bin | |
- name: Upload bin files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: inputmodule_fw_bin | |
path: | | |
b1display.bin | |
c1minimal.bin | |
ledmatrix.bin | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Rust toolchain | |
run: rustup show | |
- run: | | |
cargo clippy -p b1display -- --deny=warnings | |
cargo clippy -p c1minimal -- --deny=warnings | |
cargo clippy -p ledmatrix -- --deny=warnings | |
# fl16-inputmodules/src/serialnum.rs | |
# is currently used by all firmwares to show their firmware version. | |
# But it shows the version of the fl16-inputmodules package. | |
# So that needs to be the same as the firmware version. | |
- name: Check versions of all packages are the same | |
run: | | |
cargo pkgid -p fl16-inputmodules | cut -d "#" -f2 >> versions.tmp | |
cargo pkgid -p b1display | cut -d "#" -f2 >> versions.tmp | |
cargo pkgid -p c1minimal | cut -d "#" -f2 >> versions.tmp | |
cargo pkgid -p ledmatrix | cut -d "#" -f2 >> versions.tmp | |
uniq -c versions.tmp | [ $(wc -l) -eq 1 ] | |
formatting: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Rust toolchain | |
run: rustup show | |
- run: cargo fmt --all -- --check |