Rust CI #63
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "release/**" | |
schedule: | |
- cron: "11 7 * * 1,4" | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rustfmt | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: clippy | |
override: true | |
- uses: actions-rs/clippy-check@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --workspace --tests --examples | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rust-docs | |
override: true | |
- uses: swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --workspace --no-deps | |
build-fuzz: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
override: true | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: install | |
args: cargo-fuzz | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: fuzz | |
args: build --fuzz-dir breakpad-symbols/fuzz | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: fuzz | |
args: build --fuzz-dir minidump/fuzz | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: fuzz | |
args: build --fuzz-dir minidump-processor/fuzz | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: fuzz | |
args: build --fuzz-dir minidump-unwind/fuzz | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust: [nightly, stable] | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
- uses: swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: test | |
args: --workspace | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: test | |
args: --workspace --all-features | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: test | |
args: --workspace --examples --bins | |
- uses: actions-rs/cargo@v1 | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
with: | |
command: test | |
args: --workspace --all-features --examples --bins |