name: Cargo Check
on: ["push", "pull_request"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install tq
run: cargo install tomlq
- name: Install additional targets
run: |
rustup target add $(tq -f .cargo/config.toml build.target -o json | jq -r "@sh" | tr -d "'")
- name: Run cargo check
run: cargo check