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

Re-work the CI pipeline and test script #370

Closed
wants to merge 6 commits into from

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Apr 26, 2022

Make an attempt at improving test coverage and improving the CI pipeline.

Leaving as draft until #374 gets sorted, it includes changes to the CI pipeline.

The `test.sh` has some code if guarded on an env var `DO_LINT` this
variable is mis-named because the code only runs `cargo fmt` - this is
not a linter, `clippy` is a linter.

Re-name `DO_LINT` -> `DO_FMT` in the CI script and the CI workflow.
Currently the build output directory is hardcoded into the `test.sh`
script, this means that for folks who use a different build output
directory the test script fails to run the examples. We can overcome
this by running the examples directly using `cargo`.
Use `set -e` to fail the script if any command fails. Add sanity calls
to `cargo` and `rustc`.
To help keep the script executing in order of importance put the fuzzing
stuff at the bottom near the benching stuff, this way all sanity checks
will have been run.
In an effort to make CI more efficient add an if guard on env var
`DO_FEATURE_MATRIX` that:

- Runs tests for all features
- Runs tests for each feature individually
- Runs all the examples

Add default sanity tests (build and test) that will always be run
irrespective of env vars used when executing the script.

This is similar to how we test in `rust-secp256k1`.
Re-work the CI work flow based on new changes to the `test.sh` stript.

- Put `cargo fmt` in its own job (implies sanity tests also)
- Run the feature matrix of tests in a separate job
- Do bench marks in a separate job
- Put fuzzing in a separate job
- Do integration tests in a separate job
@tcharding
Copy link
Member Author

This more or less went in through different PRs.

@tcharding tcharding closed this May 26, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant