fix bench #1055
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: [push, pull_request] | |
env: | |
RUST_MINVERSION: 1.41.1 | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
features: | |
- '' | |
include: | |
- rust: stable | |
features: '' | |
- rust: stable | |
features: '--features "std"' | |
- rust: stable | |
features: '--no-default-features' | |
- rust: stable | |
features: '--no-default-features --features "alloc"' | |
- rust: nightly | |
features: '' | |
- rust: nightly | |
features: '--no-default-features' | |
- rust: nightly | |
features: '--no-default-features --features "alloc"' | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust (${{ matrix.rust }}) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --verbose ${{ matrix.features }} | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose ${{ matrix.features }} | |
bench: | |
name: Bench | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
override: true | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Compile bench | |
uses: actions-rs/cargo@v1 | |
with: | |
command: bench | |
args: --verbose --no-run --features "" | |
- name: Run bench | |
uses: actions-rs/cargo@v1 | |
with: | |
command: bench | |
args: --verbose --features "" | |
doc: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
override: true | |
- name: Build | |
env: | |
RUSTDOCFLAGS: -D warnings | |
run: cargo doc --no-deps --document-private-items --workspace --verbose --features "std docsrs" | |
fmt: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
profile: minimal | |
override: true | |
- name: cargo fmt -- --check | |
continue-on-error: true | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Install cargo-tarpaulin | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-tarpaulin | |
- name: Run cargo tarpaulin | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tarpaulin | |
args: --output-dir coverage --out Lcov | |
- name: Publish to Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |