From 67cd94982fcabbd9f2ef213c6cd5ba2cd3ccaf77 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 11:55:24 +0300 Subject: [PATCH 1/6] Check benchmarking job Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 006561012..ca3a0a758 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -3,7 +3,7 @@ on: pull_request: branches: [manta] push: - branches: [manta] + branches: [ghzlatarev/benchmarks-check-for-manta-dev] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true @@ -186,10 +186,28 @@ jobs: sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet df -h - - name: create-chainspec + - name: build benchmarking binary run: | RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks - ${{ github.workspace }}/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/fork.json + - name: stop sccache server + run: sccache --stop-server || true + run-benchmark-checks: + needs: start-benchmark-checks + timeout-minutes: 180 + strategy: + matrix: + runtime: + - name: manta-dev + - name: calamari-dev + 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: + - name: create-chainspec + run: | + ${{ github.workspace }}/target/release/manta build-spec --chain ${{ matrix.runtime.name }} --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/${{ matrix.runtime.name }}-fork.json - name: append manta-pay storage run: | wget -P ${{ github.workspace }}/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json @@ -207,15 +225,13 @@ jobs: ${{ github.workspace }}/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/fork.json \ + --chain=${{ github.workspace }}/tests/data/${{ matrix.runtime.name }}-fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ --steps=2 - - name: stop sccache server - run: sccache --stop-server || true stop-benchmark-checks: - needs: start-benchmark-checks + needs: start-benchmark-checks, run-benchmark-checks runs-on: ubuntu-20.04 if: ${{ always() }} steps: From 6b1e68b4397ea2ab2c563572a435d3b4f9e23479 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 11:56:28 +0300 Subject: [PATCH 2/6] Check benchmarking job Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index ca3a0a758..640440d2f 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -231,7 +231,7 @@ jobs: --repeat=1 \ --steps=2 stop-benchmark-checks: - needs: start-benchmark-checks, run-benchmark-checks + needs: run-benchmark-checks runs-on: ubuntu-20.04 if: ${{ always() }} steps: From 5f04ba507b10b58e1634d2a3ea1db831e98eeffd Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 13:50:20 +0300 Subject: [PATCH 3/6] Try sequentially Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 49 +++++++++++++++++++------------ 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 640440d2f..99f1e2354 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -189,25 +189,9 @@ jobs: - name: build benchmarking binary run: | RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks - - name: stop sccache server - run: sccache --stop-server || true - run-benchmark-checks: - needs: start-benchmark-checks - timeout-minutes: 180 - strategy: - matrix: - runtime: - - name: manta-dev - - name: calamari-dev - 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: - name: create-chainspec run: | - ${{ github.workspace }}/target/release/manta build-spec --chain ${{ matrix.runtime.name }} --disable-default-bootnode --raw > ${{ github.workspace }}/tests/data/${{ matrix.runtime.name }}-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 run: | wget -P ${{ github.workspace }}/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json @@ -225,13 +209,40 @@ jobs: ${{ github.workspace }}/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/${{ matrix.runtime.name }}-fork.json \ + --chain=${{ github.workspace }}/tests/data/calamari-fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ --steps=2 + - name: create-chainspec + run: | + ${{ 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 + run: | + 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 + - name: Run live benchmarks test + env: + RUST_BACKTRACE: full + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 120G + SCCACHE_DIR: /home/runner/.cache/sccache + run: | + ${{ github.workspace }}/target/release/manta \ + benchmark \ + pallet \ + --chain=${{ github.workspace }}/tests/data/manta-fork.json \ + --pallet=* \ + --extrinsic=* \ + --repeat=1 \ + --steps=2 + - name: stop sccache server + run: sccache --stop-server || true stop-benchmark-checks: - needs: run-benchmark-checks + needs: start-benchmark-checks runs-on: ubuntu-20.04 if: ${{ always() }} steps: From e8b0dc44bea516733d63ae42975794d110253792 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 16:58:43 +0300 Subject: [PATCH 4/6] Fix Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 99f1e2354..d9e8a0055 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -209,7 +209,7 @@ jobs: ${{ github.workspace }}/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/calamari-fork.json \ + --chain=${{ github.workspace }}/tests/data/fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ From 83c66657808e258b4080dd69120a1fbd3cf22687 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 16:59:25 +0300 Subject: [PATCH 5/6] Fix Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index d9e8a0055..266bab1e0 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -234,7 +234,7 @@ jobs: ${{ github.workspace }}/target/release/manta \ benchmark \ pallet \ - --chain=${{ github.workspace }}/tests/data/manta-fork.json \ + --chain=${{ github.workspace }}/tests/data/fork.json \ --pallet=* \ --extrinsic=* \ --repeat=1 \ From b3d4723f70b44726d3d576caab2d2f094ee8a918 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 10 Jul 2023 19:41:02 +0300 Subject: [PATCH 6/6] Clean up Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 266bab1e0..077e035a2 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -3,7 +3,7 @@ on: pull_request: branches: [manta] push: - branches: [ghzlatarev/benchmarks-check-for-manta-dev] + branches: [manta] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true @@ -189,10 +189,10 @@ jobs: - name: build benchmarking binary run: | RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks - - name: create-chainspec + - 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 - - name: append manta-pay storage + - 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 @@ -214,10 +214,10 @@ jobs: --extrinsic=* \ --repeat=1 \ --steps=2 - - name: create-chainspec + - 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 - - name: append manta-pay storage + - 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