ledmatrix: Add debug mode and use DIP1 pin #250
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 Checks | |
on: | |
push: | |
branches: | |
- master | |
- dev-* | |
paths-ignore: | |
- '*.py' | |
- 'inputmodule-control/**' | |
pull_request: | |
branches: | |
- '*' | |
paths-ignore: | |
- '*.py' | |
- 'inputmodule-control/**' | |
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 cargo-make | |
- run: cargo install flip-link | |
- run: cargo make --cwd b1display | |
- run: cargo make --cwd c1minimal | |
- run: cargo make --cwd ledmatrix build-release | |
- run: cargo make --cwd b1display build-release | |
- run: cargo make --cwd c1minimal build-release | |
- name: Convert to UF2 format | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev | |
cargo make --cwd b1display uf2 | |
cargo make --cwd c1minimal uf2 | |
cargo make --cwd 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 | |
cargo make --cwd b1display bin | |
cargo make --cwd c1minimal bin | |
cargo make --cwd 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 | |
- 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 | |
- name: Setup Rust toolchain | |
run: rustup show | |
- run: cargo fmt --all -- --check |