Merge pull request #2 from arkedge/fix/uart_tx_error #4
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: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| rust: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| workspace: | |
| - "." | |
| - monazite-rt | |
| - bootloader | |
| - flash-algo | |
| - c2a-example | |
| - c2a-example/monazite | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: recursive | |
| - name: Update apt cache | |
| run: sudo apt-get update | |
| - name: Install build dependencies | |
| run: sudo apt-get install -yq libudev-dev libusb-dev gcc-multilib g++-multilib gcc-arm-none-eabi | |
| - name: Get Rust toolchain | |
| id: toolchain | |
| run: | | |
| awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' ${{ matrix.workspace }}/rust-toolchain.toml >> "$GITHUB_OUTPUT" | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.toolchain.outputs.toolchain }} | |
| targets: thumbv7em-none-eabihf, i686-unknown-linux-gnu | |
| components: clippy,rustfmt | |
| - uses: Swatinem/[email protected] | |
| with: | |
| workspaces: | | |
| . | |
| monazite-rt | |
| bootloader | |
| flash-algo | |
| c2a-example | |
| c2a-example/monazite | |
| - name: Check formatting (cargo fmt) | |
| working-directory: ${{ matrix.workspace }} | |
| run: cargo fmt -- --check | |
| - name: reviewdog / clippy | |
| uses: sksat/[email protected] | |
| with: | |
| working_directory: ${{ matrix.workspace }} | |
| - name: Test ringbuf | |
| if: matrix.workspace == '.' | |
| run: cargo test -p ringbuf |