forked from rust-bakery/nom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
185 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
RUST_MINVERSION: 1.37.0 | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
- 1.44.0 | ||
|
||
features: | ||
- '--features "regexp"' | ||
|
||
include: | ||
- rust: stable | ||
features: '' | ||
- rust: stable | ||
features: '--features "std lexical regexp"' | ||
- 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: 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 MSRV | ||
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: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --verbose --no-default-features --features "regexp lexical" | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --verbose --no-default-features --features "regexp lexical" | ||
|
||
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: Compile bench | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: bench | ||
args: --verbose --no-run --features "regexp" | ||
|
||
- name: Run bench | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: bench | ||
args: --verbose --features "regexp" | ||
|
||
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 | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --verbose --features "std lexical regexp" | ||
|
||
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: 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 |