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

cargo-check: Run with both stable and MSRV Compilers #737

Conversation

tgonzalezorlandoarm
Copy link
Member

  • Introduce a RUST_TOOLCHAIN_VERSION environment variable that gets used in ci.sh to decide on the compiler to use.
  • Use this variable when running variable on nightly (coverage) or build checks on each pr.
  • cargo check will now cover all feature cases with both MSRV and stable, which it was not doing. Fix the cargo check build with MSRV for certain options that were not being covered by fixing versions on the Cargo.lock file.

'rustup toolchain install' installs a toolchain but does not
necessarily enforce the use of that toolchain.

 * Enforce the use of the installed toolchain via 'rustup default',
   which also installs it if needed.

Signed-off-by: Tomás González <[email protected]>
 * Run 'cargo check' only for the current Rust compiler.

This can be used in a future commit to run two separate jobs with
each compiler version, and test all feature combinations with each
compiler.

Signed-off-by: Tomás González <[email protected]>
Introduce a new RUST_TOOLCHAIN_VERSION environment variable for
that can be used from inside the ci.sh script to override (only for
the current directory) the current rust toolchain.

Signed-off-by: Tomás González <[email protected]>
Currently, we are defining a variable in ci.sh to use the MSRV for
coverage builds.

 * Install the MSRV Rust Toolchain from the ci job
 * Remove the MSRV variable from the ci.sh script

This simplifies the logic and avoids potential errors.

Signed-off-by: Tomás González <[email protected]>
The new rs-version input variable allows to run the ci.sh tests
with a different rust version other than stable (the default value).

Signed-off-by: Tomás González <[email protected]>
Currently, the build-all-provider job runs ci.sh cargo-check.

 * Run all cargo checks for both MSRV and Rust stable. Separate said
   job into two to support both compiler configurations.

Signed-off-by: Tomás González <[email protected]>
Fix the version to one that is compatible with MSRV

Signed-off-by: Tomás González <[email protected]>
@tgonzalezorlandoarm tgonzalezorlandoarm added the testing Task related to testing label Nov 21, 2023
@tgonzalezorlandoarm tgonzalezorlandoarm self-assigned this Nov 21, 2023
@tgonzalezorlandoarm tgonzalezorlandoarm requested a review from a team as a code owner November 21, 2023 13:06
ci.sh Outdated Show resolved Hide resolved
@tgonzalezorlandoarm tgonzalezorlandoarm merged commit fc68e11 into parallaxsecond:main Nov 23, 2023
15 checks passed
@tgonzalezorlandoarm tgonzalezorlandoarm deleted the tg/cargo-check-updated branch November 23, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Task related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants