add settings for editors and github workflow #1
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: Rust | |
| on: | |
| push: | |
| pull_request: | |
| merge_group: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Format | |
| run: | | |
| cd device | |
| for package in $(ls -d usb*); do | |
| cargo fmt --check | |
| done | |
| cd .. | |
| cd host/usb-bulk-rust | |
| cargo fmt --check | |
| - name: Build | |
| run: | | |
| cd device | |
| for package in $(ls -d usb*); do | |
| (cd $package && cargo build) | |
| done | |
| cd .. | |
| cd host/usb-bulk-rust | |
| cargo build | |
| - name: Clippy | |
| run: | | |
| cd device | |
| for package in $(ls -d lab*); do | |
| (cd $package && cargo clippy) | |
| done | |
| cd .. | |
| cd host/usb-bulk-rust | |
| cargo clippy |