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

chore: Add cargo-hack to check features #105

Merged
merged 2 commits into from
Oct 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ jobs:
- uses: actions/checkout@master
- name: Install rustfmt
run: rustup component add rustfmt
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Check fmt
run: cargo fmt -- --check
- name: Check all
run: cargo check --all
- name: Check with no default features
run: cargo check -p tonic --no-default-features
- name: Check with transport no tls
run: cargo check -p tonic
- name: Check with transport w/ openssl
run: cargo check -p tonic --features openssl
- name: Check with transport w/ rustls
run: cargo check -p tonic --features rustls
- name: Check features
run: cargo hack check --all --each-feature --no-dev-deps
- name: Check all targets
run: cargo check --all --all-targets --all-features
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to add the all-targets or else it will miss benchmarks, do you think there might be a better solution @taiki-e?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure if there is another good solution. (afaik, --all-targets is basically the same as --lib --bins --examples --tests --benches, and note that the document is not checked (rust-lang/cargo#6669)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we run it last it should be fine I can wait till we fine a better solution.


test:
runs-on: ${{ matrix.os }}
Expand Down