Tool enhancements #1990
Workflow file for this run
This file contains 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: Rust CI | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'release/*' | |
pull_request: | |
branches: | |
- 'master' | |
- 'release/*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
components: rustfmt | |
toolchain: 1.79.0 | |
- run: rustup component add rustfmt | |
# use a placeholder for bindgen bindings | |
- run: echo "//placeholder" | tee crates/auparse/sys/src/bindings.rs | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
check: | |
name: Check | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.79.0 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
components: clippy | |
toolchain: 1.79.0 | |
- run: rustup component add clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
semver-checks: | |
name: Semver Check | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
if: ${{ github.event.pull_request }} | |
steps: | |
- name: Install package dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
path: './base' | |
- uses: actions/checkout@v4 | |
with: | |
path: './pr' | |
- name: Install cargo-semver-checks | |
uses: robinraju/[email protected] | |
with: | |
repository: obi1kenobi/cargo-semver-checks | |
filename: cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz | |
latest: true | |
extract: true | |
- name: Run cargo-semver-checks | |
run: >- | |
./cargo-semver-checks semver-checks | |
--manifest-path './pr/Cargo.toml' | |
--baseline-root './base' | |
--default-features | |
--release-type minor | |
test: | |
name: Test Suite | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdbus-1-dev libaudit-dev libauparse-dev | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.79.0 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all |