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

Add cargo-all-features #152

Open
JonathanWoollett-Light opened this issue Jan 17, 2024 · 2 comments
Open

Add cargo-all-features #152

JonathanWoollett-Light opened this issue Jan 17, 2024 · 2 comments

Comments

@JonathanWoollett-Light
Copy link

JonathanWoollett-Light commented Jan 17, 2024

Currently the rust-vmm CI runs carg test --all-features see:

"command": "cargo test --all-features --workspace",

This doesn't work for certain cases e.g. rust-vmm/vhost#218 (comment).

To test all features while supporting configuration for exclusive features unittests-gnu should run cargo test-all-features using https://github.com/frewsxcv/cargo-all-features.

stefano-garzarella added a commit to stefano-garzarella/vhost that referenced this issue Jan 19, 2024
This is based on `rust-vmm-ci/.buildkite/test_description.json`.
We can't run rust-vmm-ci tests because they enable all the features with
`--all-features` and our crates have features that may not be compatible with
others (e.g. `xen`). Waiting to solve this problem in rust-vmm-ci (see
rust-vmm/rust-vmm-ci#152), we use a custom
pipeline based on that but that does not use `--all-features`.

Signed-off-by: Stefano Garzarella <[email protected]>
stefano-garzarella added a commit to stefano-garzarella/vhost that referenced this issue Jan 19, 2024
This is based on `rust-vmm-ci/.buildkite/test_description.json`.
We can't run rust-vmm-ci tests because they enable all the features with
`--all-features` and our crates have features that may not be compatible with
others (e.g. `xen`). Waiting to solve this problem in rust-vmm-ci (see
rust-vmm/rust-vmm-ci#152), we use a custom
pipeline based on that but that does not use `--all-features`.

Signed-off-by: Stefano Garzarella <[email protected]>
stefano-garzarella added a commit to stefano-garzarella/vhost that referenced this issue Jan 19, 2024
This is based on `rust-vmm-ci/.buildkite/test_description.json`.
We can't run rust-vmm-ci tests because they enable all the features with
`--all-features` and our crates have features that may not be compatible with
others (e.g. `xen`). Waiting to solve this problem in rust-vmm-ci (see
rust-vmm/rust-vmm-ci#152), we use a custom
pipeline based on that but that does not use `--all-features`.

Signed-off-by: Stefano Garzarella <[email protected]>
stefano-garzarella added a commit to rust-vmm/vhost that referenced this issue Jan 22, 2024
This is based on `rust-vmm-ci/.buildkite/test_description.json`.
We can't run rust-vmm-ci tests because they enable all the features with
`--all-features` and our crates have features that may not be compatible with
others (e.g. `xen`). Waiting to solve this problem in rust-vmm-ci (see
rust-vmm/rust-vmm-ci#152), we use a custom
pipeline based on that but that does not use `--all-features`.

Signed-off-by: Stefano Garzarella <[email protected]>
@epilys
Copy link
Member

epilys commented Jan 22, 2024

An alternative to consider is https://github.com/taiki-e/cargo-hack which runs a cargo subcommand for different target environments and deduplicated feature combinations with the ability of excluding specific combos (e.g. for incompatible features).

@epilys
Copy link
Member

epilys commented Jan 24, 2024

Note for the future: If artifact storage size becomes a problem on CI because of running different feature sets, we could use https://github.com/holmgr/cargo-sweep to cleanup between runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants