aien-edge
aien-dev/aien-edge
Brought by drakestapleton
aien-edge / .github / workflows / msrv.yml
| 1 | name: msrv |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | |
| 8 | permissions: |
| 9 | contents: read |
| 10 | |
| 11 | jobs: |
| 12 | msrv: |
| 13 | name: build and test on the MSRV |
| 14 | runs-on: ubuntu-24.04-arm |
| 15 | steps: |
| 16 | - uses: actions/checkout@v4 |
| 17 | - name: rust-version in Cargo.toml matches rust-toolchain.toml |
| 18 | run: | |
| 19 | msrv=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' Cargo.toml) |
| 20 | pin=$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml) |
| 21 | echo "Cargo.toml rust-version=$msrv rust-toolchain.toml channel=$pin" |
| 22 | case "$pin" in "$msrv"|"$msrv".*) ;; *) echo "mismatch"; exit 1 ;; esac |
| 23 | - name: install the pinned toolchain |
| 24 | run: rustup toolchain install "$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml)" --profile minimal --component clippy |
| 25 | - run: rustc --version && cargo --version |
| 26 | - run: cargo build --locked |
| 27 | - run: cargo test --locked |
| 28 | - run: cargo clippy --release --locked -- -D warnings |