diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 08d6fcdc40..fa22516e30 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,9 +6,4 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ USER vscode -RUN rustup default nightly-2023-04-15 && \ - rustup target add wasm32-unknown-unknown --toolchain nightly-2023-04-15 - -RUN rustup component add rustfmt - RUN git config --global submodule.recurse true diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9f042bc1fe..93c28faaea 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -80,13 +80,7 @@ jobs: ~/.cargo/git/db/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2023-04-15 - components: rustfmt - target: wasm32-unknown-unknown - default: true + uses: dtolnay/rust-toolchain@nightly - name: Install weight-gen run: cargo install --git https://github.com/open-web3-stack/wasm-bencher.git --bin weight-gen --force - name: Setup cmake diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 495c0c51f5..92535772f9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -69,7 +69,7 @@ jobs: # Build WASM with Substrate Runtime Tool - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.7.0 + uses: chevdor/srtool-actions@v0.9.0 env: BUILD_OPTS: "--features on-chain-release-build,no-metadata-docs" with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7552415102..4ece87347f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,8 +45,6 @@ jobs: run: cargo +nightly fmt --all -- --check - name: Build run: make build-all - - name: Install clippy - run: rustup component add clippy - name: Run mandala-runtime clippy run: cargo clippy --features with-mandala-runtime -- -D warnings - name: Run karura-runtime clippy diff --git a/.github/workflows/test.yml.src b/.github/workflows/test.yml.src deleted file mode 100644 index c5f239f1a5..0000000000 --- a/.github/workflows/test.yml.src +++ /dev/null @@ -1,109 +0,0 @@ -# generate by yq eval 'explode(.)' test.yml.src > test.yml -# https://github.com/mikefarah/yq - -name: Test -on: - pull_request: - branches: - - master - - release-** - paths-ignore: - - '**/README.md' - push: - branches: - - master - - release-** - paths-ignore: - - '**/README.md' -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -jobs: - build: &setup - runs-on: - [self-hosted, linux] - env: - CARGO_INCREMENTAL: 0 - steps: - - &checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - &cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - &toolchain - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt - - &cmake - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.13 - - name: Check format - run: cargo +nightly fmt --all -- --check - - name: Build - run: make build-all - - name: Install clippy - run: rustup component add clippy - - name: Run mandala-runtime clippy - run: cargo clippy --features with-mandala-runtime -- -D warnings - - name: Run karura-runtime clippy - run: cargo clippy --features with-karura-runtime -- -D warnings - - name: Run acala-runtime clippy - run: cargo clippy --features with-acala-runtime -- -D warnings - - name: Run build benches - run: make build-benches - benchmarking: - <<: *setup - steps: - - *checkout - - *cache - - *toolchain - - name: Install cargo-nextest - uses: taiki-e/install-action@nextest - - *cmake - - name: Run benchmarking tests - run: make test-benchmarking - checks-and-tests: - <<: *setup - steps: - - *checkout - - *cache - - *toolchain - - name: Install cargo-nextest - uses: taiki-e/install-action@nextest - - *cmake - - name: Run runtime tests - run: make test-runtimes - - name: Run eth tests - run: make test-eth - - name: Check benchmarks - run: make check-benchmarks - - name: Check try-runtime - run: make check-try-runtime - - name: Check runtimes - run: make check-runtimes - e2e-tests: - <<: *setup - steps: - - *checkout - - *cache - - *toolchain - - *cmake - - name: Run e2e tests - run: make test-e2e - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Run ts tests - run: | - npm install -g yarn - make test-ts diff --git a/scripts/Dockerfile b/scripts/Dockerfile index c8053685d1..5ff544d2bd 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,9 +1,6 @@ FROM rust:buster as builder WORKDIR /app -RUN rustup default nightly-2023-04-15 && \ - rustup target add wasm32-unknown-unknown --toolchain nightly-2023-04-15 - RUN apt-get update && \ apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \ apt-get install -y cmake pkg-config libssl-dev git clang libclang-dev protobuf-compiler diff --git a/scripts/init.sh b/scripts/init.sh index 9a424454d2..a5e7899b8d 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -4,6 +4,6 @@ set -e echo "*** Initializing WASM build environment" -rustup default nightly-2023-04-15 +rustup component add rustfmt --toolchain nightly -rustup target add wasm32-unknown-unknown --toolchain nightly-2023-04-15 +rustup show diff --git a/scripts/profiling/Dockerfile b/scripts/profiling/Dockerfile index 08563a05b6..3597477c0d 100644 --- a/scripts/profiling/Dockerfile +++ b/scripts/profiling/Dockerfile @@ -1,9 +1,6 @@ FROM rust:buster as builder WORKDIR /app -RUN rustup default nightly-2023-04-15 && \ - rustup target add wasm32-unknown-unknown --toolchain nightly-2023-04-15 - RUN apt-get update && \ apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \ apt-get install -y cmake pkg-config libssl-dev git clang libclang-dev protobuf-compiler