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

Better CI hygiene follow-up #655

Closed
tomtau opened this issue Jul 16, 2022 · 4 comments · Fixed by #705
Closed

Better CI hygiene follow-up #655

tomtau opened this issue Jul 16, 2022 · 4 comments · Fixed by #705

Comments

@tomtau
Copy link
Contributor

tomtau commented Jul 16, 2022

My current understanding of best practice is different from what we're currently doing here, though. Probably in a follow-up, it would be better practice to have

  • check
    • +pin-nightly generate-lockfile -Zminimal-versions
    • +pin bootstrap --locked
    • +msrv check --locked
  • lint
    • +pin-nightly generate-lockfile -Zminimal-versions
    • +pin bootstrap --locked
    • +pin clippy --locked -Dwarnings
    • +pin fmt --check
  • test
    • +pin-nightly generate-lockfile -Zminimal-versions
    • +pin bootstrap --locked
    • +pin-stable test --locked
  • future (allow-fail)
    • +beta generate-lockfile
    • +beta bootstrap --locked
    • +beta test --locked

The goal is to avoid anything changing between CI runs except the local code.

Originally posted by @CAD97 in #654 (comment)

@CAD97
Copy link
Contributor

CAD97 commented Jul 19, 2022

An additional challenge mode: we'd prefer if we can generate code which is warning free on all versions MSRV+, and it'd also be nice to test that the project compiles on all versions in the supported range.

cargo-hack may be of interest. For practicality reasons, I'd suggest checking a rolling stable-3 or stable-6 with hack rather than all the way down to MSRV.

But also this is probably way overengineered of a CI pipeline for what we actually need for the project (which is to be aware of MSRV bumps and run tests/lints/fmt on a recent ish toolchain)

@tomtau
Copy link
Contributor Author

tomtau commented Jul 20, 2022

@CAD97 any good references for CI pipelines?
tokio is using cargo hack for testing features: https://github.com/tokio-rs/tokio/blob/master/.github/workflows/ci.yml#L94 but they don't test the version ranges.

@CAD97
Copy link
Contributor

CAD97 commented Jul 20, 2022

Tracing does check the version range; I have a separate repo component with a workflow derived from tracing's workflow; it's --version-range to test a range of versions.

If we're updating the CI pipeline, it's probably best to move off of actions-rs (unmaintained) and to either just using run: rustup or dtolnay/rust-toolchain instead.

@tomtau
Copy link
Contributor Author

tomtau commented Jul 22, 2022

One more thing to add is to test no_std support: #409 (comment)

tomtau pushed a commit to tomtau/pest that referenced this issue Aug 29, 2022
tomtau pushed a commit to tomtau/pest that referenced this issue Sep 2, 2022
tomtau added a commit that referenced this issue Sep 10, 2022
closes #655

Co-authored-by: Tomas Tauber <me@tomtau.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants