Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check default and no-default-features in CI #1042

Merged
merged 3 commits into from Sep 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/build-and-test.yml
Expand Up @@ -97,7 +97,29 @@ jobs:
with:
os: ${{matrix.os}}

- name: Build
- name: Check --no-default-features
if: matrix.os == 'ubuntu-latest'
run: |
cargo metadata --format-version 1 | \
jq -r '.workspace_members[] | select(contains("examples") | not)' | \
awk '{print $1}' | \
xargs -I {} cargo check -p {} --no-default-features
PhilippGackstatter marked this conversation as resolved.
Show resolved Hide resolved

- name: Check default features
if: matrix.os == 'ubuntu-latest'
run: |
cargo metadata --format-version 1 | \
jq -r '.workspace_members[] | select(contains("examples") | not)' | \
awk '{print $1}' | \
xargs -I {} cargo check -p {}

# Clean debug target to avoid bloating the GitHub Actions cache.
# The previous builds cannot be re-used at all for the full --all-features --release build anyway.
- name: Clean target
if: matrix.os == 'ubuntu-latest'
run: cargo clean

- name: Build all features
uses: actions-rs/cargo@v1
with:
# Build the library, tests, and examples without running them to avoid recompilation in the run tests step
Expand Down