Add AsByte trait and satisfy, one_of and none_of for bytes #1085
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: CI | |
on: [push, pull_request] | |
env: | |
RUST_MINVERSION: 1.65.0 | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
- 1.65.0 | |
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 }} | |
minrust: | |
name: Test minimal rust version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install rust (${{ env.RUST_MINVERSION }}) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.RUST_MINVERSION }} | |
profile: minimal | |
override: true | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --verbose --no-default-features --features "alloc,std" | |
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 xml --workspace --exclude benchmarks | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: rust-bakery/nom |