ci: Pin a working nightly version

This commit is contained in:
Jonas Platte 2022-03-25 09:39:56 +01:00
parent 7a5be040fd
commit aa67464b78
No known key found for this signature in database
GPG Key ID: BBA95679259D342F
3 changed files with 11 additions and 10 deletions

View File

@ -21,7 +21,7 @@ jobs:
with: with:
profile: minimal profile: minimal
# Needed for use of unstable options # Needed for use of unstable options
toolchain: nightly toolchain: nightly-2022-03-23
override: true override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: Build docs - name: Build docs

View File

@ -20,7 +20,7 @@ jobs:
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly-2022-03-23
override: true override: true
components: rustfmt components: rustfmt
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
@ -40,7 +40,7 @@ jobs:
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly-2022-03-23
override: true override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: Run checks - name: Run checks
@ -60,7 +60,7 @@ jobs:
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly-2022-03-23
override: true override: true
components: clippy components: clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
@ -81,7 +81,7 @@ jobs:
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly toolchain: nightly-2022-03-23
override: true override: true
components: clippy components: clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1

View File

@ -10,6 +10,7 @@ mod spec_links;
use spec_links::check_spec_links; use spec_links::check_spec_links;
const MSRV: &str = "1.55"; const MSRV: &str = "1.55";
const NIGHTLY: &str = "nightly-2022-03-23";
#[derive(Args)] #[derive(Args)]
pub struct CiArgs { pub struct CiArgs {
@ -201,19 +202,19 @@ impl CiTask {
/// Check the formatting with the nightly version. /// Check the formatting with the nightly version.
fn fmt(&self) -> Result<()> { fn fmt(&self) -> Result<()> {
cmd!("rustup run nightly cargo fmt -- --check").run().map_err(Into::into) cmd!("rustup run {NIGHTLY} cargo fmt -- --check").run().map_err(Into::into)
} }
/// Check ruma crate with full feature with the nightly version. /// Check ruma crate with full feature with the nightly version.
fn nightly_full(&self) -> Result<()> { fn nightly_full(&self) -> Result<()> {
cmd!("rustup run nightly cargo check -p ruma --features full").run().map_err(Into::into) cmd!("rustup run {NIGHTLY} cargo check -p ruma --features full").run().map_err(Into::into)
} }
/// Lint default features with clippy with the nightly version. /// Lint default features with clippy with the nightly version.
fn clippy_default(&self) -> Result<()> { fn clippy_default(&self) -> Result<()> {
cmd!( cmd!(
" "
rustup run nightly cargo clippy rustup run {NIGHTLY} cargo clippy
--workspace --all-targets --features=full -- -D warnings --workspace --all-targets --features=full -- -D warnings
" "
) )
@ -225,7 +226,7 @@ impl CiTask {
fn clippy_all(&self) -> Result<()> { fn clippy_all(&self) -> Result<()> {
cmd!( cmd!(
" "
rustup run nightly cargo clippy rustup run {NIGHTLY} cargo clippy
--workspace --all-targets --features=__ci,compat -- -D warnings --workspace --all-targets --features=__ci,compat -- -D warnings
" "
) )
@ -253,7 +254,7 @@ impl CiTask {
} }
cmd!( cmd!(
" "
rustup run nightly cargo sort rustup run {NIGHTLY} cargo sort
--workspace --grouped --check --workspace --grouped --check
--order package,lib,features,dependencies,dev-dependencies,build-dependencies --order package,lib,features,dependencies,dev-dependencies,build-dependencies
" "