name: check on: push: branches: - "*" tags: - "*" pull_request: branches: - "*" jobs: build: strategy: matrix: os: - ubuntu-latest - macos-latest - windows-latest runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v4 with: submodules: true - uses: actions-rs/toolchain@v1 with: toolchain: stable override: true components: clippy, rustfmt - name: Check format run: cargo fmt --all -- --check - name: Check fix run: cargo fix && cargo fix - name: Check with clippy run: cargo clippy --all-targets --all-features -- -D warnings - name: Build Release run: cargo build --release - name: Run tests run: cargo test - uses: dtolnay/rust-toolchain@v1 with: target: riscv32imc-unknown-none-elf toolchain: stable components: rust-src - name: Run no_std example run: | cargo fmt --all -- --check cargo clippy --release --all -- -D warnings cargo b --release working-directory: ./is_debug_no_std publish-crate: if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: - name: Set up Rust uses: hecrj/setup-rust-action@v2 - uses: actions/checkout@v4 - name: Publish shell: bash run: | cargo publish --token ${{ secrets.CRATES_GITHUB_TOKEN }}