doc: Fix instructions #54
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: CI | |
on: | |
merge_group: | |
push: | |
branches: [main, dev] | |
pull_request: | |
branches: [main, dev] | |
env: | |
CARGO_TERM_COLOR: always | |
# TODO: Add benchmarking in CI(see https://github.com/benchmark-action/github-action-benchmark/pull/138) | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
toolchain: [stable, nightly] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Rust toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Use Rust Cache | |
if: ${{ runner.os == 'Linux' }} | |
uses: Swatinem/[email protected] | |
- name: Run cargo check --all-targets w/ -D warnings | |
run: cargo check --all-targets | |
- name: Run cargo test w/ -D warnings | |
if: ${{ runner.os == 'Linux' }} | |
run: cargo test -- --test-threads=1 | |
- name: Run cargo doc | |
if: ${{ runner.os == 'Linux' }} | |
run: cargo doc --no-deps --document-private-items | |
- name: Run build --release --all-targets | |
run: cargo build --release --all-targets | |
rustfmt: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get nightly Rust toolchain with rustfmt | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: Run cargo fmt --all -- --check | |
run: cd lib && cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get nightly Rust toolchain with clippy | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: clippy | |
- name: Run cargo clippy --package lib --all-targets | |
run: cargo clippy --package lib --all-targets |