Toolchain tidy #49
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
formatting: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v31 | |
- uses: cachix/cachix-action@v16 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install nixpkgs#devenv | |
- name: Format | |
shell: devenv shell bash -- -e {0} | |
run: treefmt --fail-on-change | |
bsp: | |
name: BSP | |
needs: | |
- formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v31 | |
- uses: cachix/cachix-action@v16 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install nixpkgs#devenv | |
- name: Clippy (rp2040) | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp | |
cargo clippy --target thumbv6m-none-eabi -F rp2040 -- -D warnings | |
- name: Clippy (rp235xa) | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp | |
cargo clippy --target thumbv8m.main-none-eabihf -F rp235xa -- -D warnings | |
- name: Build (rp2040) | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp | |
cargo build --target thumbv6m-none-eabi -F rp2040 | |
- name: Build (rp235xa) | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp | |
cargo build --target thumbv8m.main-none-eabihf -F rp235xa | |
examples: | |
name: Examples | |
needs: | |
- bsp | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
example: | |
- "kitchen-sink-rp2040" | |
- "kitchen-sink-rp235xa" | |
- "steal-rp2040" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v31 | |
- uses: cachix/cachix-action@v16 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install nixpkgs#devenv | |
- name: Clippy | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp/examples/${{ matrix.example }} | |
cargo clippy -- -D warnings | |
- name: Build | |
shell: devenv shell bash -- -e {0} | |
run: | | |
cd ./bsp/examples/${{ matrix.example }} | |
cargo build |