Skip to content

Commit

Permalink
Move cargo hack to it's own workflow and cleanup (#794)
Browse files Browse the repository at this point in the history
* exclude pico-args in test

* remove env arg as managed by rust-toolchain

* remove extra build

* move cargo hack to it's own workflow

* also ignore default

* add back cargo hack build

* cargo_incremental with only hack test
  • Loading branch information
Pat-Lafon authored May 2, 2023
1 parent eec4ac8 commit 80dc102
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
branches: ["master"]
merge_group:

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

permissions:
contents: read

Expand All @@ -33,9 +30,6 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Update
if: matrix.cargo-update
run: cargo update
Expand All @@ -62,3 +56,20 @@ jobs:
toolchain: nightly
- name: Check the minimum possible crate versions
run: rm Cargo.lock && cargo +nightly build -Zdirect-minimal-versions
feature_powerset:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Update
run: cargo update
- run: cargo build --bin lalrpop --features pico-args
- name: Run feature powerset check
# test with minimal amount of features plus a few extra on regex/regex-syntax
run: cargo hack test --workspace --feature-powerset --exclude-features pico-args,default --optional-deps
5 changes: 1 addition & 4 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ export CARGO_INCREMENTAL=0
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

cargo build --bin lalrpop --features pico-args
# build with minimal amount of features to make sure dependencies can build too.
cargo hack build --workspace --feature-powerset --optional-deps
# test with minimal amount of features plus a few extra on regex/regex-syntax
cargo hack test --workspace --feature-powerset --optional-deps
cargo test --workspace
# Check the documentation examples separately so that the `lexer` feature specified in tests do not
# leak into them
cargo check -p calculator
Expand Down

0 comments on commit 80dc102

Please sign in to comment.