From 4b6c262ab575c905a353d2e617d1826acb814902 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Wed, 2 Aug 2023 19:13:51 +1000 Subject: [PATCH 01/19] :rocket: update `check_tests` pipeline to use org `runtime` runner Signed-off-by: Anathan (Ana) Ye --- .github/workflows/check_tests.yml | 250 ++++++------------- .github/workflows/publish_draft_releases.yml | 13 +- 2 files changed, 89 insertions(+), 174 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index ab2a8e4b3..92d7a41b0 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -8,32 +8,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - AWS_REGION: us-east-1 - AWS_INSTANCE_TYPE: c5.2xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 1024 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive jobs: start-integration-test-checks: timeout-minutes: 480 - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} + runs-on: runtime + container: + image: ubuntu:20.04 steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - uses: actions/checkout@v2 - name: install sccache env: @@ -53,7 +35,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | cargo- - name: cache sccache @@ -68,8 +50,8 @@ jobs: run: sccache --start-server - name: init run: | - sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + apt update + apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env @@ -77,6 +59,15 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo build + uses: actions/cache@v2 + with: + path: | + ./target + key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + cargo-build- - name: Run Integration Tests env: RUST_BACKTRACE: full @@ -89,44 +80,12 @@ jobs: RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=manta --no-default-features - name: stop sccache server run: sccache --stop-server || true - stop-integration-test-checks: - timeout-minutes: 15 - needs: start-integration-test-checks - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-integration-test-checks.outputs.aws-region }} - runner-label: ${{ needs.start-integration-test-checks.outputs.runner-label }} - aws-instance-id: ${{ needs.start-integration-test-checks.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true start-benchmark-checks: timeout-minutes: 180 - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} + runs-on: runtime + container: + image: ubuntu:20.04 steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - uses: actions/checkout@v2 - name: install sccache env: @@ -146,7 +105,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | cargo- - name: cache sccache @@ -167,8 +126,8 @@ jobs: SCCACHE_DIR: /home/runner/.cache/sccache CARGO_TERM_COLOR: always run: | - sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + apt update + apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env @@ -176,16 +135,25 @@ jobs: rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown df -h - sudo apt remove -y '^dotnet-.*' - sudo apt remove -y '^mongodb-.*' - sudo apt remove -y '^mysql-.*' - sudo apt remove -y '^postgresql-*' - sudo apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - sudo apt autoremove -y - sudo apt clean - sudo rm -rf /usr/local/lib/android - sudo rm -rf /usr/share/dotnet + apt remove -y '^dotnet-.*' + apt remove -y '^mongodb-.*' + apt remove -y '^mysql-.*' + apt remove -y '^postgresql-*' + apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri + apt autoremove -y + apt clean + rm -rf /usr/local/lib/android + rm -rf /usr/share/dotnet df -h + - name: cache cargo build + uses: actions/cache@v2 + with: + path: | + ./target + key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + cargo-build- - name: build benchmarking binary run: | RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks @@ -241,43 +209,12 @@ jobs: --steps=2 - name: stop sccache server run: sccache --stop-server || true - stop-benchmark-checks: - needs: start-benchmark-checks - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-benchmark-checks.outputs.aws-region }} - runner-label: ${{ needs.start-benchmark-checks.outputs.runner-label }} - aws-instance-id: ${{ needs.start-benchmark-checks.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true start-unit-test-checks: timeout-minutes: 480 - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} + runs-on: runtime + container: + image: ubuntu:20.04 steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - uses: actions/checkout@v2 - name: install sccache env: @@ -297,7 +234,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | cargo- - name: cache sccache @@ -312,8 +249,8 @@ jobs: run: sccache --start-server - name: init run: | - sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + apt update + apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env @@ -322,16 +259,25 @@ jobs: rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown df -h - sudo apt remove -y '^dotnet-.*' - sudo apt remove -y '^mongodb-.*' - sudo apt remove -y '^mysql-.*' - sudo apt remove -y '^postgresql-*' - sudo apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - sudo apt autoremove -y - sudo apt clean - sudo rm -rf /usr/local/lib/android - sudo rm -rf /usr/share/dotnet + apt remove -y '^dotnet-.*' + apt remove -y '^mongodb-.*' + apt remove -y '^mysql-.*' + apt remove -y '^postgresql-*' + apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri + apt autoremove -y + apt clean + rm -rf /usr/local/lib/android + rm -rf /usr/share/dotnet df -h + - name: cache cargo build + uses: actions/cache@v2 + with: + path: | + ./target + key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + cargo-build- - name: Run Unit Tests env: RUST_BACKTRACE: full @@ -343,23 +289,6 @@ jobs: RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime --workspace --exclude integration-tests - name: stop sccache server run: sccache --stop-server || true - stop-unit-test-checks: - needs: start-unit-test-checks - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-unit-test-checks.outputs.aws-region }} - runner-label: ${{ needs.start-unit-test-checks.outputs.runner-label }} - aws-instance-id: ${{ needs.start-unit-test-checks.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true start-congestion-test-checks: timeout-minutes: 480 strategy: @@ -367,29 +296,15 @@ jobs: runtime: - name: manta-runtime - name: calamari-runtime - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} + runs-on: runtime + container: + image: ubuntu:20.04 steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - uses: actions/checkout@v2 - name: init run: | - sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + apt update + apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env @@ -397,6 +312,15 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo build + uses: actions/cache@v2 + with: + path: | + ./target + key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + cargo-build- - name: Run congestion test (allowed to fail) id: congestion_test run: | @@ -434,21 +358,3 @@ jobs: const above = status === 'success' ? 'is above' : 'is NOT above'; const updatedComment = `${statusIcon} ${comment_text} ${above} the target daily congestion cost`; await octokit.rest.issues.updateComment({ owner, repo, comment_id: existingComment.id, body: updatedComment }); - stop-congestion-test-checks: - timeout-minutes: 15 - needs: start-congestion-test-checks - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-congestion-test-checks.outputs.aws-region }} - runner-label: ${{ needs.start-congestion-test-checks.outputs.runner-label }} - aws-instance-id: ${{ needs.start-congestion-test-checks.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index df3c5f086..a30ba6e0f 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -102,9 +102,9 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - cargo- + cargo-registry- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -129,6 +129,15 @@ jobs: rustup target add wasm32-unknown-unknown rustup install 1.69.0 rustup target add wasm32-unknown-unknown --toolchain 1.69.0 + - name: cache cargo build + uses: actions/cache@v2 + with: + path: | + ./target + key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + cargo-build- - name: build shell: bash env: From 7b44385a0d357d3a1dad56c5338572055273f6d4 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Wed, 2 Aug 2023 19:43:49 +1000 Subject: [PATCH 02/19] :bug: update `Run tests` pipeline with required changes for org arc runner migration Signed-off-by: Anathan (Ana) Ye --- .github/CODEOWNERS | 1 + .github/PULL_REQUEST_TEMPLATE.md | 4 + .github/workflows/check_tests.yml | 186 +++++------- .github/workflows/docker.yml | 1 - .../workflows/integration_test_calamari.yml | 287 +++++------------- .github/workflows/integration_test_manta.yml | 165 ++-------- .github/workflows/label_checker.yml | 8 + .github/workflows/metadata_diff.yml | 76 ++--- .github/workflows/publish_draft_releases.yml | 50 +-- .github/workflows/run_all_benchmarks.yml | 66 +--- .github/workflows/run_linters.yml | 26 +- .github/workflows/runtime_upgrade_test.yml | 65 +--- .github/workflows/try-runtime-mainnet.yml | 55 +--- tests/stress_benchmark_test.ts | 116 ++++++- zombienet/tests/0001-block-production.toml | 4 + zombienet/tests/0001-block-production.zndsl | 4 +- 16 files changed, 359 insertions(+), 755 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..3ce580efb --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +.github/ @Manta-Network/devops diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9ee090a90..bc54016d2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,6 +8,10 @@ Before we can approve this PR for merge, please make sure that **all** the follo - [ ] Added **one or more** labels from the `A-` and `C-` groups to this PR - [ ] Explicitly labelled `A-calamari` and/or `A-manta` if your changes are meant for/impact either of these (CI depends on it) - [ ] Re-reviewed `Files changed` in the Github PR explorer. +- [ ] Add `A-integration-test-checks` to run **start-integration-test-checks** (Required) +- [ ] Add `A-benchmark-checks` to run **start-benchmark-check** (Required) +- [ ] Add `A-unit-test-checks` to run **start-unit-test-checks** (Required) +- [ ] Add `A-congestion-test-checks` to run **start-integration-test-checks** (Optional) Situational Notes: diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 92d7a41b0..b8fbd8a29 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -2,17 +2,19 @@ name: Run Tests on: pull_request: branches: [manta] + types: [opened, reopened, synchronize, labeled] push: branches: [manta] concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: DEBIAN_FRONTEND: noninteractive jobs: start-integration-test-checks: + if: contains(github.event.pull_request.labels.*.name, 'A-integration-test-checks') timeout-minutes: 480 - runs-on: runtime + runs-on: ubuntu-20.04 container: image: ubuntu:20.04 steps: @@ -22,6 +24,8 @@ jobs: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | + apt update + apt install -y curl SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -29,26 +33,18 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false with: - path: /home/runner/.cache/sccache + path: ~/.cache/sccache key: sccache-${{ hashFiles('**/Cargo.lock') }} restore-keys: | sccache- - name: start sccache server run: sccache --start-server - name: init + shell: bash run: | apt update apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git @@ -59,39 +55,41 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Run Integration Tests + shell: bash env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 120G - SCCACHE_DIR: /home/runner/.cache/sccache + # SCCACHE_CACHE_SIZE: 120G + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: ~/.cache/sccache run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=calamari --no-default-features - RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=manta --no-default-features + RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=calamari --no-default-features --timings + RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=manta --no-default-features --timings - name: stop sccache server run: sccache --stop-server || true start-benchmark-checks: timeout-minutes: 180 runs-on: runtime + if: contains(github.event.pull_request.labels.*.name, 'A-benchmark-checks') container: image: ubuntu:20.04 steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 - name: install sccache env: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | + apt update + apt install -y curl wget + npm install -g yarn && node --version && node --version && npm --version && yarn --version SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -99,31 +97,24 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false with: - path: /home/runner/.cache/sccache + path: ~/.cache/sccache key: sccache-${{ hashFiles('**/Cargo.lock') }} restore-keys: | sccache- - name: start sccache server run: sccache --start-server - - name: build benchmarking binary + - name: rust setup + shell: bash env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 120G - SCCACHE_DIR: /home/runner/.cache/sccache + # SCCACHE_CACHE_SIZE: 120G + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: ~/.cache/sccache CARGO_TERM_COLOR: always run: | apt update @@ -134,36 +125,18 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - df -h - apt remove -y '^dotnet-.*' - apt remove -y '^mongodb-.*' - apt remove -y '^mysql-.*' - apt remove -y '^postgresql-*' - apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - apt autoremove -y - apt clean - rm -rf /usr/local/lib/android - rm -rf /usr/share/dotnet - df -h - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: build benchmarking binary run: | - RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks + RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks --timings - name: create-calamari-chainspec run: | - ${{ github.workspace }}/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/fork.json + $GITHUB_WORKSPACE/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json - name: append manta-pay storage for Calamari run: | - wget -P ${{ github.workspace }}/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json - cd ${{ github.workspace }}/tests + wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json + cd $GITHUB_WORKSPACE/tests yarn install yarn node append_storage.js @@ -171,24 +144,25 @@ jobs: env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 120G - SCCACHE_DIR: /home/runner/.cache/sccache + # SCCACHE_CACHE_SIZE: 120G + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: ~/.cache/sccache run: | - ${{ github.workspace }}/target/release/manta \ + $GITHUB_WORKSPACE/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/fork.json \ + --chain=$GITHUB_WORKSPACE/tests/data/fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ --steps=2 - name: create-manta-dev-chainspec run: | - ${{ github.workspace }}/target/release/manta build-spec --chain manta-dev --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/fork.json + $GITHUB_WORKSPACE/target/release/manta build-spec --chain manta-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json - name: append manta-pay storage for Manta run: | - wget -P ${{ github.workspace }}/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json - cd ${{ github.workspace }}/tests + wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json + cd $GITHUB_WORKSPACE/tests yarn install yarn node append_storage.js @@ -196,13 +170,14 @@ jobs: env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 120G - SCCACHE_DIR: /home/runner/.cache/sccache + # SCCACHE_CACHE_SIZE: 120G + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: ~/.cache/sccache run: | - ${{ github.workspace }}/target/release/manta \ + $GITHUB_WORKSPACE/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/fork.json \ + --chain=$GITHUB_WORKSPACE/tests/data/fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ @@ -210,6 +185,7 @@ jobs: - name: stop sccache server run: sccache --stop-server || true start-unit-test-checks: + if: contains(github.event.pull_request.labels.*.name, 'A-unit-test-checks') timeout-minutes: 480 runs-on: runtime container: @@ -221,6 +197,8 @@ jobs: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | + apt update + apt install -y curl SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -228,26 +206,18 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false with: - path: /home/runner/.cache/sccache + path: ~/.cache/sccache key: sccache-${{ hashFiles('**/Cargo.lock') }} restore-keys: | sccache- - name: start sccache server run: sccache --start-server - name: init + shell: bash run: | apt update apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git @@ -258,50 +228,36 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - df -h - apt remove -y '^dotnet-.*' - apt remove -y '^mongodb-.*' - apt remove -y '^mysql-.*' - apt remove -y '^postgresql-*' - apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - apt autoremove -y - apt clean - rm -rf /usr/local/lib/android - rm -rf /usr/share/dotnet - df -h - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Run Unit Tests + shell: bash env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 240 - SCCACHE_DIR: /home/runner/.cache/sccache + # SCCACHE_CACHE_SIZE: 240 + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: ~/.cache/sccache run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime --workspace --exclude integration-tests + RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime --workspace --exclude integration-tests --timings - name: stop sccache server run: sccache --stop-server || true start-congestion-test-checks: + if: contains(github.event.pull_request.labels.*.name, 'A-congestion-test-checks') timeout-minutes: 480 strategy: matrix: runtime: - name: manta-runtime - name: calamari-runtime - runs-on: runtime + runs-on: ubuntu-20.04 container: image: ubuntu:20.04 steps: - uses: actions/checkout@v2 - name: init + shell: bash run: | apt update apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git @@ -312,20 +268,16 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + echo "$HOME/.local/bin" >> $GITHUB_PATH + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Run congestion test (allowed to fail) id: congestion_test + shell: bash run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo test --package ${{ matrix.runtime.name }} --lib -- fee::multiplier_tests::multiplier_growth_simulator_and_congestion_budget_test --exact --nocapture --ignored + RUSTC_BOOTSTRAP=1 cargo test --package ${{ matrix.runtime.name }} --lib -- fee::multiplier_tests::multiplier_growth_simulator_and_congestion_budget_test --exact --nocapture --ignored --timings continue-on-error: true - name: Print res id: congestion_test_res diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a0da51a65..fb36eb251 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -46,7 +46,6 @@ jobs: image_id=`cat docker_id.log` echo $image_id echo "Adjusting permissions so we can access docker logs..." - sudo chmod -R +x /var/lib/docker/ sudo cat /var/lib/docker/containers/${image_id}/${image_id}-json.log - uses: actions/checkout@v2 with: diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 554d97898..765dfe09e 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -6,21 +6,14 @@ on: branches: [manta] types: [opened, reopened, synchronize, labeled] concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: - AWS_INSTANCE_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb24HEQ++aNFWaqVyMtIs6GotUB8R+q61XOoI2z6uMj - AWS_REGION: us-east-1 - AWS_SUBNET_ID: subnet-08c26caf0a52b7c19 - AWS_SECURITY_GROUP_ID: sg-0315bffea9042ac9b - AWS_INSTANCE_TYPE: c5.2xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 32 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive POLKADOT_BINARY: https://github.com/paritytech/polkadot/releases/download/v1.0.0/polkadot jobs: print-rust-versions: - if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') + if: contains(github.event.pull_request.labels.*.name, 'A-calamari') runs-on: ubuntu-20.04 container: image: paritytech/ci-linux:production @@ -36,18 +29,21 @@ jobs: echo "::set-output name=nightly::$(rustc +nightly --version)" build-node-current: timeout-minutes: 120 - if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - needs: start-node-builder-current - runs-on: ${{ needs.start-node-builder-current.outputs.runner-label }} + if: contains(github.event.pull_request.labels.*.name, 'A-calamari') + runs-on: ubuntu-20.04 env: CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 - name: install sccache env: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | + sudo apt update && sudo apt install -y curl SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -55,15 +51,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -75,15 +62,18 @@ jobs: - name: start sccache server run: sccache --start-server - name: init + shell: bash run: | sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + sudo apt install -y pkg-config libssl-dev protobuf-compiler git clang curl protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: build env: RUST_BACKTRACE: full @@ -105,14 +95,14 @@ jobs: path: target/production/manta calamari-integration-test: if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - needs: [build-node-current, start-calamari-integration-tester] - runs-on: ${{ needs.start-calamari-integration-tester.outputs.runner-label }} + needs: [build-node-current] + runs-on: runtime-integration-test timeout-minutes: 240 strategy: fail-fast: false matrix: chain-spec: - - id: calamari-local + - id: calamari-dev expected: block-count: relay: 25 @@ -135,17 +125,26 @@ jobs: name: manta - name: mv and chmod manta run: | - mv ${{ github.workspace }}/manta $HOME/.local/bin/ + mv $GITHUB_WORKSPACE/manta $HOME/.local/bin/ chmod +x $HOME/.local/bin/manta - ls -ahl ${{ github.workspace }}/ + ls -ahl $GITHUB_WORKSPACE/ ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | + sudo apt update && sudo apt install -y curl curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot ls -ahl $HOME/.local/bin/ + - name: Install dasel cli + run: | + source ${HOME}/.cargo/env + curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel + mv ./dasel $HOME/.cargo/bin/dasel + dasel --version - id: create-chainspec + shell: bash run: | + jq --version manta build-spec --chain ${{ matrix.chain-spec.id }} --disable-default-bootnode --raw > $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-spec.json jq \ --sort-keys \ @@ -181,24 +180,18 @@ jobs: with: name: ${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-spec.json path: /home/runner/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-spec.json - - name: Install dasel cli - run: | - source ${HOME}/.cargo/env - curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel - mv ./dasel $HOME/.cargo/bin/dasel - dasel --version - name: create launch config run: | source ${HOME}/.cargo/env - ls -ahl ${{ github.workspace }}/Manta - cd ${{ github.workspace }} + ls -ahl $GITHUB_WORKSPACE/Manta + cd $GITHUB_WORKSPACE dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' - cat ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - if: always() uses: actions/upload-artifact@v2 with: @@ -222,32 +215,32 @@ jobs: run: npm install -g pm2 - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: init measure-block-time rococo run: | - cd ${{ github.workspace }}/dev-tools-rococo/measure-block-time + cd $GITHUB_WORKSPACE/dev-tools-rococo/measure-block-time yarn install pm2 start index.js \ --name measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }} \ - --output ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log \ + --output $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log \ --no-autorestart \ -- \ --address=ws://127.0.0.1:9911 - name: init measure-block-time calamari run: | - cd ${{ github.workspace }}/dev-tools-calamari/measure-block-time + cd $GITHUB_WORKSPACE/dev-tools-calamari/measure-block-time yarn install pm2 start index.js \ --name measure-block-time-${{ matrix.chain-spec.id }} \ - --output ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log \ + --output $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log \ --no-autorestart \ -- \ --address=ws://127.0.0.1:9921 @@ -258,21 +251,21 @@ jobs: - name: run test suites run: | sleep 120 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn correctness_test --address=ws://127.0.0.1:9921 --exit yarn performance_test --address=ws://127.0.0.1:9921 --exit - name: check if target block is finalized run: | - cd ${{ github.workspace }}/dev-tools-calamari/check-finalized-block + cd $GITHUB_WORKSPACE/dev-tools-calamari/check-finalized-block yarn install yarn node index.js --para_address=ws://127.0.0.1:9921 --relay_address=ws://127.0.0.1:9911 --target_block=${{ matrix.chain-spec.expected.block-count.para }} if [ $? == 1 ]; then echo "Failed to finalize the target block - ${{ matrix.chain-spec.expected.block-count.para }}"; exit 1; fi - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }} pm2 stop measure-block-time-${{ matrix.chain-spec.id }} pm2 stop zombienet @@ -280,118 +273,118 @@ jobs: uses: actions/upload-artifact@v2 with: name: zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: zombienet-for-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - name: parse rococo block times run: | - grep '#.*' ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log | while read -r line; do words=($line); echo ${words[6]},${words[10]} | tee ${{ github.workspace }}/block-time-rococo.csv; done - if [ ! -f ${{ github.workspace }}/block-time-rococo.csv ]; then echo "block times not detected"; exit 1; fi - jq -s -R '[split("\n") | .[] | select(length > 0) | split(",") | {block:.[0]|tonumber, time:.[1]|tonumber} ]' ${{ github.workspace }}/block-time-rococo.csv > ${{ github.workspace }}/block-time-rococo.json + grep '#.*' $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log | while read -r line; do words=($line); echo ${words[6]},${words[10]} | tee $GITHUB_WORKSPACE/block-time-rococo.csv; done + if [ ! -f $GITHUB_WORKSPACE/block-time-rococo.csv ]; then echo "block times not detected"; exit 1; fi + jq -s -R '[split("\n") | .[] | select(length > 0) | split(",") | {block:.[0]|tonumber, time:.[1]|tonumber} ]' $GITHUB_WORKSPACE/block-time-rococo.csv > $GITHUB_WORKSPACE/block-time-rococo.json - if: always() uses: actions/upload-artifact@v2 with: name: block-time-rococo-relay-for-${{ matrix.chain-spec.id }}.json - path: ${{ github.workspace }}/block-time-rococo.json + path: $GITHUB_WORKSPACE/block-time-rococo.json - if: always() name: test - calamari alice peered successfully run: | - cd ${{ github.workspace }}/zombienet-tool/javascript - node packages/cli/dist/cli.js -f -p native test ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.zndsl + cd $GITHUB_WORKSPACE/zombienet-tool/javascript + node packages/cli/dist/cli.js -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl - name: append manta-pay storage run: | source ${HOME}/.cargo/env - wget -P ${{ github.workspace }}/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json - mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json ${{ github.workspace }}/Manta/tests/data/fork.json - cd ${{ github.workspace }}/Manta/tests + wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json + mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json $GITHUB_WORKSPACE/Manta/tests/data/fork.json + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn node append_storage.js cd ../../ - mv ${{ github.workspace }}/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json + mv $GITHUB_WORKSPACE/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain_spec_path' dasel delete -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: run stress test run: | sleep 720 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn stress_benchmark_test --address=ws://127.0.0.1:9921 --exit - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop zombienet - if: always() uses: actions/upload-artifact@v2 with: name: ${{ matrix.chain-spec.id }}-alice-stress.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: run farming test run: | sleep 120 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn test_farming --address=ws://127.0.0.1:9921 --exit - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop zombienet - if: always() uses: actions/upload-artifact@v2 with: name: ${{ matrix.chain-spec.id }}-alice-stress.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log docker-image-test: timeout-minutes: 120 if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - needs: [build-node-current, start-docker-image-tester] + needs: [build-node-current] runs-on: ubuntu-20.04 strategy: matrix: @@ -399,6 +392,7 @@ jobs: - name: calamari steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 - name: fetch manta uses: actions/download-artifact@v2 with: @@ -425,7 +419,6 @@ jobs: image_id=`cat docker_id.log` echo $image_id echo "Adjusting permissions so we can access docker logs..." - sudo chmod -R +x /var/lib/docker/ sudo cat /var/lib/docker/containers/${image_id}/${image_id}-json.log - uses: actions/checkout@v2 with: @@ -434,128 +427,8 @@ jobs: - name: check if target block is finalized run: | cd dev-tools/check-finalized-block + npm install -g yarn yarn install yarn node index.js --para_address=ws://127.0.0.1:9944 --relay_address=ws://127.0.0.1:9945 --target_block=6 if [ $? == 1 ]; then echo "Failed to finalize the target block - 6"; exit 1; fi - # HELPER JOBS BELOW - start-node-builder-current: - if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 32 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-node-builder-current: - if: ${{ always() }} - needs: [start-node-builder-current, build-node-current] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-node-builder-current.outputs.aws-region }} - runner-label: ${{ needs.start-node-builder-current.outputs.runner-label }} - aws-instance-id: ${{ needs.start-node-builder-current.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true - start-calamari-integration-tester: - if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 64 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-calamari-integration-tester: - if: ${{ always() }} - needs: [start-calamari-integration-tester, calamari-integration-test] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-calamari-integration-tester.outputs.aws-region }} - runner-label: ${{ needs.start-calamari-integration-tester.outputs.runner-label }} - aws-instance-id: ${{ needs.start-calamari-integration-tester.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true - start-docker-image-tester: - if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 64 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-docker-image-tester: - if: ${{ always() }} - needs: [start-docker-image-tester, docker-image-test] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-docker-image-tester.outputs.aws-region }} - runner-label: ${{ needs.start-docker-image-tester.outputs.runner-label }} - aws-instance-id: ${{ needs.start-docker-image-tester.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 70124f630..5ab61574d 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -9,14 +9,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - AWS_INSTANCE_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb24HEQ++aNFWaqVyMtIs6GotUB8R+q61XOoI2z6uMj - AWS_REGION: us-east-1 - AWS_SUBNET_ID: subnet-08c26caf0a52b7c19 - AWS_SECURITY_GROUP_ID: sg-0315bffea9042ac9b - AWS_INSTANCE_TYPE: c5.2xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 32 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive POLKADOT_BINARY: https://github.com/paritytech/polkadot/releases/download/v1.0.0/polkadot jobs: print-rust-versions: @@ -37,12 +30,12 @@ jobs: build-node-current: timeout-minutes: 120 if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - needs: start-node-builder-current - runs-on: ${{ needs.start-node-builder-current.outputs.runner-label }} + runs-on: ubuntu-20.04 env: CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 - name: install sccache env: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download @@ -55,15 +48,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -77,13 +61,15 @@ jobs: - name: init run: | sudo apt update - sudo apt install -y pkg-config libssl-dev protobuf-compiler + sudo apt install -y pkg-config libssl-dev protobuf-compiler curl clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: build env: RUST_BACKTRACE: full @@ -93,6 +79,7 @@ jobs: run: | source ${HOME}/.cargo/env mkdir -p target/production + mkdir -p target/production curl -L -o target/production/manta https://github.com/Manta-Network/Manta/releases/download/v4.4.0/manta chmod +x target/production/manta - name: stop sccache server @@ -105,14 +92,14 @@ jobs: path: target/production/manta manta-integration-test: if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - needs: [build-node-current, start-manta-integration-tester] - runs-on: ${{ needs.start-manta-integration-tester.outputs.runner-label }} + needs: [build-node-current] + runs-on: runtime-integration-test timeout-minutes: 240 strategy: fail-fast: false matrix: chain-spec: - - id: manta-local + - id: manta-dev expected: block-count: relay: 15 @@ -141,6 +128,7 @@ jobs: ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | + sudo apt update && sudo apt install -y curl curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot ls -ahl $HOME/.local/bin/ @@ -151,6 +139,7 @@ jobs: mv ./dasel $HOME/.cargo/bin/dasel dasel --version - id: create-chainspec + shell: bash run: | manta build-spec --chain ${{ matrix.chain-spec.id }} --disable-default-bootnode --raw > $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-spec.json jq \ @@ -210,7 +199,7 @@ jobs: dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' - dasel put -t string -v "manta-local" -r toml \ + dasel put -t string -v "manta-dev" -r toml \ -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' dasel put -t int -v 2104 -r toml \ @@ -317,7 +306,7 @@ jobs: dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' - dasel put -t string -v "manta-local" -r toml \ + dasel put -t string -v "manta-dev" -r toml \ -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' dasel put -t int -v 2104 -r toml \ @@ -435,7 +424,7 @@ jobs: docker-image-test: timeout-minutes: 120 if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - needs: [build-node-current, start-docker-image-tester] + needs: [build-node-current] runs-on: ubuntu-20.04 strategy: matrix: @@ -443,6 +432,7 @@ jobs: - name: manta steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 - name: fetch manta uses: actions/download-artifact@v2 with: @@ -469,7 +459,6 @@ jobs: image_id=`cat docker_id.log` echo $image_id echo "Adjusting permissions so we can access docker logs..." - sudo chmod -R +x /var/lib/docker/ sudo cat /var/lib/docker/containers/${image_id}/${image_id}-json.log - uses: actions/checkout@v2 with: @@ -478,128 +467,8 @@ jobs: - name: check if target block is finalized run: | cd dev-tools/check-finalized-block + npm install -g yarn yarn install yarn node index.js --para_address=ws://127.0.0.1:9944 --relay_address=ws://127.0.0.1:9945 --target_block=6 if [ $? == 1 ]; then echo "Failed to finalize the target block - 6"; exit 1; fi - # HELPER JOBS BELOW - start-node-builder-current: - if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 32 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-node-builder-current: - if: ${{ always() }} - needs: [start-node-builder-current, build-node-current] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-node-builder-current.outputs.aws-region }} - runner-label: ${{ needs.start-node-builder-current.outputs.runner-label }} - aws-instance-id: ${{ needs.start-node-builder-current.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true - start-manta-integration-tester: - if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 64 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-manta-integration-tester: - if: ${{ always() }} - needs: [start-manta-integration-tester, manta-integration-test] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-manta-integration-tester.outputs.aws-region }} - runner-label: ${{ needs.start-manta-integration-tester.outputs.runner-label }} - aws-instance-id: ${{ needs.start-manta-integration-tester.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true - start-docker-image-tester: - if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta') - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-subnet-id: ${{ env.AWS_SUBNET_ID }} - aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: 64 - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-docker-image-tester: - if: ${{ always() }} - needs: [start-docker-image-tester, docker-image-test] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-docker-image-tester.outputs.aws-region }} - runner-label: ${{ needs.start-docker-image-tester.outputs.runner-label }} - aws-instance-id: ${{ needs.start-docker-image-tester.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/.github/workflows/label_checker.yml b/.github/workflows/label_checker.yml index 904716dd1..8758cb648 100644 --- a/.github/workflows/label_checker.yml +++ b/.github/workflows/label_checker.yml @@ -12,3 +12,11 @@ jobs: with: one_of: L-added,L-changed,L-fixed,L-deprecated,L-removed,L-skip repo_token: ${{ secrets.GITHUB_TOKEN }} + check_a_labels: + name: A- Labels Check + runs-on: ubuntu-20.04 + steps: + - uses: docker://agilepathway/pull-request-label-checker:latest + with: + all_of: A-unit-test-checks,A-integration-test-checks,A-benchmark-checks + repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 0a7cafa76..fce2d7183 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -10,16 +10,17 @@ on: description: The name of the chain under test. Usually, you would pass a dev chain default: manta-dev required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true env: CHAIN: ${{github.event.inputs.chain}} ENDPOINT: ${{github.event.inputs.endpoint}} DEBIAN_FRONTEND: noninteractive jobs: - start-checks: + update-checks: timeout-minutes: 120 - runs-on: runtime - container: - image: ubuntu:20.04 + runs-on: ubuntu-20.04 strategy: matrix: node-version: [16.x] @@ -31,8 +32,8 @@ jobs: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | - apt update - apt install -y curl + sudo apt update + sudo apt install -y curl SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -40,15 +41,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-registry- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -62,32 +54,16 @@ jobs: - name: init shell: bash run: | - apt update - apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version - apt remove -y '^dotnet-.*' - apt remove -y '^mongodb-.*' - apt remove -y '^mysql-.*' - apt remove -y '^postgresql-*' - apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - apt autoremove -y - apt clean - rm -rf /usr/local/lib/android - rm -rf /usr/share/dotnet curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Build New Binary env: RUST_BACKTRACE: full @@ -97,7 +73,7 @@ jobs: shell: bash run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo build --release + RUSTC_BOOTSTRAP=1 cargo build --release --timings cp target/release/manta $HOME/manta chmod +x $HOME/manta - name: Fetch and chmod old release binary @@ -120,32 +96,32 @@ jobs: path: zombienet-tool - name: create launch config run: | - ls -ahl ${{ github.workspace }}/zombienet/tests - cd ${{ github.workspace }} + ls -ahl $GITHUB_WORKSPACE/zombienet/tests + cd $GITHUB_WORKSPACE dasel put -t string -v $HOME/polkadot -r toml \ - -f ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml \ + -f $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml \ '.relaychain.default_command' dasel put -t string -v $HOME/manta -r toml \ - -f ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml \ + -f $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml \ '.parachains.[0].collators.[0].command' if [[ "$CHAIN" == *"manta"* ]]; then dasel put -t int -v 2104 -r toml \ - -f ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml \ + -f $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml \ '.parachains.[0].id' dasel put -t string -v $CHAIN -r toml \ - -f ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml \ + -f $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml \ '.parachains.[0].chain' fi; - cat ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml + cat $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/stdout.log \ - --error ${{ github.workspace }}/stderr.log \ - -- spawn --provider native ${{ github.workspace }}/zombienet/tests/0003-metadata-diff.toml + --output $GITHUB_WORKSPACE/stdout.log \ + --error $GITHUB_WORKSPACE/stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/zombienet/tests/0003-metadata-diff.toml - name: Prepare output run: | VERSION=$($HOME/manta --version) @@ -161,15 +137,15 @@ jobs: - name: Compare the metadata run: | echo $ENDPOINT - cd ${{ github.workspace }}/tools + cd $GITHUB_WORKSPACE/tools yarn CMD="yarn run:metadata $ENDPOINT ws://127.0.0.1:9921" echo -e "Running:\n$CMD" $CMD >> output.txt sed -z -i 's/\n\n/\n/g' output.txt cat output.txt | egrep -n -i '' - chmod +x ${{ github.workspace }}/scripts/github/extrinsic-ordering-filter.sh - SUMMARY=$(${{ github.workspace }}/scripts/github/extrinsic-ordering-filter.sh output.txt) + chmod +x $GITHUB_WORKSPACE/scripts/github/extrinsic-ordering-filter.sh + SUMMARY=$($GITHUB_WORKSPACE/scripts/github/extrinsic-ordering-filter.sh output.txt) echo -e $SUMMARY echo -e $SUMMARY >> output.txt - name: Show result diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index a30ba6e0f..4529ca254 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -5,14 +5,14 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+*' concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: DEBIAN_FRONTEND: noninteractive jobs: get-rust-versions: if: ${{ startsWith(github.ref, 'refs/tags/v') }} - runs-on: runtime + runs-on: ubuntu-20.04 container: image: paritytech/ci-linux:production outputs: @@ -28,11 +28,9 @@ jobs: build-runtimes: timeout-minutes: 180 if: ${{ startsWith(github.ref, 'refs/tags/v') }} - runs-on: runtime + runs-on: ubuntu-20.04 env: CARGO_TERM_COLOR: always - container: - image: ubuntu:20.04 strategy: matrix: runtime: @@ -43,7 +41,7 @@ jobs: - name: cache target dir uses: actions/cache@v2 with: - path: "${{ github.workspace }}/runtime/${{ matrix.runtime.name }}/target" + path: "$GITHUB_WORKSPACE/runtime/${{ matrix.runtime.name }}/target" key: srtool-target-${{ matrix.runtime.name }}-${{ github.sha }} restore-keys: | srtool-target-${{ matrix.runtime.name }} @@ -75,9 +73,7 @@ jobs: build-node-current: timeout-minutes: 180 if: ${{ startsWith(github.ref, 'refs/tags/v') }} - runs-on: runtime - container: - image: ubuntu:20.04 + runs-on: ubuntu-20.04 env: CARGO_TERM_COLOR: always steps: @@ -87,8 +83,8 @@ jobs: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download SCCACHE_VERSION: v0.5.3 run: | - apt update - apt install -y curl + sudo apt update + sudo apt install -y curl SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl mkdir -p $HOME/.local/bin curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz @@ -96,15 +92,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-registry- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -118,8 +105,8 @@ jobs: - name: init shell: bash run: | - apt update - apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git + sudo apt update + sudo apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env @@ -129,15 +116,8 @@ jobs: rustup target add wasm32-unknown-unknown rustup install 1.69.0 rustup target add wasm32-unknown-unknown --toolchain 1.69.0 - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: build shell: bash env: @@ -170,7 +150,7 @@ jobs: path: .github/resources/config-for-runtime-upgrade-test.json # THE FOLLOWING HAPPENS ONLY WHEN TAGGED WITH A vX.Y.Z TAG create-draft-release: - runs-on: runtime + runs-on: ubuntu-20.04 needs: [build-runtimes] outputs: release_url: ${{ steps.create-release.outputs.html_url }} @@ -187,7 +167,7 @@ jobs: release_name: ${{ github.ref }} draft: true publish-runtimes: - runs-on: runtime + runs-on: ubuntu-20.04 needs: create-draft-release strategy: matrix: @@ -252,7 +232,7 @@ jobs: asset_name: ${{ matrix.runtime.name }}-srtool-output-v${{ steps.get-runtime-version.outputs.runtime_ver }}.json asset_content_type: application/json publish-node: - runs-on: runtime + runs-on: ubuntu-20.04 needs: [build-node-current, create-draft-release] outputs: download_url: ${{ steps.upload-manta.outputs.browser_download_url }} @@ -272,7 +252,7 @@ jobs: asset_name: manta asset_content_type: application/octet-stream brag: - runs-on: runtime + runs-on: ubuntu-20.04 needs: [publish-runtimes, publish-node] if: startsWith(github.ref, 'refs/tags') steps: diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index 4fecb58b8..6a4bd0bfb 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -9,23 +9,23 @@ on: snapshot_url: description: The chain snapshot to use for storage benchmarks. Leaving it blank will skip the storage benchmark. default: "" - required: false +concurrency: + group: ${{ github.workflow }}-manta env: - AWS_REGION: us-east-1 - AWS_INSTANCE_TYPE: c6i.4xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 128 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive CHAIN_SPEC: ${{github.event.inputs.chain_spec}} SNAPSHOT_URL: ${{github.event.inputs.snapshot_url}} FULL_DB_FOLDER: full-db jobs: run-benchmarks: timeout-minutes: 720 - needs: start-node-builder-current - runs-on: ${{ needs.start-node-builder-current.outputs.runner-label }} + runs-on: runtime-integration-test + if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 - name: install sccache env: SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download @@ -38,15 +38,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -67,6 +58,8 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: init nodejs && yarn run: | curl -s https://deb.nodesource.com/setup_16.x | sudo bash @@ -83,7 +76,7 @@ jobs: CARGO_TERM_COLOR: always run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo build --profile production --features runtime-benchmarks --verbose + RUSTC_BOOTSTRAP=1 cargo build --profile production --features runtime-benchmarks --verbose --timings - name: create-chainspec run: | ${{ github.workspace }}/target/production/manta build-spec --chain $CHAIN_SPEC --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/fork.json @@ -145,40 +138,3 @@ jobs: with: name: rocksdb-weights path: ./scripts/benchmarking/rocksdb_weights.rs - start-node-builder-current: - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-node-builder-current: - needs: [run-benchmarks, start-node-builder-current] - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-node-builder-current.outputs.aws-region }} - runner-label: ${{ needs.start-node-builder-current.outputs.runner-label }} - aws-instance-id: ${{ needs.start-node-builder-current.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/.github/workflows/run_linters.yml b/.github/workflows/run_linters.yml index 7cb94f805..f31a36fd3 100644 --- a/.github/workflows/run_linters.yml +++ b/.github/workflows/run_linters.yml @@ -5,14 +5,14 @@ on: push: branches: [manta] concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: DEBIAN_FRONTEND: noninteractive jobs: - start-checks: + lint-checks: timeout-minutes: 120 - runs-on: runtime + runs-on: ubuntu-20.04 container: image: ubuntu:20.04 steps: @@ -33,15 +33,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-registry- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -65,6 +56,8 @@ jobs: rustup toolchain install nightly-2023-03-13 rustup default nightly-2023-03-13 cargo install taplo-cli + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Check Formatting env: RUST_BACKTRACE: full @@ -77,15 +70,6 @@ jobs: cargo fmt --all -- --check $HOME/.cargo/bin/taplo fmt --check $HOME/.cargo/bin/taplo lint - - name: cache cargo build - uses: actions/cache@v2 - with: - path: | - ./target - key: cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-build-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} - cargo-build- - name: Cargo Check & Clippy env: RUST_BACKTRACE: full diff --git a/.github/workflows/runtime_upgrade_test.yml b/.github/workflows/runtime_upgrade_test.yml index fac5459f5..ea2dc8a2c 100644 --- a/.github/workflows/runtime_upgrade_test.yml +++ b/.github/workflows/runtime_upgrade_test.yml @@ -16,14 +16,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - AWS_INSTANCE_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb24HEQ++aNFWaqVyMtIs6GotUB8R+q61XOoI2z6uMj - AWS_REGION: us-east-1 - AWS_SUBNET_ID: subnet-08c26caf0a52b7c19 - AWS_SECURITY_GROUP_ID: sg-0315bffea9042ac9b - AWS_INSTANCE_TYPE: c5.2xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 128 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive RUNTIME: ${{github.event.inputs.runtime}} RUNTIME_SPEC: ${{github.event.inputs.runtime}}-local POLKADOT_BINARY: ${{github.event.inputs.polkadot_url}} @@ -39,7 +32,7 @@ jobs: - name: cache target dir uses: actions/cache@v2 with: - path: "${{ github.workspace }}/runtime/${{ env.RUNTIME }}/target" + path: "$GITHUB_WORKSPACE/runtime/${{ env.RUNTIME }}/target" key: srtool-target-${{ env.RUNTIME }}-${{ github.sha }} restore-keys: | srtool-target-${{ env.RUNTIME }} @@ -75,12 +68,12 @@ jobs: name: config-for-runtime-upgrade-test path: .github/resources/config-for-runtime-upgrade-test.json runtime-upgrade-test: - needs: [build-runtimes, start-runtime-upgrade-tester] - runs-on: ${{ needs.start-runtime-upgrade-tester.outputs.runner-label }} + needs: [build-runtimes] + runs-on: ubuntu-20.04 timeout-minutes: 90 steps: - run: | - ls -ahl ${{ github.workspace }}/ + ls -ahl $GITHUB_WORKSPACE/ mkdir -p $HOME/.local/share/${{ env.RUNTIME }}-pc mkdir -p $HOME/.local/bin echo "${HOME}/.nvm/versions/node/v16.3.0/bin" >> $GITHUB_PATH @@ -88,10 +81,10 @@ jobs: - name: fetch, mv and chmod manta-base run: | wget ${{ env.MANTA_BINARY }} - ls -ahl ${{ github.workspace }}/ - mv ${{ github.workspace }}/manta $HOME/.local/bin/manta-base + ls -ahl $GITHUB_WORKSPACE/ + mv $GITHUB_WORKSPACE/manta $HOME/.local/bin/manta-base chmod +x $HOME/.local/bin/manta-base - ls -ahl ${{ github.workspace }}/ + ls -ahl $GITHUB_WORKSPACE/ ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | @@ -170,8 +163,8 @@ jobs: - name: run test suites run: | sleep 120 - cp ${{ github.workspace }}/${{ env.RUNTIME }}_runtime.compact.compressed.wasm ${{ github.workspace }}/Manta/tests/calamari.wasm - cd ${{ github.workspace }}/Manta/tests + cp $GITHUB_WORKSPACE/${{ env.RUNTIME }}_runtime.compact.compressed.wasm $GITHUB_WORKSPACE/Manta/tests/calamari.wasm + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn runtime_upgrade_test --address=ws://127.0.0.1:9921 --exit @@ -180,41 +173,3 @@ jobs: with: name: ${{ env.RUNTIME_SPEC }}-alice.log path: ${{ github.workspace }}/zombienet-for-${{ env.RUNTIME_SPEC }}-stdout.log - # HELPER JOBS BELOW - start-runtime-upgrade-tester: - runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} - steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - stop-runtime-upgrade-tester: - if: ${{ always() }} - needs: [runtime-upgrade-test, start-runtime-upgrade-tester] - runs-on: ubuntu-20.04 - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-runtime-upgrade-tester.outputs.aws-region }} - runner-label: ${{ needs.start-runtime-upgrade-tester.outputs.runner-label }} - aws-instance-id: ${{ needs.start-runtime-upgrade-tester.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index 47003307e..c8e4a8503 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -13,37 +13,14 @@ on: default: manta required: true env: - AWS_INSTANCE_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb24HEQ++aNFWaqVyMtIs6GotUB8R+q61XOoI2z6uMj - AWS_REGION: us-east-1 - AWS_SUBNET_ID: subnet-08c26caf0a52b7c19 - AWS_SECURITY_GROUP_ID: sg-0315bffea9042ac9b - AWS_INSTANCE_TYPE: c5.2xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 128 - AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' + DEBIAN_FRONTEND: noninteractive PROD_URL: ${{github.event.inputs.prod_url}} RUNTIME: ${{github.event.inputs.runtime}} jobs: start-checks: timeout-minutes: 120 runs-on: ubuntu-20.04 - outputs: - runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }} - aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }} - aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }} steps: - - id: start-self-hosted-runner - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: start - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }} - aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }} - aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }} - aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }} - uses: actions/checkout@v2 - name: install sccache env: @@ -57,15 +34,6 @@ jobs: chmod +x $HOME/.local/bin/sccache echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo- - name: cache sccache uses: actions/cache@v2 continue-on-error: false @@ -86,6 +54,8 @@ jobs: rustup toolchain install nightly-2023-03-03 rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown + - name: cache cargo + uses: Swatinem/rust-cache@v2 - name: Build Binary env: RUST_BACKTRACE: full @@ -94,7 +64,7 @@ jobs: SCCACHE_DIR: /home/runner/.cache/sccache run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo build --release --features=try-runtime + RUSTC_BOOTSTRAP=1 cargo build --release --features=try-runtime --timings chmod a+x target/release/manta - name: move bin run: | @@ -116,20 +86,3 @@ jobs: $HOME/.local/bin/manta try-runtime --runtime $HOME/.local/bin/runtime.wasm --chain ${{ env.RUNTIME }}-dev on-runtime-upgrade --checks=all live --at $latest_hash --uri $PROD_URL - name: stop sccache server run: sccache --stop-server || true - stop-checks: - needs: start-checks - runs-on: ubuntu-20.04 - if: ${{ always() }} - steps: - - continue-on-error: true - uses: audacious-network/aws-github-runner@v1.0.33 - with: - mode: stop - github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ needs.start-checks.outputs.aws-region }} - runner-label: ${{ needs.start-checks.outputs.runner-label }} - aws-instance-id: ${{ needs.start-checks.outputs.aws-instance-id }} - - name: discard stopper success/failure - run: true diff --git a/tests/stress_benchmark_test.ts b/tests/stress_benchmark_test.ts index 147870935..373529367 100644 --- a/tests/stress_benchmark_test.ts +++ b/tests/stress_benchmark_test.ts @@ -26,7 +26,9 @@ const test_config = { }; describe("Node RPC Test", () => { - it("Check RPC result", async () => { + let api: ApiPromise; + + before(async function () { let nodeAddress = ""; const args: ParsedArgs = minimist(process.argv.slice(2)); if (args["address"] == null) { @@ -37,11 +39,14 @@ describe("Node RPC Test", () => { console.log("using address %s", nodeAddress); const wsProvider = new WsProvider(nodeAddress); - const api = await ApiPromise.create({ + api = await ApiPromise.create({ provider: wsProvider, types: manta_pay_types, rpc: rpc_api, }); +}); + + it("Check RPC result", async () => { const keyring = new Keyring({ type: "sr25519" }); const sender = keyring.addFromMnemonic(test_config.mnemonic); @@ -78,6 +83,8 @@ describe("Node RPC Test", () => { i < test_config.start_iteration + test_config.tests_iterations; ++i ) { + const nonce = await api.rpc.system.accountNextIndex(sender.address); + await api.tx.mantaPay .toPrivate( mintsBuffer.subarray( @@ -85,7 +92,7 @@ describe("Node RPC Test", () => { test_config.mint_size * (i + 1) ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -96,6 +103,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); @@ -108,7 +125,7 @@ describe("Node RPC Test", () => { transfersStart + test_config.mint_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(1) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -119,6 +136,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); await api.tx.mantaPay @@ -128,7 +155,7 @@ describe("Node RPC Test", () => { transfersStart + 2 * test_config.mint_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(2) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -139,6 +166,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); await api.tx.mantaPay @@ -150,7 +187,7 @@ describe("Node RPC Test", () => { test_config.transfer_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(3) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -161,6 +198,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); let reclaimsStart = @@ -172,7 +219,7 @@ describe("Node RPC Test", () => { reclaimsStart + test_config.mint_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(4) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -183,6 +230,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); await api.tx.mantaPay @@ -192,7 +249,7 @@ describe("Node RPC Test", () => { reclaimsStart + 2 * test_config.mint_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(5) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -203,6 +260,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); if (i == test_config.start_iteration + test_config.tests_iterations - 1) { @@ -215,7 +282,7 @@ describe("Node RPC Test", () => { test_config.reclaim_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(6) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -226,6 +293,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } else if (status.isFinalized) { lastFinalized = true; let endTime = performance.now(); @@ -244,7 +321,7 @@ describe("Node RPC Test", () => { test_config.reclaim_size ) ) - .signAndSend(sender, { nonce: -1 }, ({ events = [], status }) => { + .signAndSend(sender, { nonce: nonce.addn(6) }, ({ events = [], status }) => { if (status.isInBlock) { console.log("Included at block hash", status.asInBlock.toHex()); console.log("Events:"); @@ -255,6 +332,16 @@ describe("Node RPC Test", () => { allSuccesses++; } }); + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + .forEach(({ event: { data: [error, info] } }) => { + if (error) { + console.log(error.toString()); + } + }); } }); } @@ -263,6 +350,8 @@ describe("Node RPC Test", () => { txsCount += 7; console.log("\n Transactions sent: ", txsCount); } + const lastHeader = await api.rpc.chain.getHeader(); + lastBlock = lastHeader.number.toNumber(); // wait all txs finalized for (let i = 0; i < test_config.max_wait_time_sec; i++) { @@ -272,8 +361,6 @@ describe("Node RPC Test", () => { console.log("Tps is: ", tps); assert(tps >= test_config.expected_tps); - const lastHeader = await api.rpc.chain.getHeader(); - lastBlock = lastHeader.number.toNumber(); const averageBlockTime = totalTime / (lastBlock - firstBlock); console.log("Total time: ", totalTime); console.log("Number of blocks: ", (lastBlock - firstBlock)); @@ -291,6 +378,9 @@ describe("Node RPC Test", () => { assert(false); } - api.disconnect(); }).timeout(test_config.timeout); + + after(async function () { + await api.disconnect() + }) }); diff --git a/zombienet/tests/0001-block-production.toml b/zombienet/tests/0001-block-production.toml index b733929eb..97d528f90 100644 --- a/zombienet/tests/0001-block-production.toml +++ b/zombienet/tests/0001-block-production.toml @@ -29,15 +29,19 @@ ws_port = 9921 [[parachains.collators]] command = "manta" name = "Bob" +validator = true [[parachains.collators]] command = "manta" name = "Charlie" +validator = true [[parachains.collators]] command = "manta" name = "Dave" +validator = true [[parachains.collators]] command = "manta" name = "Eve" +validator = true diff --git a/zombienet/tests/0001-block-production.zndsl b/zombienet/tests/0001-block-production.zndsl index fe4bd52b0..c7555e7d1 100644 --- a/zombienet/tests/0001-block-production.zndsl +++ b/zombienet/tests/0001-block-production.zndsl @@ -3,8 +3,8 @@ Network: ./0001-block-production.toml Creds: config # metrics -alice: reports node_roles is 4 +Alice: reports node_roles is 4 # logs alice: parachain 2084 is registered within 225 seconds -alice: parachain 2084 block height is at least 10 within 200 seconds \ No newline at end of file +Alice: reports block height is at least 5 within 250 seconds \ No newline at end of file From a735356abcaa600086e529356104f24b8091fccb Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 21:25:16 +1000 Subject: [PATCH 03/19] :bug: handle `polkadot` Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 6 ++++-- .github/workflows/integration_test_manta.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 765dfe09e..096e9f36f 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -132,8 +132,10 @@ jobs: - name: fetch and chmod polkadot run: | sudo apt update && sudo apt install -y curl - curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} - chmod +x $HOME/.local/bin/polkadot + if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then + curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} + chmod +x $HOME/.local/bin/polkadot + fi ls -ahl $HOME/.local/bin/ - name: Install dasel cli run: | diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 5ab61574d..1e16b0814 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -129,8 +129,10 @@ jobs: - name: fetch and chmod polkadot run: | sudo apt update && sudo apt install -y curl - curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} - chmod +x $HOME/.local/bin/polkadot + if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then + curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} + chmod +x $HOME/.local/bin/polkadot + fi ls -ahl $HOME/.local/bin/ - name: Install dasel cli run: | From 20ef3ca41ee1fbe28850bfc2f18639eee7bacadb Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 21:30:25 +1000 Subject: [PATCH 04/19] :bug: use `bash` for `launch testnet` step Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 1 + .github/workflows/integration_test_manta.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 096e9f36f..f71022b4c 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -216,6 +216,7 @@ jobs: - name: Install pm2 run: npm install -g pm2 - name: launch testnet + shell: bash run: | cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 1e16b0814..a794da690 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -230,6 +230,7 @@ jobs: - name: Install pm2 run: npm install -g pm2 - name: launch testnet + shell: bash run: | cd ${{ github.workspace }}/zombienet-tool/javascript yarn From 4708ddf0b874e7cfe46882d3ea0676f5a6b42e60 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 21:44:49 +1000 Subject: [PATCH 05/19] :bug: try docker Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_manta.yml | 138 ++++++++++--------- 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index a794da690..616b7e5f8 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -95,6 +95,8 @@ jobs: needs: [build-node-current] runs-on: runtime-integration-test timeout-minutes: 240 + container: + image: ubuntu:20.04 strategy: fail-fast: false matrix: @@ -122,13 +124,13 @@ jobs: name: manta - name: mv and chmod manta run: | - mv ${{ github.workspace }}/manta $HOME/.local/bin/ + mv $GITHUB_WORKSPACE/manta $HOME/.local/bin/ chmod +x $HOME/.local/bin/manta - ls -ahl ${{ github.workspace }}/ + ls -ahl $GITHUB_WORKSPACE/ ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | - sudo apt update && sudo apt install -y curl + apt update && apt install -y curl if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot @@ -181,33 +183,33 @@ jobs: - name: create launch config run: | source ${HOME}/.cargo/env - ls -ahl ${{ github.workspace }} - cd ${{ github.workspace }} + ls -ahl $GITHUB_WORKSPACE + cd $GITHUB_WORKSPACE dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[1].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[2].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[3].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' dasel put -t string -v "manta-dev" -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' dasel put -t int -v 2104 -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].id' - cat ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - if: always() uses: actions/upload-artifact@v2 with: @@ -232,32 +234,32 @@ jobs: - name: launch testnet shell: bash run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: init measure-block-time rococo run: | - cd ${{ github.workspace }}/dev-tools-rococo/measure-block-time + cd $GITHUB_WORKSPACE/dev-tools-rococo/measure-block-time yarn install pm2 start index.js \ --name measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }} \ - --output ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log \ + --output $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log \ --no-autorestart \ -- \ --address=ws://127.0.0.1:9911 - name: init measure-block-time manta run: | - cd ${{ github.workspace }}/dev-tools-manta/measure-block-time + cd $GITHUB_WORKSPACE/dev-tools-manta/measure-block-time yarn install pm2 start index.js \ --name measure-block-time-${{ matrix.chain-spec.id }} \ - --output ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log \ + --output $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log \ --no-autorestart \ -- \ --address=ws://127.0.0.1:9921 @@ -268,159 +270,159 @@ jobs: - name: run test suites run: | sleep 120 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn correctness_test --address=ws://127.0.0.1:9921 --exit yarn performance_test --address=ws://127.0.0.1:9921 --exit - name: check if target block is finalized run: | - cd ${{ github.workspace }}/dev-tools-manta/check-finalized-block + cd $GITHUB_WORKSPACE/dev-tools-manta/check-finalized-block yarn install yarn node index.js --para_address=ws://127.0.0.1:9921 --relay_address=ws://127.0.0.1:9911 --target_block=${{ matrix.chain-spec.expected.block-count.para }} if [ $? == 1 ]; then echo "Failed to finalize the target block - ${{ matrix.chain-spec.expected.block-count.para }}"; exit 1; fi - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }} pm2 stop measure-block-time-${{ matrix.chain-spec.id }} pm2 stop zombienet - name: test - manta alice peered successfully run: | source ${HOME}/.cargo/env - cd ${{ github.workspace }}/zombienet-tool/javascript - sed -i 's/2084/2104/g' ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.zndsl + cd $GITHUB_WORKSPACE/zombienet-tool/javascript + sed -i 's/2084/2104/g' $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[1].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[2].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[3].command' dasel put -t string -v $HOME/.local/bin/manta -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' dasel put -t string -v "manta-dev" -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' dasel put -t int -v 2104 -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].id' - cat ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml - cat ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.zndsl - node packages/cli/dist/cli.js -f -p native test ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.zndsl + cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml + cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl + node packages/cli/dist/cli.js -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl - if: always() uses: actions/upload-artifact@v2 with: name: zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: zombienet-for-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stderr.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-${{ matrix.chain-spec.id }}-stdout.log - path: ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stdout.log - if: always() uses: actions/upload-artifact@v2 with: name: measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - path: ${{ github.workspace }}/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log + path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - name: append manta-pay storage run: | source ${HOME}/.cargo/env - wget -P ${{ github.workspace }}/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json - mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json ${{ github.workspace }}/Manta/tests/data/fork.json - cd ${{ github.workspace }}/Manta/tests + wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json + mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json $GITHUB_WORKSPACE/Manta/tests/data/fork.json + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn node append_storage.js cd ../../ - mv ${{ github.workspace }}/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json + mv $GITHUB_WORKSPACE/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain_spec_path' dasel delete -r toml \ - -f ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml \ + -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - cat ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml head -20 $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: run stress test run: | sleep 720 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn stress_benchmark_test --address=ws://127.0.0.1:9921 --exit - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop zombienet - if: always() uses: actions/upload-artifact@v2 with: name: ${{ matrix.chain-spec.id }}-alice-stress.log - path: ${{ github.workspace }}/zombienet/9921.log + path: $GITHUB_WORKSPACE/zombienet/9921.log - name: launch testnet run: | - cd ${{ github.workspace }}/zombienet-tool/javascript + cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn npm run build pm2 start packages/cli/dist/cli.js --name zombienet \ - --output ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ - --error ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ - -- spawn --provider native ${{ github.workspace }}/Manta/zombienet/tests/0001-block-production.toml + --output $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log \ + --error $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stderr.log \ + -- spawn --provider native $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml - name: run farming test run: | sleep 720 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn yarn test_farming --address=ws://127.0.0.1:9921 --exit - name: stop testnet run: | - cd ${{ github.workspace }}/zombienet-tool + cd $GITHUB_WORKSPACE/zombienet-tool pm2 stop zombienet - if: always() uses: actions/upload-artifact@v2 with: name: ${{ matrix.chain-spec.id }}-alice-stress.log - path: ${{ github.workspace }}/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log + path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - name: run tests run: | sleep 120 - cd ${{ github.workspace }}/Manta/tests + cd $GITHUB_WORKSPACE/Manta/tests yarn install yarn MANTA_BINARY=$HOME/.local/bin/manta yarn tests From 0c26d029b5bdb72807b3c8f47a2e9c58b1784baf Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 21:46:58 +1000 Subject: [PATCH 06/19] :bug: try docker Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index f71022b4c..6211ee65f 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -98,6 +98,8 @@ jobs: needs: [build-node-current] runs-on: runtime-integration-test timeout-minutes: 240 + container: + image: ubuntu:20.04 strategy: fail-fast: false matrix: From 1edf6485ee4ca53f146c9730adc1e8eb76fbef10 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 21:59:50 +1000 Subject: [PATCH 07/19] :bug: try docker Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_manta.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 616b7e5f8..6b43e58d1 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -137,6 +137,7 @@ jobs: fi ls -ahl $HOME/.local/bin/ - name: Install dasel cli + shell: bash run: | source ${HOME}/.cargo/env curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel @@ -181,6 +182,7 @@ jobs: name: ${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-spec.json path: /home/runner/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-spec.json - name: create launch config + shell: bash run: | source ${HOME}/.cargo/env ls -ahl $GITHUB_WORKSPACE @@ -289,6 +291,7 @@ jobs: pm2 stop measure-block-time-${{ matrix.chain-spec.id }} pm2 stop zombienet - name: test - manta alice peered successfully + shell: bash run: | source ${HOME}/.cargo/env cd $GITHUB_WORKSPACE/zombienet-tool/javascript @@ -351,6 +354,7 @@ jobs: name: measure-block-time-${{ matrix.chain-spec.id }}-stderr.log path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - name: append manta-pay storage + shell: bash run: | source ${HOME}/.cargo/env wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json From 3ff9af7f18e4c4df1365c2b0c8c89eb66c753868 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 22:08:31 +1000 Subject: [PATCH 08/19] :bug: dasel don't need cargo Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_manta.yml | 45 +++++++++----------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 6b43e58d1..863c25a3d 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -139,10 +139,8 @@ jobs: - name: Install dasel cli shell: bash run: | - source ${HOME}/.cargo/env - curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel - mv ./dasel $HOME/.cargo/bin/dasel - dasel --version + curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o $HOME/dasel && chmod +x $HOME/dasel + $HOME/dasel --version - id: create-chainspec shell: bash run: | @@ -184,31 +182,30 @@ jobs: - name: create launch config shell: bash run: | - source ${HOME}/.cargo/env ls -ahl $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE - dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[1].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[2].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[3].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' - dasel put -t string -v "manta-dev" -r toml \ + $HOME/dasel put -t string -v "manta-dev" -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - dasel put -t int -v 2104 -r toml \ + $HOME/dasel put -t int -v 2104 -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].id' cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml @@ -293,31 +290,30 @@ jobs: - name: test - manta alice peered successfully shell: bash run: | - source ${HOME}/.cargo/env cd $GITHUB_WORKSPACE/zombienet-tool/javascript sed -i 's/2084/2104/g' $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl - dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[1].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[2].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[3].command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[4].command' - dasel put -t string -v "manta-dev" -r toml \ + $HOME/dasel put -t string -v "manta-dev" -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - dasel put -t int -v 2104 -r toml \ + $HOME/dasel put -t int -v 2104 -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].id' cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml @@ -356,7 +352,6 @@ jobs: - name: append manta-pay storage shell: bash run: | - source ${HOME}/.cargo/env wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json $GITHUB_WORKSPACE/Manta/tests/data/fork.json cd $GITHUB_WORKSPACE/Manta/tests @@ -365,10 +360,10 @@ jobs: node append_storage.js cd ../../ mv $GITHUB_WORKSPACE/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json - dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ + $HOME/dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain_spec_path' - dasel delete -r toml \ + $HOME/dasel delete -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml From f7f291a52abbadc2020968e0ad48d9ce36328e4f Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 22:11:07 +1000 Subject: [PATCH 09/19] :bug: missing jq Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_manta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 863c25a3d..4ccf54bae 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -130,7 +130,7 @@ jobs: ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | - apt update && apt install -y curl + apt update && apt install -y curl jq if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot From 0c73dc0a504db5a12a2aa55b9b1f4e48033a2034 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 22:18:18 +1000 Subject: [PATCH 10/19] :bug: address dasel Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 6211ee65f..3be696b1e 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -133,7 +133,7 @@ jobs: ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot run: | - sudo apt update && sudo apt install -y curl + sudo apt update && sudo apt install -y curl jq if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot @@ -141,10 +141,8 @@ jobs: ls -ahl $HOME/.local/bin/ - name: Install dasel cli run: | - source ${HOME}/.cargo/env - curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel - mv ./dasel $HOME/.cargo/bin/dasel - dasel --version + curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o $HOME/dasel && chmod +x $HOME/dasel + $HOME/dasel --version - id: create-chainspec shell: bash run: | @@ -189,10 +187,10 @@ jobs: source ${HOME}/.cargo/env ls -ahl $GITHUB_WORKSPACE/Manta cd $GITHUB_WORKSPACE - dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.relaychain.default_command' - dasel put -t string -v $HOME/.local/bin/manta -r toml \ + $HOME/dasel put -t string -v $HOME/.local/bin/manta -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].collators.[0].command' cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml @@ -330,10 +328,10 @@ jobs: node append_storage.js cd ../../ mv $GITHUB_WORKSPACE/Manta/tests/data/fork.json $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json - dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ + $HOME/dasel put -t string -v $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain_spec_path' - dasel delete -r toml \ + $HOME/dasel delete -r toml \ -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - name: launch testnet From 3dcdbd29ab6211a2ff39257d76d4af80bc5ff197 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 23:17:55 +1000 Subject: [PATCH 11/19] :bug: address dasel Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 3 ++- .github/workflows/integration_test_manta.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 3be696b1e..cf87d385f 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -132,8 +132,9 @@ jobs: ls -ahl $GITHUB_WORKSPACE/ ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot + shell: bash run: | - sudo apt update && sudo apt install -y curl jq + apt update && apt install -y curl jq if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 4ccf54bae..d3a5954c6 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -129,6 +129,7 @@ jobs: ls -ahl $GITHUB_WORKSPACE/ ls -ahl $HOME/.local/bin/ - name: fetch and chmod polkadot + shell: bash run: | apt update && apt install -y curl jq if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then From 9b1b620e6093d5af567d9d8a07a516a3ced11de1 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 23:43:44 +1000 Subject: [PATCH 12/19] :bug: address dasel Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_manta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index d3a5954c6..ad09ed497 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -131,7 +131,7 @@ jobs: - name: fetch and chmod polkadot shell: bash run: | - apt update && apt install -y curl jq + apt update && apt install -y curl jq wget if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot From bf55696285419da495abe5f8778fd5bf714fb7b5 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 23:44:01 +1000 Subject: [PATCH 13/19] :bug: address dasel Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index cf87d385f..5c9906a4e 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -134,7 +134,7 @@ jobs: - name: fetch and chmod polkadot shell: bash run: | - apt update && apt install -y curl jq + apt update && apt install -y curl jq wget if [[ ! -f "$HOME/.local/bin/polkadot" ]]; then curl -L -o $HOME/.local/bin/polkadot ${{ env.POLKADOT_BINARY }} chmod +x $HOME/.local/bin/polkadot From 0ee6241de8e052fe1dc04b82f04202ef92448a3e Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Mon, 21 Aug 2023 23:49:18 +1000 Subject: [PATCH 14/19] :bug: address dasel Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 2 ++ .github/workflows/integration_test_manta.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 5c9906a4e..741ed3588 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -336,6 +336,7 @@ jobs: -f $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml \ '.parachains.[0].chain' - name: launch testnet + shell: bash run: | cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn @@ -361,6 +362,7 @@ jobs: name: ${{ matrix.chain-spec.id }}-alice-stress.log path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log - name: launch testnet + shell: bash run: | cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index ad09ed497..3a0db2ec3 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -370,6 +370,7 @@ jobs: cat $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.toml head -20 $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json - name: launch testnet + shell: bash run: | cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn @@ -395,6 +396,7 @@ jobs: name: ${{ matrix.chain-spec.id }}-alice-stress.log path: $GITHUB_WORKSPACE/zombienet/9921.log - name: launch testnet + shell: bash run: | cd $GITHUB_WORKSPACE/zombienet-tool/javascript yarn From 5ab4ac0b8756141b2c84bf7e0541827565bd7d83 Mon Sep 17 00:00:00 2001 From: "Anathan (Ana) Ye" Date: Tue, 22 Aug 2023 01:26:02 +1000 Subject: [PATCH 15/19] :bug: fix `calamari integration test` Signed-off-by: Anathan (Ana) Ye --- .github/workflows/integration_test_calamari.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 741ed3588..b950bdb9e 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -185,7 +185,6 @@ jobs: path: /home/runner/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${{ steps.create-chainspec.outputs.short-sha }}-spec.json - name: create launch config run: | - source ${HOME}/.cargo/env ls -ahl $GITHUB_WORKSPACE/Manta cd $GITHUB_WORKSPACE $HOME/dasel put -t string -v $HOME/.local/bin/polkadot -r toml \ From 9865b0a78c564544768af19169f01f638989d5ba Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Tue, 22 Aug 2023 09:38:39 +0800 Subject: [PATCH 16/19] Fix calamari integration tests Signed-off-by: Dengjianping --- .github/workflows/integration_test_calamari.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index b950bdb9e..ef5500005 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -302,11 +302,6 @@ jobs: with: name: measure-block-time-${{ matrix.chain-spec.id }}-stderr.log path: $GITHUB_WORKSPACE/measure-block-time-${{ matrix.chain-spec.id }}-stderr.log - - name: parse rococo block times - run: | - grep '#.*' $GITHUB_WORKSPACE/measure-block-time-rococo-relay-for-${{ matrix.chain-spec.id }}-stdout.log | while read -r line; do words=($line); echo ${words[6]},${words[10]} | tee $GITHUB_WORKSPACE/block-time-rococo.csv; done - if [ ! -f $GITHUB_WORKSPACE/block-time-rococo.csv ]; then echo "block times not detected"; exit 1; fi - jq -s -R '[split("\n") | .[] | select(length > 0) | split(",") | {block:.[0]|tonumber, time:.[1]|tonumber} ]' $GITHUB_WORKSPACE/block-time-rococo.csv > $GITHUB_WORKSPACE/block-time-rococo.json - if: always() uses: actions/upload-artifact@v2 with: From f3464937a5a9191b9d4dcd88e1cb8beb4b2095a5 Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Tue, 22 Aug 2023 12:11:22 +0800 Subject: [PATCH 17/19] Fix storage insertion Signed-off-by: Dengjianping --- .github/workflows/integration_test_calamari.yml | 1 + .github/workflows/integration_test_manta.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index ef5500005..6d1329a3e 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -313,6 +313,7 @@ jobs: cd $GITHUB_WORKSPACE/zombienet-tool/javascript node packages/cli/dist/cli.js -f -p native test $GITHUB_WORKSPACE/Manta/zombienet/tests/0001-block-production.zndsl - name: append manta-pay storage + shell: bash run: | source ${HOME}/.cargo/env wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 3a0db2ec3..8c5c409ba 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -79,7 +79,6 @@ jobs: run: | source ${HOME}/.cargo/env mkdir -p target/production - mkdir -p target/production curl -L -o target/production/manta https://github.com/Manta-Network/Manta/releases/download/v4.4.0/manta chmod +x target/production/manta - name: stop sccache server From 28107421a716871f727c1e84fccf39e22941bf38 Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Tue, 22 Aug 2023 12:57:04 +0800 Subject: [PATCH 18/19] Remove unused cmd Signed-off-by: Dengjianping --- .github/workflows/integration_test_calamari.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 6d1329a3e..64b4d4f4a 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -315,7 +315,6 @@ jobs: - name: append manta-pay storage shell: bash run: | - source ${HOME}/.cargo/env wget -P $GITHUB_WORKSPACE/Manta/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json mv $HOME/.local/share/calamari-pc/${{ matrix.chain-spec.id }}-${GITHUB_SHA:0:7}-spec.json $GITHUB_WORKSPACE/Manta/tests/data/fork.json cd $GITHUB_WORKSPACE/Manta/tests From ff70138322159e9a31ff6faaf53167ef4c189468 Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Tue, 22 Aug 2023 15:39:03 +0800 Subject: [PATCH 19/19] Do not skip compilation Signed-off-by: Dengjianping --- .github/workflows/integration_test_calamari.yml | 4 +--- .github/workflows/integration_test_manta.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 64b4d4f4a..d6edec0df 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -82,9 +82,7 @@ jobs: SCCACHE_DIR: /home/runner/.cache/sccache run: | source ${HOME}/.cargo/env - mkdir -p target/production - curl -L -o target/production/manta https://github.com/Manta-Network/Manta/releases/download/v4.4.0/manta - chmod +x target/production/manta + RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose - name: stop sccache server run: sccache --stop-server || true - if: always() diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 8c5c409ba..643521a14 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -78,9 +78,7 @@ jobs: SCCACHE_DIR: /home/runner/.cache/sccache run: | source ${HOME}/.cargo/env - mkdir -p target/production - curl -L -o target/production/manta https://github.com/Manta-Network/Manta/releases/download/v4.4.0/manta - chmod +x target/production/manta + RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose - name: stop sccache server run: sccache --stop-server || true - if: always()