chore: initial commit #6
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 ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: configure git for private repos | |
| run: | | |
| git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "ssh://[email protected]/" | |
| mkdir -p ~/.cargo | |
| echo '[net]' >> ~/.cargo/config.toml | |
| echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml | |
| - name: install rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: x86_64-unknown-uefi, x86_64-unknown-linux-musl | |
| components: clippy, rustfmt | |
| - name: cache rust toolchain | |
| uses: Swatinem/rust-cache@v2 | |
| - name: cargo deny | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| - name: cargo fmt | |
| run: cargo fmt --all -- --check | |
| - name: cargo clippy | |
| run: cargo clippy --target x86_64-unknown-uefi --bins -- -D warnings | |
| - name: cargo build | |
| run: | | |
| cargo build --release --target x86_64-unknown-linux-musl | |
| - name: upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: uefi-reset | |
| path: target/x86_64-unknown-linux-musl/release/dispatch |