README.md (2527B)
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 working directory and all ancestor directories are searched 30 for `Cargo.toml` before changing the working directory to its location. 31 32 When `clippy`, `doc_tests`, and `tests` are not passed; then all three are invoked. 33 34 ## Limitations 35 36 Any use of `compile_error` _not_ related to incompatible features will be silently ignored. 37 38 ## License 39 40 Licensed under either of 41 42 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0). 43 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT). 44 45 at your option. 46 47 ## Contribution 48 49 Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, 50 as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.