From 70c22aadd37feec76e1c43b1fb184110fcaa187a Mon Sep 17 00:00:00 2001 From: tenequm Date: Fri, 29 Sep 2023 20:23:43 +0300 Subject: [PATCH 01/17] ci: test new kubernetes based runners --- .github/workflows/reusable-build-and-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 3242073998..6d243e7fc5 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -30,7 +30,7 @@ permissions: jobs: build-node-image: name: Build Docker image - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} steps: @@ -143,7 +143,7 @@ jobs: unit-test: name: Unit tests - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} steps: @@ -170,7 +170,7 @@ jobs: coverage-report: name: Coverage report - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} options: --security-opt seccomp=unconfined @@ -231,7 +231,7 @@ jobs: build-and-run-try-runtime: name: Run try-runtime checks - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} steps: @@ -330,7 +330,7 @@ jobs: build-wasms: name: Export wasm artifacts - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] env: STEPS: 2 REPEATS: 1 From 22fbdc41ac20263389232b17c5bed34af9e2df19 Mon Sep 17 00:00:00 2001 From: tenequm Date: Fri, 29 Sep 2023 22:56:05 +0300 Subject: [PATCH 02/17] fix: docker build issue --- .github/workflows/reusable-build-and-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 6d243e7fc5..261e90cb46 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -62,6 +62,9 @@ jobs: - name: Build and push Docker image run: | + # This is needed to fix an issue when running on self-hosted runners in GKE + git config --global --add safe.directory /__w/mangata-node/mangata-node + docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} docker build -f devops/dockerfiles/node/Dockerfile \ --label="git_rev=$(git rev-parse HEAD)" \ From c2c691e8c88afaac84bf574f656f24f373c3f055 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 12:32:28 +0300 Subject: [PATCH 03/17] chore: temporary add debug step to docker build job --- .github/workflows/reusable-build-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 261e90cb46..8018ea8ad7 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -60,6 +60,7 @@ jobs: cp target/release/wbuild/mangata-kusama-runtime/mangata_kusama_runtime.compact.compressed.wasm ./mangata_kusama_runtime-${{ inputs.version }}.compact.compressed.wasm cp target/release/wbuild/mangata-rococo-runtime/mangata_rococo_runtime.compact.compressed.wasm ./mangata_rococo_runtime-${{ inputs.version }}.compact.compressed.wasm + - uses: mxschmitt/action-tmate@v3 - name: Build and push Docker image run: | # This is needed to fix an issue when running on self-hosted runners in GKE From 19e061d8e1404e31c28c00225858730cae4594e3 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 13:39:59 +0300 Subject: [PATCH 04/17] fix: try fixing docker socket access --- .github/workflows/reusable-build-and-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 8018ea8ad7..71f46162b5 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -33,6 +33,8 @@ jobs: runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} + volumes: + - /run/docker:/run/docker:rw steps: - uses: actions/checkout@v3 - name: Authenticate to Google Cloud From 0427c2bf28b05a58158b7407701a4551cbb2ade8 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 13:53:41 +0300 Subject: [PATCH 05/17] fix: try fixed docker build --- .github/workflows/reusable-build-and-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 71f46162b5..bbe5721ffb 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -33,8 +33,10 @@ jobs: runs-on: [actions-runner-scale-set] container: image: ${{ inputs.builder_image }} + env: + DOCKER_HOST: 'unix:///run/docker/docker.sock' volumes: - - /run/docker:/run/docker:rw + - /run/docker:/run/docker steps: - uses: actions/checkout@v3 - name: Authenticate to Google Cloud @@ -62,7 +64,7 @@ jobs: cp target/release/wbuild/mangata-kusama-runtime/mangata_kusama_runtime.compact.compressed.wasm ./mangata_kusama_runtime-${{ inputs.version }}.compact.compressed.wasm cp target/release/wbuild/mangata-rococo-runtime/mangata_rococo_runtime.compact.compressed.wasm ./mangata_rococo_runtime-${{ inputs.version }}.compact.compressed.wasm - - uses: mxschmitt/action-tmate@v3 + # - uses: mxschmitt/action-tmate@v3 - name: Build and push Docker image run: | # This is needed to fix an issue when running on self-hosted runners in GKE From 0295003336b40123ed28bb00d105dd39d1be8f71 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 14:08:37 +0300 Subject: [PATCH 06/17] chore: udpate e2e tests jobs to use new runners --- .github/workflows/reusable-build-and-test.yml | 1 - .github/workflows/reusable-e2e-tests.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index bbe5721ffb..db3396af97 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -64,7 +64,6 @@ jobs: cp target/release/wbuild/mangata-kusama-runtime/mangata_kusama_runtime.compact.compressed.wasm ./mangata_kusama_runtime-${{ inputs.version }}.compact.compressed.wasm cp target/release/wbuild/mangata-rococo-runtime/mangata_rococo_runtime.compact.compressed.wasm ./mangata_rococo_runtime-${{ inputs.version }}.compact.compressed.wasm - # - uses: mxschmitt/action-tmate@v3 - name: Build and push Docker image run: | # This is needed to fix an issue when running on self-hosted runners in GKE diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 906a23d322..244aa578dc 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -119,7 +119,7 @@ jobs: - command: "yarn test-sdk" fast: true - runs-on: [self-hosted, compile] + runs-on: [actions-runner-scale-set] timeout-minutes: 180 env: API_URL: "ws://127.0.0.1:9946" From 8a813f10cc01449a577046856faeb2a206b520ca Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 14:28:26 +0300 Subject: [PATCH 07/17] fix: preinstall yarn to be able to use setup-node action in e2e tests jobs --- .github/workflows/reusable-e2e-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 244aa578dc..8b098eeae8 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -175,6 +175,8 @@ jobs: ref: "${{ env.E2EBRANCHNAME }}" path: e2eTests + # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes + - run: npm install -g yarn - uses: actions/setup-node@v3 with: node-version: '18.16.1' From ee52b59cd9fe9918164988542ac260d2052d968c Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 14:32:59 +0300 Subject: [PATCH 08/17] fix: update fix for yarn absence --- .github/workflows/reusable-e2e-tests.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 8b098eeae8..e36d4f0b6e 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -176,7 +176,14 @@ jobs: path: e2eTests # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes - - run: npm install -g yarn + - name: Install yarn to fix self-hosted runner issue when running setup-node + #Ref: https://github.com/actions/setup-node/issues/182 + run: |- + curl -fsSL --create-dirs -o $HOME/bin/yarn \ + https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js + chmod +x $HOME/bin/yarn + echo "$HOME/bin" >> $GITHUB_PATH + - uses: actions/setup-node@v3 with: node-version: '18.16.1' From 361bd7eb70785b24d10b44d0f33707efad68918a Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 14:58:01 +0300 Subject: [PATCH 09/17] fix: test new workaround --- .github/workflows/reusable-e2e-tests.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index e36d4f0b6e..6283877ef9 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -175,15 +175,19 @@ jobs: ref: "${{ env.E2EBRANCHNAME }}" path: e2eTests - # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes - - name: Install yarn to fix self-hosted runner issue when running setup-node - #Ref: https://github.com/actions/setup-node/issues/182 - run: |- - curl -fsSL --create-dirs -o $HOME/bin/yarn \ - https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js - chmod +x $HOME/bin/yarn - echo "$HOME/bin" >> $GITHUB_PATH + # # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes + # - name: Install yarn to fix self-hosted runner issue when running setup-node + # #Ref: https://github.com/actions/setup-node/issues/182 + # run: |- + # curl -fsSL --create-dirs -o $HOME/bin/yarn \ + # https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js + # chmod +x $HOME/bin/yarn + # echo "$HOME/bin" >> $GITHUB_PATH + - uses: actions/setup-node@v3 + with: + node-version: '18.16.1' + - run: npm install -g yarn - uses: actions/setup-node@v3 with: node-version: '18.16.1' From 34aad7249b2a5de884398151831963002a75c5d0 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 20:22:12 +0300 Subject: [PATCH 10/17] chore: debug parachain launch run --- .github/workflows/reusable-e2e-tests.yml | 53 ++++++++++++------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 6283877ef9..6f02f9f4b4 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -92,32 +92,32 @@ jobs: include: - command: "yarn test-parallel --max-workers=10" fast: false - - command: "yarn test-sequential-no-bootstrap" - fast: false - - command: "yarn test-seqgasless" - fast: false - - command: "yarn test-maintenance" - fast: true - - command: "yarn test-bootstrap" - fast: false - - command: "yarn test-rewards-bootstrap" - fast: false - - command: "yarn test-parallel-autocompound" - fast: true - - command: "yarn test-sequential-autocompound" - fast: true - - command: "yarn test-poolliquidity" - fast: true - - command: "yarn test-governance" - fast: true - - command: "yarn test-multiswap" - fast: false - - command: "yarn test-experimentalStaking" - fast: true - - command: "yarn test-crowdloan" - fast: false - - command: "yarn test-sdk" - fast: true + # - command: "yarn test-sequential-no-bootstrap" + # fast: false + # - command: "yarn test-seqgasless" + # fast: false + # - command: "yarn test-maintenance" + # fast: true + # - command: "yarn test-bootstrap" + # fast: false + # - command: "yarn test-rewards-bootstrap" + # fast: false + # - command: "yarn test-parallel-autocompound" + # fast: true + # - command: "yarn test-sequential-autocompound" + # fast: true + # - command: "yarn test-poolliquidity" + # fast: true + # - command: "yarn test-governance" + # fast: true + # - command: "yarn test-multiswap" + # fast: false + # - command: "yarn test-experimentalStaking" + # fast: true + # - command: "yarn test-crowdloan" + # fast: false + # - command: "yarn test-sdk" + # fast: true runs-on: [actions-runner-scale-set] timeout-minutes: 180 @@ -207,6 +207,7 @@ jobs: # TODO: remove cache clean later run: yarn cache clean; yarn + - uses: mxschmitt/action-tmate@v3 - name: Run parachain launch working-directory: devops/parachain-launch run: npx @open-web3/parachain-launch generate config.yml From cf0c97c92e914a4f6829faad3458756613dd6363 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 21:04:54 +0300 Subject: [PATCH 11/17] chore: test full run with fixes --- .github/workflows/reusable-e2e-tests.yml | 79 ++++++++++++------------ 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 6f02f9f4b4..cbbf0999c5 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -92,32 +92,32 @@ jobs: include: - command: "yarn test-parallel --max-workers=10" fast: false - # - command: "yarn test-sequential-no-bootstrap" - # fast: false - # - command: "yarn test-seqgasless" - # fast: false - # - command: "yarn test-maintenance" - # fast: true - # - command: "yarn test-bootstrap" - # fast: false - # - command: "yarn test-rewards-bootstrap" - # fast: false - # - command: "yarn test-parallel-autocompound" - # fast: true - # - command: "yarn test-sequential-autocompound" - # fast: true - # - command: "yarn test-poolliquidity" - # fast: true - # - command: "yarn test-governance" - # fast: true - # - command: "yarn test-multiswap" - # fast: false - # - command: "yarn test-experimentalStaking" - # fast: true - # - command: "yarn test-crowdloan" - # fast: false - # - command: "yarn test-sdk" - # fast: true + - command: "yarn test-sequential-no-bootstrap" + fast: false + - command: "yarn test-seqgasless" + fast: false + - command: "yarn test-maintenance" + fast: true + - command: "yarn test-bootstrap" + fast: false + - command: "yarn test-rewards-bootstrap" + fast: false + - command: "yarn test-parallel-autocompound" + fast: true + - command: "yarn test-sequential-autocompound" + fast: true + - command: "yarn test-poolliquidity" + fast: true + - command: "yarn test-governance" + fast: true + - command: "yarn test-multiswap" + fast: false + - command: "yarn test-experimentalStaking" + fast: true + - command: "yarn test-crowdloan" + fast: false + - command: "yarn test-sdk" + fast: true runs-on: [actions-runner-scale-set] timeout-minutes: 180 @@ -175,19 +175,19 @@ jobs: ref: "${{ env.E2EBRANCHNAME }}" path: e2eTests - # # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes - # - name: Install yarn to fix self-hosted runner issue when running setup-node - # #Ref: https://github.com/actions/setup-node/issues/182 - # run: |- - # curl -fsSL --create-dirs -o $HOME/bin/yarn \ - # https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js - # chmod +x $HOME/bin/yarn - # echo "$HOME/bin" >> $GITHUB_PATH - - - uses: actions/setup-node@v3 - with: - node-version: '18.16.1' - - run: npm install -g yarn + # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes + - name: Install yarn to fix self-hosted runner issue when running setup-node + #Ref: https://github.com/actions/setup-node/issues/182 + run: |- + curl -fsSL --create-dirs -o $HOME/bin/yarn \ + https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js + chmod +x $HOME/bin/yarn + echo "$HOME/bin" >> $GITHUB_PATH + + # - uses: actions/setup-node@v3 + # with: + # node-version: '18.16.1' + # - run: npm install -g yarn - uses: actions/setup-node@v3 with: node-version: '18.16.1' @@ -207,7 +207,6 @@ jobs: # TODO: remove cache clean later run: yarn cache clean; yarn - - uses: mxschmitt/action-tmate@v3 - name: Run parachain launch working-directory: devops/parachain-launch run: npx @open-web3/parachain-launch generate config.yml From 9ccd000423f85341002f187a2cfd2d5922621132 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 21:28:49 +0300 Subject: [PATCH 12/17] fix: add missing docker-compose dependency --- .github/workflows/reusable-e2e-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index cbbf0999c5..7a270bd09d 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -176,12 +176,11 @@ jobs: path: e2eTests # Fixing issue with not having yarn installed on self-hosted runners in Kubernetes - - name: Install yarn to fix self-hosted runner issue when running setup-node + - name: Install yarn and docker-compose to fix self-hosted runner issue when running setup-node #Ref: https://github.com/actions/setup-node/issues/182 run: |- - curl -fsSL --create-dirs -o $HOME/bin/yarn \ - https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js - chmod +x $HOME/bin/yarn + curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js && chmod +x $HOME/bin/yarn + curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o $HOME/bin/docker-compose echo "$HOME/bin" >> $GITHUB_PATH # - uses: actions/setup-node@v3 From 1c1d632cb1308ff1b6b8c23700f319622ffc4c06 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 21:45:04 +0300 Subject: [PATCH 13/17] fix: docker-compose executable permission fix --- .github/workflows/reusable-e2e-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 7a270bd09d..98ee10a615 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -180,13 +180,9 @@ jobs: #Ref: https://github.com/actions/setup-node/issues/182 run: |- curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js && chmod +x $HOME/bin/yarn - curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o $HOME/bin/docker-compose + curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o $HOME/bin/docker-compose && chmod +x $HOME/bin/docker-compose echo "$HOME/bin" >> $GITHUB_PATH - # - uses: actions/setup-node@v3 - # with: - # node-version: '18.16.1' - # - run: npm install -g yarn - uses: actions/setup-node@v3 with: node-version: '18.16.1' From 21368d4f0ec8b6d65edd8428cfee079134d8d2ff Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 22:09:43 +0300 Subject: [PATCH 14/17] chore: update runner names --- .github/workflows/reusable-build-and-test.yml | 13 +++++++------ .github/workflows/reusable-e2e-tests.yml | 2 +- .github/workflows/reusable-perfomance-tests.yml | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index db3396af97..a685db2452 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -30,7 +30,7 @@ permissions: jobs: build-node-image: name: Build Docker image - runs-on: [actions-runner-scale-set] + runs-on: [compile] container: image: ${{ inputs.builder_image }} env: @@ -150,7 +150,7 @@ jobs: unit-test: name: Unit tests - runs-on: [actions-runner-scale-set] + runs-on: [compile] container: image: ${{ inputs.builder_image }} steps: @@ -177,7 +177,7 @@ jobs: coverage-report: name: Coverage report - runs-on: [actions-runner-scale-set] + runs-on: [compile] container: image: ${{ inputs.builder_image }} options: --security-opt seccomp=unconfined @@ -238,7 +238,7 @@ jobs: build-and-run-try-runtime: name: Run try-runtime checks - runs-on: [actions-runner-scale-set] + runs-on: [compile] container: image: ${{ inputs.builder_image }} steps: @@ -271,7 +271,8 @@ jobs: run-benchmarks: name: Run runtime benchmarks - runs-on: [self-hosted, performance] + # `performance` self-hosted runners have 8 cores and 16GB of RAM + runs-on: [performance] env: STEPS: 2 REPEATS: 1 @@ -337,7 +338,7 @@ jobs: build-wasms: name: Export wasm artifacts - runs-on: [actions-runner-scale-set] + runs-on: [compile] env: STEPS: 2 REPEATS: 1 diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 98ee10a615..175841a2b3 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -119,7 +119,7 @@ jobs: - command: "yarn test-sdk" fast: true - runs-on: [actions-runner-scale-set] + runs-on: [compile] timeout-minutes: 180 env: API_URL: "ws://127.0.0.1:9946" diff --git a/.github/workflows/reusable-perfomance-tests.yml b/.github/workflows/reusable-perfomance-tests.yml index 24b810b6b3..963bb42c0b 100644 --- a/.github/workflows/reusable-perfomance-tests.yml +++ b/.github/workflows/reusable-perfomance-tests.yml @@ -20,7 +20,7 @@ permissions: jobs: performance-tests: - runs-on: [self-hosted, compile] + runs-on: [compile] timeout-minutes: 180 env: ENV_REF: ${{ inputs.targetEnv || format('pr-{0}', github.event.number) }} From b364f23629b291bdd1087d6581d9b721ba9c6d98 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 22:18:07 +0300 Subject: [PATCH 15/17] chore: fix runner labels --- .github/workflows/reusable-build-and-test.yml | 12 ++++++------ .github/workflows/reusable-e2e-tests.yml | 2 +- .github/workflows/reusable-perfomance-tests.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index a685db2452..8c15fa71cf 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -30,7 +30,7 @@ permissions: jobs: build-node-image: name: Build Docker image - runs-on: [compile] + runs-on: [compile-gke] container: image: ${{ inputs.builder_image }} env: @@ -150,7 +150,7 @@ jobs: unit-test: name: Unit tests - runs-on: [compile] + runs-on: [compile-gke] container: image: ${{ inputs.builder_image }} steps: @@ -177,7 +177,7 @@ jobs: coverage-report: name: Coverage report - runs-on: [compile] + runs-on: [compile-gke] container: image: ${{ inputs.builder_image }} options: --security-opt seccomp=unconfined @@ -238,7 +238,7 @@ jobs: build-and-run-try-runtime: name: Run try-runtime checks - runs-on: [compile] + runs-on: [compile-gke] container: image: ${{ inputs.builder_image }} steps: @@ -272,7 +272,7 @@ jobs: run-benchmarks: name: Run runtime benchmarks # `performance` self-hosted runners have 8 cores and 16GB of RAM - runs-on: [performance] + runs-on: [performance-gke] env: STEPS: 2 REPEATS: 1 @@ -338,7 +338,7 @@ jobs: build-wasms: name: Export wasm artifacts - runs-on: [compile] + runs-on: [compile-gke] env: STEPS: 2 REPEATS: 1 diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 175841a2b3..154da93c41 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -119,7 +119,7 @@ jobs: - command: "yarn test-sdk" fast: true - runs-on: [compile] + runs-on: [compile-gke] timeout-minutes: 180 env: API_URL: "ws://127.0.0.1:9946" diff --git a/.github/workflows/reusable-perfomance-tests.yml b/.github/workflows/reusable-perfomance-tests.yml index 963bb42c0b..a7c58c28c4 100644 --- a/.github/workflows/reusable-perfomance-tests.yml +++ b/.github/workflows/reusable-perfomance-tests.yml @@ -20,7 +20,7 @@ permissions: jobs: performance-tests: - runs-on: [compile] + runs-on: [compile-gke] timeout-minutes: 180 env: ENV_REF: ${{ inputs.targetEnv || format('pr-{0}', github.event.number) }} From ea89a8ad60ad327e92967170358460fbdae1de92 Mon Sep 17 00:00:00 2001 From: tenequm Date: Tue, 3 Oct 2023 23:00:06 +0300 Subject: [PATCH 16/17] fix: remove redundant permission fix step --- .github/workflows/reusable-build-and-test.yml | 20 ------------------- .github/workflows/reusable-e2e-tests.yml | 4 ---- .../workflows/reusable-perfomance-tests.yml | 4 ---- 3 files changed, 28 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 8c15fa71cf..37c552f73f 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -110,10 +110,6 @@ jobs: ./mangata_kusama_runtime-${{ inputs.version }}-fast.compact.compressed.wasm ./mangata_rococo_runtime-${{ inputs.version }}-fast.compact.compressed.wasm - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE - rustfmt-check: name: Formatting check runs-on: ubuntu-latest @@ -171,9 +167,6 @@ jobs: key: cargo-unit-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }} - name: Run unit tests run: cargo test -j2 - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE coverage-report: name: Coverage report @@ -206,9 +199,6 @@ jobs: with: token: ${{ secrets.ORG_CODECOV_TOKEN }} fail_ci_if_error: true - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE run-benchmarks-tests: name: Run benchmark tests @@ -265,10 +255,6 @@ jobs: - name: Run try-runtime Kusama Mainnet run: cargo run --release --features=try-runtime try-runtime --chain=kusama --runtime=target/release/wbuild/mangata-kusama-runtime/mangata_kusama_runtime.wasm on-runtime-upgrade live --uri wss://kusama-rpc.mangata.online:443 - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE - run-benchmarks: name: Run runtime benchmarks # `performance` self-hosted runners have 8 cores and 16GB of RAM @@ -332,9 +318,6 @@ jobs: name: benchmarks path: ./benchmarks - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE build-wasms: name: Export wasm artifacts @@ -377,6 +360,3 @@ jobs: /bin/bash -c 'target/release/mangata-node export-genesis-state --chain=rococo-local -l=info,xyk=error > /dev/null' /bin/bash -c 'target/release/mangata-node export-genesis-wasm --chain=rococo-local -l=info,xyk=error > /dev/null' - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 154da93c41..2d36e62b9d 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -288,10 +288,6 @@ jobs: run: | docker kill $(docker ps -q) 2>/dev/null && echo $? docker-compose down -v - - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE test-complete: needs: [setup-report, e2e-test-matrix] diff --git a/.github/workflows/reusable-perfomance-tests.yml b/.github/workflows/reusable-perfomance-tests.yml index a7c58c28c4..0e39bebd19 100644 --- a/.github/workflows/reusable-perfomance-tests.yml +++ b/.github/workflows/reusable-perfomance-tests.yml @@ -88,7 +88,3 @@ jobs: ./e2e/performance/enqueued.txt ./e2e/performance/executed.txt ./e2e/performance/pending.txt - - - name: Fix permissions on self-hosted runner - if: always() - run: chown -R 1100:1100 $GITHUB_WORKSPACE From f623ef56e479d9834187f35e6b50a182036bd5c8 Mon Sep 17 00:00:00 2001 From: tenequm Date: Wed, 4 Oct 2023 11:42:21 +0300 Subject: [PATCH 17/17] feat: configure specific runners for e2e jobs to optimize resource usage and execution time --- .github/workflows/reusable-e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 2d36e62b9d..7dbf6e7e70 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -119,7 +119,7 @@ jobs: - command: "yarn test-sdk" fast: true - runs-on: [compile-gke] + runs-on: [e2e-gke] timeout-minutes: 180 env: API_URL: "ws://127.0.0.1:9946"