Skip to content

Release sys-v5.0.5 #196

Release sys-v5.0.5

Release sys-v5.0.5 #196

Workflow file for this run

name: cargo
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: ./.github/actions/cargo-sweep
- name: cargo build
shell: bash
run: cargo build --all-targets --all-features
- name: cargo test
shell: bash
run: cargo test -p perf-event-open-sys2
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: cargo fmt
shell: bash
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: ./.github/actions/cargo-sweep
- uses: swlynch99/install@clippy-sarif
- uses: swlynch99/install@sarif-fmt
- name: run clippy
run: |
cargo clippy --all-targets --all-features --message-format json \
| clippy-sarif \
| tee clippy.sarif \
| sarif-fmt
shell: bash
continue-on-error: true
- uses: actions/upload-artifact@v3
with:
name: clippy-sarif
path: clippy.sarif
clippy-upload:
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: [ clippy ]
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: clippy-sarif
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: clippy.sarif
check-success:
name: verify all checks pass
runs-on: ubuntu-latest
needs:
- test
- rustfmt
- clippy
steps:
- shell: bash
run: echo "All checks passed!"