Right now in CI, we just test
cargo build
./scripts/test_translator.py tests/
We should test more:
cargo fmt --check
RUSTFLAGS='-D warnings' cargo clippy --tests --all --all-features # includes cargo build
RUSTDOCFLAGS='-D warnings' cargo doc --all-features --document-private-items
cargo test --all-features
./scripts/test_translator.py tests/
# immunant/c2rust-testsuite CI
Note that we currently don't build with -all-features so, for example, the dynamic-instrumentation feature and that whole crate are not built in CI at all.
Furthermore, we should run the external tests, ./scripts/test_translator.py tests/ and immunant/c2rust-testsuite CI inside of cargo test. This not only simplifies testing workflows, but also hooks into external testing, such as crater runs.
I think we should definitely add these at least by the time we move CI to GitHub Actions instead of Azure Pipelines, but preferably earlier, as cargo clippy is almost passing (#474), and once it is, I'd like to keep it that way.
PRs and Tracking Issues:
Right now in CI, we just test
We should test more:
Note that we currently don't build with
-all-featuresso, for example, thedynamic-instrumentationfeature and that whole crate are not built in CI at all.Furthermore, we should run the external tests,
./scripts/test_translator.py tests/andimmunant/c2rust-testsuiteCI inside ofcargo test. This not only simplifies testing workflows, but also hooks into external testing, such as crater runs.I think we should definitely add these at least by the time we move CI to GitHub Actions instead of Azure Pipelines, but preferably earlier, as
cargo clippyis almost passing (#474), and once it is, I'd like to keep it that way.cargo fmt --checkcargo check --all-featurescargo buildRUSTFLAGS='-D warnings' cargo check --all-featuresRUSTFLAGS='-D warnings' cargo buildRUSTFLAGS='-D warnings' cargo clippy --tests --all-features(includescargo check)RUSTDOCFLAGS='-D warnings' cargo doc --all-features --document-private-items --no-depscargo test./scripts/test_translator.py tests/cargo test -p c2rust-analyzefails CI due to noFileCheck#593PRs and Tracking Issues:
--all-features,cargo fmt --check,cargo check,cargo test,cargo doc, andRUSTFLAGS=-Dwarningsto CI #483clippyin CI #594cargo test -p c2rust-analyzein CI #608