-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It seems the `actions-rs` collection of github actions are unmaintained; using the `actions-rs/toolchain@v1` action causes deprecation warnings in Github CI; see <actions-rs/toolchain#221>. So: - Replace the `toolchain` action with `dtolnay/rust-toolchain`. - Just run cargo directly instead of using the `cargo` action. - Get rid of the code coverage check, which was broken anyway.
- Loading branch information
Showing
1 changed file
with
9 additions
and
70 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 |
---|---|---|
|
@@ -10,16 +10,10 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run cargo check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
run: cargo check --all-features --all-targets | ||
|
||
test: | ||
name: Test Suite | ||
|
@@ -29,16 +23,10 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
run: cargo test --all-features --all-targets | ||
|
||
msrv-check: | ||
# We require at least Rust 1.45, so we can use proc macros in | ||
|
@@ -51,11 +39,8 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install 1.45 toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.45.0 | ||
override: true | ||
uses: dtolnay/[email protected] | ||
|
||
# We use the git CLI here, since otherwise cargo fails with | ||
# "error reading from the zlib stream; class=Zlib (5)", see | ||
# <https://github.com/rust-lang/cargo/issues/10303>. | ||
|
@@ -71,56 +56,10 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt, clippy | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
|
||
|
||
codecov: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Build with instrumentation | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --package lexpr --all-features --no-fail-fast | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Cpanic=abort' | ||
|
||
# TODO: collect statistics with `gcovr`, which doesn't play with | ||
# current "gcov" binary format. | ||
- name: Collect coverage information | ||
uses: actions-rs/[email protected] | ||
|
||
# TODO: upload coverage, see | ||
# <https://github.com/marketplace/actions/codecov> | ||
- name: Upload to codecov | ||
uses: codecov/codecov-action@v1 | ||
run: cargo clippy -- -D warnings |