README.md (2420B)
1 # `ci` 2 3 `ci` is a CLI application that runs [`cargo`](https://doc.rust-lang.org/cargo/index.html) with 4 `clippy -q`, `t -q --doc`, and `t -q --tests` with all possible combinations of features defined in `Cargo.toml`. 5 6 `ci` avoids superfluous combinations of features. For example if feature `foo` automatically enables 7 feature `bar` and `bar` automatically enables feature `fizz`, then no combination of features that contains 8 `foo` and `bar`, `foo` and `fizz`, or `bar` and `fizz` will be tested. 9 10 `ci` writes to `stderr` iff a command errors for a reason other than `compile_error` or `stderr` is written 11 to on success. When a non-`compile_error` occurs, `ci` is terminated after writing the offending command and 12 features. Upon successful completion, `ci` writes all _unique_ messages that were collected. `stdout` is 13 never written to. 14 15 ## Why is this useful? 16 17 The number of possible configurations grows exponentially based on the number of features in `Cargo.toml`. 18 This can easily cause a crate to not be tested with certain combinations of features. Instead of manually 19 invoking `cargo` with each possible combination of features, this handles it automatically. 20 21 ## Options 22 23 * `clippy`: `cargo clippy -q` is invoked for each combination of features. 24 * `doc_tests`: `cargo t -q --doc` is invoked for each combination of features. 25 * `tests`: `cargo t -q --tests` is invoked for each combination of features. 26 * `--color`: `--color always` is passed to the above commands; otherwise without this option, `--color never` is 27 passed. 28 * `--dir <path to directory Cargo.toml is in>`: `ci` changes the working directory to the passed path (after 29 canonicalizing it) before executing. Without this, the current directory is used. 30 31 When `clippy`, `doc_tests`, and `tests` are not passed; then all three are invoked. 32 33 ## Limitations 34 35 Any use of `compile_error` _not_ related to incompatible features will be silently ignored. 36 37 ## License 38 39 Licensed under either of 40 41 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0). 42 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT). 43 44 at your option. 45 46 ## Contribution 47 48 Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, 49 as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.