From 32fafe7be305066af83aef698343f760b7d60ec6 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 8 May 2023 10:44:05 +0200 Subject: [PATCH] Pin rust nightly version Works around https://github.com/rust-lang/rust/issues/111320. --- .github/workflows/benchmarks.yml | 3 ++- .github/workflows/ci.yml | 6 ++++-- .github/workflows/documentation.yml | 4 +++- .github/workflows/release-crypto-nodejs.yml | 7 +++++-- xtask/src/ci.rs | 15 ++++++++------- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 30255995c..adb0bfc32 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -15,8 +15,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2023-05-06 components: rustfmt - name: Run Benchmarks diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a53c585c3..4fb8cd866 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -327,8 +327,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2023-05-06 components: rustfmt - name: Cargo fmt @@ -363,8 +364,9 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2023-05-06 components: clippy - name: Load cache diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 47dc3a535..722785e99 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -20,7 +20,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2023-05-06 - name: Install Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/release-crypto-nodejs.yml b/.github/workflows/release-crypto-nodejs.yml index 2802ff199..8d2903ca0 100644 --- a/.github/workflows/release-crypto-nodejs.yml +++ b/.github/workflows/release-crypto-nodejs.yml @@ -78,8 +78,9 @@ jobs: - uses: actions/checkout@v3 if: "${{ !inputs.tag }}" - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2023-05-06 targets: ${{ matrix.target }} - name: Install Node.js uses: actions/setup-node@v3 @@ -114,7 +115,9 @@ jobs: - uses: actions/checkout@v3 if: "${{ !inputs.tag }}" - name: Install Rust - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2023-05-06 - name: Install Node.js uses: actions/setup-node@v3 - name: Build lib diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index 44cc61bf9..1668101cd 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -5,15 +5,16 @@ use xshell::{cmd, pushd}; use crate::{build_docs, workspace, DenyWarnings, Result}; +const NIGHTLY: &str = "nightly-2023-05-06"; +const WASM_TIMEOUT_ENV_KEY: &str = "WASM_BINDGEN_TEST_TIMEOUT"; +const WASM_TIMEOUT_VALUE: &str = "120"; + #[derive(Args)] pub struct CiArgs { #[clap(subcommand)] cmd: Option, } -const WASM_TIMEOUT_ENV_KEY: &str = "WASM_BINDGEN_TEST_TIMEOUT"; -const WASM_TIMEOUT_VALUE: &str = "120"; - #[derive(Subcommand)] enum CiCommand { /// Check style @@ -156,7 +157,7 @@ fn check_examples() -> Result<()> { } fn check_style() -> Result<()> { - cmd!("rustup run nightly cargo fmt -- --check").run()?; + cmd!("rustup run {NIGHTLY} cargo fmt -- --check").run()?; Ok(()) } @@ -168,9 +169,9 @@ fn check_typos() -> Result<()> { } fn check_clippy() -> Result<()> { - cmd!("rustup run nightly cargo clippy --all-targets -- -D warnings").run()?; + cmd!("rustup run {NIGHTLY} cargo clippy --all-targets -- -D warnings").run()?; cmd!( - "rustup run nightly cargo clippy --workspace --all-targets + "rustup run {NIGHTLY} cargo clippy --workspace --all-targets --exclude matrix-sdk-crypto --exclude xtask --no-default-features --features native-tls,experimental-sliding-sync,sso-login,experimental-timeline @@ -178,7 +179,7 @@ fn check_clippy() -> Result<()> { ) .run()?; cmd!( - "rustup run nightly cargo clippy --all-targets -p matrix-sdk-crypto + "rustup run {NIGHTLY} cargo clippy --all-targets -p matrix-sdk-crypto --no-default-features -- -D warnings" ) .run()?;