-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Marcondiro/master
Add CI and fix clippy warnings
- Loading branch information
Showing
4 changed files
with
93 additions
and
24 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,75 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings --cfg docsrs | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests with all features | ||
run: cargo test --all-features --verbose | ||
- name: Run tests without features | ||
run: cargo test --lib --no-default-features --verbose | ||
- name: Package | ||
run: cargo package | ||
- name: Test package | ||
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test | ||
- name: Test package without features | ||
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test --lib --no-default-features | ||
- name: Build docs | ||
if: matrix.rust == 'nightly' | ||
run: cargo doc --all-features --verbose | ||
- name: Check formatting | ||
if: matrix.rust == 'stable' | ||
run: cargo fmt --all --check | ||
- name: Check clippy | ||
if: matrix.rust == 'stable' | ||
run: cargo clippy --all-features --lib --tests --examples --verbose | ||
- name: Check benchmarks with clippy | ||
if: matrix.rust == 'nightly' | ||
run: cargo clippy --all-features --benches --verbose | ||
msrv: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install msrv toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56 | ||
override: true | ||
- name: Build | ||
run: cargo build --verbose --all-features | ||
regen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Regen | ||
run: cd scripts && python3 unicode.py | ||
- name: Diff tables | ||
run: diff src/tables.rs scripts/tables.rs |
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
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
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