From 4e32ae1fbe24e24316c2499fdff61b7f20bea3b6 Mon Sep 17 00:00:00 2001 From: Mira Ressel Date: Tue, 11 Apr 2023 17:02:50 +0200 Subject: [PATCH] use stable rust toolchain in ci (#13830) cargo-fmt stays on the nightly pipeline; our fmt config uses a heap of unstable features. --- .../scripts/ci/gitlab/pipeline/build.yml | 3 +-- substrate/scripts/ci/gitlab/pipeline/test.yml | 27 +++++++------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/substrate/scripts/ci/gitlab/pipeline/build.yml b/substrate/scripts/ci/gitlab/pipeline/build.yml index 0a36599c70..806a4ef970 100644 --- a/substrate/scripts/ci/gitlab/pipeline/build.yml +++ b/substrate/scripts/ci/gitlab/pipeline/build.yml @@ -148,7 +148,6 @@ build-rustdoc: variables: SKIP_WASM_BUILD: 1 DOC_INDEX_PAGE: "sc_service/index.html" # default redirected page - RUSTY_CACHIER_TOOLCHAIN: nightly # this variable gets overriden by "rusty-cachier environment inject", use the value as default CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target" artifacts: @@ -163,7 +162,7 @@ build-rustdoc: artifacts: false script: - rusty-cachier snapshot create - - time cargo +nightly doc --locked --workspace --all-features --verbose --no-deps + - time cargo doc --locked --workspace --all-features --verbose --no-deps - rm -f $CARGO_TARGET_DIR/doc/.lock - mv $CARGO_TARGET_DIR/doc ./crate-docs # FIXME: remove me after CI image gets nonroot diff --git a/substrate/scripts/ci/gitlab/pipeline/test.yml b/substrate/scripts/ci/gitlab/pipeline/test.yml index 331b382e41..50f9262150 100644 --- a/substrate/scripts/ci/gitlab/pipeline/test.yml +++ b/substrate/scripts/ci/gitlab/pipeline/test.yml @@ -61,21 +61,17 @@ cargo-clippy: needs: - job: cargo-fmt artifacts: false - variables: - RUSTY_CACHIER_TOOLCHAIN: nightly extends: - .docker-env - .test-refs script: - rusty-cachier snapshot create - - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets + - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --all-targets - rusty-cachier cache upload cargo-check-benches: stage: test variables: - # Override to use nightly toolchain - RUSTY_CACHIER_TOOLCHAIN: "nightly" CI_JOB_NAME: "cargo-check-benches" extends: - .docker-env @@ -105,7 +101,7 @@ cargo-check-benches: - echo "___Running benchmarks___"; - case ${CI_NODE_INDEX} in 1) - SKIP_WASM_BUILD=1 time cargo +nightly check --locked --benches --all; + SKIP_WASM_BUILD=1 time cargo check --locked --benches --all; cargo run --locked --release -p node-bench -- ::trie::read::small --json | tee ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA/::trie::read::small.json; echo "___Uploading cache for rusty-cachier___"; @@ -301,7 +297,6 @@ test-frame-examples-compile-to-wasm: - .docker-env - .test-refs variables: - RUSTY_CACHIER_TOOLCHAIN: nightly # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. RUSTFLAGS: "-C debug-assertions" @@ -309,9 +304,9 @@ test-frame-examples-compile-to-wasm: script: - rusty-cachier snapshot create - cd ./frame/examples/offchain-worker/ - - cargo +nightly build --locked --target=wasm32-unknown-unknown --no-default-features + - cargo build --locked --target=wasm32-unknown-unknown --no-default-features - cd ../basic - - cargo +nightly build --locked --target=wasm32-unknown-unknown --no-default-features + - cargo build --locked --target=wasm32-unknown-unknown --no-default-features - rusty-cachier cache upload test-linux-stable-int: @@ -344,8 +339,6 @@ check-tracing: needs: - job: test-linux-stable-int artifacts: false - variables: - RUSTY_CACHIER_TOOLCHAIN: nightly extends: - .docker-env - .test-refs @@ -353,8 +346,8 @@ check-tracing: script: - rusty-cachier snapshot create # with-tracing must be explicitly activated, we run a test to ensure this works as expected in both cases - - time cargo +nightly test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features - - time cargo +nightly test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features --features=with-tracing + - time cargo test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features + - time cargo test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features --features=with-tracing - rusty-cachier cache upload # more information about this job can be found here: @@ -369,7 +362,6 @@ test-full-crypto-feature: - .docker-env - .test-refs variables: - RUSTY_CACHIER_TOOLCHAIN: nightly # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. RUSTFLAGS: "-C debug-assertions" @@ -377,9 +369,9 @@ test-full-crypto-feature: script: - rusty-cachier snapshot create - cd primitives/core/ - - time cargo +nightly build --locked --verbose --no-default-features --features full_crypto + - time cargo build --locked --verbose --no-default-features --features full_crypto - cd ../application-crypto - - time cargo +nightly build --locked --verbose --no-default-features --features full_crypto + - time cargo build --locked --verbose --no-default-features --features full_crypto - rusty-cachier cache upload check-rustdoc: @@ -388,12 +380,11 @@ check-rustdoc: - .docker-env - .test-refs variables: - RUSTY_CACHIER_TOOLCHAIN: nightly SKIP_WASM_BUILD: 1 RUSTDOCFLAGS: "-Dwarnings" script: - rusty-cachier snapshot create - - time cargo +nightly doc --locked --workspace --all-features --verbose --no-deps + - time cargo doc --locked --workspace --all-features --verbose --no-deps - rusty-cachier cache upload cargo-check-each-crate: