From fe0533236dcd9b3ec51f17a9dafcc7936d1c067c Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 09:38:59 -0500 Subject: [PATCH 01/37] Create workflow to test backward compatibility of performance harness with prior leap releases. --- .../workflows/ph_backward_compatibility.yaml | 113 +++++++++++++++++- 1 file changed, 109 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 8da13d18d9..2a0b415d32 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -12,10 +12,115 @@ defaults: shell: bash jobs: - tmp: - name: Stub + d: + name: Discover Platforms runs-on: ubuntu-latest + outputs: + missing-platforms: ${{steps.discover.outputs.missing-platforms}} + p: ${{steps.discover.outputs.platforms}} steps: - - name: Workflow Stub + - name: Discover Platforms + id: discover + uses: AntelopeIO/discover-platforms-action@v1 + with: + platform-file: .cicd/platforms.json + password: ${{secrets.GITHUB_TOKEN}} + package-name: builders + + build-platforms: + name: Build Platforms + needs: d + if: needs.d.outputs.missing-platforms != '[]' + strategy: + fail-fast: false + matrix: + platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} + runs-on: ["self-hosted", "enf-x86-beefy"] + permissions: + packages: write + contents: read + steps: + - name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{github.repository_owner}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} + + Build: + needs: [d, build-platforms] + if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + runs-on: ["self-hosted", "enf-x86-beefy"] + container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Build + id: build + run: | + # https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja + cmake --build build + tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst + - name: Upload builddir + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: ${{matrix.platform}}-build + path: build.tar.zst + + tests: + name: Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + release: [3.1, 3.2, 4.0] + runs-on: ["self-hosted", "enf-x86-hightier"] + container: + image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + options: --security-opt seccomp=unconfined + steps: + - uses: actions/checkout@v3 + - name: Download builddir + uses: actions/download-artifact@v3 + with: + name: ${{matrix.platform}}-build + - name: Extract Build Directory + run: | + # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs + chown -R $(id -u):$(id -g) $PWD + zstdcat build.tar.zst | tar x + - name: Download Prev Leap Version + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap*amd64.deb' + target: '${{matrix.release}}' + token: ${{github.token}} + - name: Extract and Place Rev Leap Version artifacts + run: | + mkdir tmp + dpkg -x leap*amd64.deb tmp + rm build/bin/nodeos + rm build/bin/cleos + mv tmp/usr/bin/nodeos build/bin + mv tmp/usr/bin/cleos build/bin + - name: Run Tests run: | - echo "Workflow Stub" + cd build + ctest --output-on-failure -j $(nproc) -R "performance_test_" --timeout 420 From f848de5bd61cbaf5b35eb98a84de1be99e217dec Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 13:52:22 -0500 Subject: [PATCH 02/37] Try to placate different version artifact naming conventions. --- .github/workflows/ph_backward_compatibility.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 2a0b415d32..91e385fae2 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -104,12 +104,22 @@ jobs: # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs chown -R $(id -u):$(id -g) $PWD zstdcat build.tar.zst | tar x - - name: Download Prev Leap Version + - if: ${{ matrix.release != '3.1' }} + name: Download Prev Leap Version (v3.2.x and after) uses: AntelopeIO/asset-artifact-download-action@v2 with: owner: AntelopeIO repo: leap - file: 'leap*amd64.deb' + file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - if: ${{ matrix.release == '3.1' }} + name: Download Prev Leap Version (v3.1.x) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb target: '${{matrix.release}}' token: ${{github.token}} - name: Extract and Place Rev Leap Version artifacts From 3a720421e08ee7ebc52bb5c9199351cb795aa40b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 14:01:12 -0500 Subject: [PATCH 03/37] missed the extract step --- .github/workflows/ph_backward_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 91e385fae2..0a2a2d25a7 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -125,7 +125,7 @@ jobs: - name: Extract and Place Rev Leap Version artifacts run: | mkdir tmp - dpkg -x leap*amd64.deb tmp + dpkg -x leap*.deb tmp rm build/bin/nodeos rm build/bin/cleos mv tmp/usr/bin/nodeos build/bin From 2e90e39f7998f83ae946e62878eeec5388fb2447 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 14:09:41 -0500 Subject: [PATCH 04/37] Do not run tests in parallel. --- .github/workflows/ph_backward_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 0a2a2d25a7..4c4db0db2c 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -133,4 +133,4 @@ jobs: - name: Run Tests run: | cd build - ctest --output-on-failure -j $(nproc) -R "performance_test_" --timeout 420 + ctest --output-on-failure -R "performance_test_" --timeout 420 From cd6926567c70092b9bec8b646fee93ace0b8d546 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 14:28:28 -0500 Subject: [PATCH 05/37] Use low-tier for longer run time --- .github/workflows/ph_backward_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 4c4db0db2c..f8ccca5bcc 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -89,7 +89,7 @@ jobs: matrix: platform: [ubuntu20, ubuntu22] release: [3.1, 3.2, 4.0] - runs-on: ["self-hosted", "enf-x86-hightier"] + runs-on: ["self-hosted", "enf-x86-lowtier"] container: image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} options: --security-opt seccomp=unconfined From a2aa513e467ae793e33e3be81e6633c5f97c7c6e Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 17:23:46 -0500 Subject: [PATCH 06/37] Split up tests into individual runs. --- .../workflows/ph_backward_compatibility.yaml | 47 +++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index f8ccca5bcc..723ae91ede 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -130,7 +130,48 @@ jobs: rm build/bin/cleos mv tmp/usr/bin/nodeos build/bin mv tmp/usr/bin/cleos build/bin - - name: Run Tests - run: | cd build - ctest --output-on-failure -R "performance_test_" --timeout 420 + + - name: Run BP Op Mode Performance Test + run: | + ctest --output-on-failure performance_test_bp --timeout 420 + + - name: Run CPU Trx Spec Performance Test + run: | + ctest --output-on-failure performance_test_cpu_trx_spec --timeout 420 + + - name: Run API Node Op Mode Performance Test + run: | + ctest --output-on-failure performance_test_api --timeout 420 + + - name: Run Read Only Trxs Performance Test + run: | + ctest --output-on-failure performance_test_read_only_trxs --timeout 420 + + - name: Run P2P Performance Basic Test + run: | + ctest --output-on-failure performance_test_basic_p2p --timeout 420 + + - name: Run User Defined Transfer Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure performance_test_basic_transfer_trx_spec --timeout 420 + + - name: Run User Defined New Acct Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure performance_test_basic_new_acct_trx_spec --timeout 420 + + - name: Run User Defined CPU Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure performance_test_basic_cpu_trx_spec --timeout 420 + + - name: Run User Defined Ram Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure performance_test_basic_ram_trx_spec --timeout 420 + + - name: Run API Node Op Mode Performance Basic Test + run: | + ctest --output-on-failure performance_test_basic_http --timeout 420 + + - name: Run Read Only Trx Performance Basic Test + run: | + ctest --output-on-failure performance_test_basic_read_only_trxs --timeout 420 From 258fefc41d0843389941df191aea419484011a02 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 30 Jun 2023 17:39:41 -0500 Subject: [PATCH 07/37] Tests not found - move change dir build into first test. --- .github/workflows/ph_backward_compatibility.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 723ae91ede..174873a5cf 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -130,48 +130,37 @@ jobs: rm build/bin/cleos mv tmp/usr/bin/nodeos build/bin mv tmp/usr/bin/cleos build/bin - cd build - - name: Run BP Op Mode Performance Test run: | + cd build ctest --output-on-failure performance_test_bp --timeout 420 - - name: Run CPU Trx Spec Performance Test run: | ctest --output-on-failure performance_test_cpu_trx_spec --timeout 420 - - name: Run API Node Op Mode Performance Test run: | ctest --output-on-failure performance_test_api --timeout 420 - - name: Run Read Only Trxs Performance Test run: | ctest --output-on-failure performance_test_read_only_trxs --timeout 420 - - name: Run P2P Performance Basic Test run: | ctest --output-on-failure performance_test_basic_p2p --timeout 420 - - name: Run User Defined Transfer Trx Spec Performance Basic Tests run: | ctest --output-on-failure performance_test_basic_transfer_trx_spec --timeout 420 - - name: Run User Defined New Acct Trx Spec Performance Basic Tests run: | ctest --output-on-failure performance_test_basic_new_acct_trx_spec --timeout 420 - - name: Run User Defined CPU Trx Spec Performance Basic Tests run: | ctest --output-on-failure performance_test_basic_cpu_trx_spec --timeout 420 - - name: Run User Defined Ram Trx Spec Performance Basic Tests run: | ctest --output-on-failure performance_test_basic_ram_trx_spec --timeout 420 - - name: Run API Node Op Mode Performance Basic Test run: | ctest --output-on-failure performance_test_basic_http --timeout 420 - - name: Run Read Only Trx Performance Basic Test run: | ctest --output-on-failure performance_test_basic_read_only_trxs --timeout 420 From 99d23168bae18eef23cb36c270e278922da30cd5 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 09:47:35 -0500 Subject: [PATCH 08/37] Add regex flag to ctest. --- .../workflows/ph_backward_compatibility.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 174873a5cf..7b0bcc5d8d 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -133,34 +133,34 @@ jobs: - name: Run BP Op Mode Performance Test run: | cd build - ctest --output-on-failure performance_test_bp --timeout 420 + ctest --output-on-failure -R performance_test_bp --timeout 420 - name: Run CPU Trx Spec Performance Test run: | - ctest --output-on-failure performance_test_cpu_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 420 - name: Run API Node Op Mode Performance Test run: | - ctest --output-on-failure performance_test_api --timeout 420 + ctest --output-on-failure -R performance_test_api --timeout 420 - name: Run Read Only Trxs Performance Test run: | - ctest --output-on-failure performance_test_read_only_trxs --timeout 420 + ctest --output-on-failure -R performance_test_read_only_trxs --timeout 420 - name: Run P2P Performance Basic Test run: | - ctest --output-on-failure performance_test_basic_p2p --timeout 420 + ctest --output-on-failure -R performance_test_basic_p2p --timeout 420 - name: Run User Defined Transfer Trx Spec Performance Basic Tests run: | - ctest --output-on-failure performance_test_basic_transfer_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 420 - name: Run User Defined New Acct Trx Spec Performance Basic Tests run: | - ctest --output-on-failure performance_test_basic_new_acct_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 420 - name: Run User Defined CPU Trx Spec Performance Basic Tests run: | - ctest --output-on-failure performance_test_basic_cpu_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 420 - name: Run User Defined Ram Trx Spec Performance Basic Tests run: | - ctest --output-on-failure performance_test_basic_ram_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 420 - name: Run API Node Op Mode Performance Basic Test run: | - ctest --output-on-failure performance_test_basic_http --timeout 420 + ctest --output-on-failure -R performance_test_basic_http --timeout 420 - name: Run Read Only Trx Performance Basic Test run: | - ctest --output-on-failure performance_test_basic_read_only_trxs --timeout 420 + ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 420 From 91cf4db380214cebaa3fdcde7aa99f71cb76a53d Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 10:07:12 -0500 Subject: [PATCH 09/37] Give tests a little longer to complete. --- .../workflows/ph_backward_compatibility.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 7b0bcc5d8d..209443270a 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -133,34 +133,34 @@ jobs: - name: Run BP Op Mode Performance Test run: | cd build - ctest --output-on-failure -R performance_test_bp --timeout 420 + ctest --output-on-failure -R performance_test_bp --timeout 480 - name: Run CPU Trx Spec Performance Test run: | - ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Test run: | - ctest --output-on-failure -R performance_test_api --timeout 420 + ctest --output-on-failure -R performance_test_api --timeout 480 - name: Run Read Only Trxs Performance Test run: | - ctest --output-on-failure -R performance_test_read_only_trxs --timeout 420 + ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 - name: Run P2P Performance Basic Test run: | - ctest --output-on-failure -R performance_test_basic_p2p --timeout 420 + ctest --output-on-failure -R performance_test_basic_p2p --timeout 480 - name: Run User Defined Transfer Trx Spec Performance Basic Tests run: | - ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 480 - name: Run User Defined New Acct Trx Spec Performance Basic Tests run: | - ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 480 - name: Run User Defined CPU Trx Spec Performance Basic Tests run: | - ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 480 - name: Run User Defined Ram Trx Spec Performance Basic Tests run: | - ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 420 + ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Basic Test run: | - ctest --output-on-failure -R performance_test_basic_http --timeout 420 + ctest --output-on-failure -R performance_test_basic_http --timeout 480 - name: Run Read Only Trx Performance Basic Test run: | - ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 420 + ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 From d42f0e784a761f958b0ce65313de9383d5857104 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 10:34:33 -0500 Subject: [PATCH 10/37] Split test scenarios into separate jobs. --- .../workflows/ph_backward_compatibility.yaml | 236 ++++++++++++++++-- 1 file changed, 213 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 209443270a..ec99e9ea1e 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -80,8 +80,8 @@ jobs: name: ${{matrix.platform}}-build path: build.tar.zst - tests: - name: Tests + ph-basic-tests: + name: Performance Harness Basic Tests needs: [d, Build] if: always() && needs.Build.result == 'success' strategy: @@ -133,34 +133,224 @@ jobs: - name: Run BP Op Mode Performance Test run: | cd build - ctest --output-on-failure -R performance_test_bp --timeout 480 - - name: Run CPU Trx Spec Performance Test + ctest --output-on-failure -R performance_test_basic --timeout 480 + + bp-op-mode-tests: + name: BP Op Mode Performance Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + release: [3.1, 3.2, 4.0] + runs-on: ["self-hosted", "enf-x86-lowtier"] + container: + image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + options: --security-opt seccomp=unconfined + steps: + - uses: actions/checkout@v3 + - name: Download builddir + uses: actions/download-artifact@v3 + with: + name: ${{matrix.platform}}-build + - name: Extract Build Directory run: | - ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 - - name: Run API Node Op Mode Performance Test + # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs + chown -R $(id -u):$(id -g) $PWD + zstdcat build.tar.zst | tar x + - if: ${{ matrix.release != '3.1' }} + name: Download Prev Leap Version (v3.2.x and after) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - if: ${{ matrix.release == '3.1' }} + name: Download Prev Leap Version (v3.1.x) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - name: Extract and Place Rev Leap Version artifacts run: | - ctest --output-on-failure -R performance_test_api --timeout 480 - - name: Run Read Only Trxs Performance Test + mkdir tmp + dpkg -x leap*.deb tmp + rm build/bin/nodeos + rm build/bin/cleos + mv tmp/usr/bin/nodeos build/bin + mv tmp/usr/bin/cleos build/bin + - name: Run BP Op Mode Performance Test run: | - ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 - - name: Run P2P Performance Basic Test + cd build + ctest --output-on-failure -R performance_test_bp --timeout 480 + + cpu-trx-spec-tests: + name: CPU Trx Spec Performance Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + release: [3.1, 3.2, 4.0] + runs-on: ["self-hosted", "enf-x86-lowtier"] + container: + image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + options: --security-opt seccomp=unconfined + steps: + - uses: actions/checkout@v3 + - name: Download builddir + uses: actions/download-artifact@v3 + with: + name: ${{matrix.platform}}-build + - name: Extract Build Directory run: | - ctest --output-on-failure -R performance_test_basic_p2p --timeout 480 - - name: Run User Defined Transfer Trx Spec Performance Basic Tests + # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs + chown -R $(id -u):$(id -g) $PWD + zstdcat build.tar.zst | tar x + - if: ${{ matrix.release != '3.1' }} + name: Download Prev Leap Version (v3.2.x and after) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - if: ${{ matrix.release == '3.1' }} + name: Download Prev Leap Version (v3.1.x) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - name: Extract and Place Rev Leap Version artifacts run: | - ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 480 - - name: Run User Defined New Acct Trx Spec Performance Basic Tests + mkdir tmp + dpkg -x leap*.deb tmp + rm build/bin/nodeos + rm build/bin/cleos + mv tmp/usr/bin/nodeos build/bin + mv tmp/usr/bin/cleos build/bin + - name: Run CPU Trx Spec Performance Test run: | - ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 480 - - name: Run User Defined CPU Trx Spec Performance Basic Tests + cd build + ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 + + api-op-mode-tests: + name: API Node Op Mode Performance Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + release: [3.1, 3.2, 4.0] + runs-on: ["self-hosted", "enf-x86-lowtier"] + container: + image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + options: --security-opt seccomp=unconfined + steps: + - uses: actions/checkout@v3 + - name: Download builddir + uses: actions/download-artifact@v3 + with: + name: ${{matrix.platform}}-build + - name: Extract Build Directory run: | - ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 480 - - name: Run User Defined Ram Trx Spec Performance Basic Tests + # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs + chown -R $(id -u):$(id -g) $PWD + zstdcat build.tar.zst | tar x + - if: ${{ matrix.release != '3.1' }} + name: Download Prev Leap Version (v3.2.x and after) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - if: ${{ matrix.release == '3.1' }} + name: Download Prev Leap Version (v3.1.x) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - name: Extract and Place Rev Leap Version artifacts run: | - ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 480 - - name: Run API Node Op Mode Performance Basic Test + mkdir tmp + dpkg -x leap*.deb tmp + rm build/bin/nodeos + rm build/bin/cleos + mv tmp/usr/bin/nodeos build/bin + mv tmp/usr/bin/cleos build/bin + - name: Run API Node Op Mode Performance Test run: | - ctest --output-on-failure -R performance_test_basic_http --timeout 480 - - name: Run Read Only Trx Performance Basic Test + cd build + ctest --output-on-failure -R performance_test_api --timeout 480 + + read-only-trx-tests: + name: Read Only Trxs Performance Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + release: [3.1, 3.2, 4.0] + runs-on: ["self-hosted", "enf-x86-lowtier"] + container: + image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + options: --security-opt seccomp=unconfined + steps: + - uses: actions/checkout@v3 + - name: Download builddir + uses: actions/download-artifact@v3 + with: + name: ${{matrix.platform}}-build + - name: Extract Build Directory run: | - ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 + # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs + chown -R $(id -u):$(id -g) $PWD + zstdcat build.tar.zst | tar x + - if: ${{ matrix.release != '3.1' }} + name: Download Prev Leap Version (v3.2.x and after) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - if: ${{ matrix.release == '3.1' }} + name: Download Prev Leap Version (v3.1.x) + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb + target: '${{matrix.release}}' + token: ${{github.token}} + - name: Extract and Place Rev Leap Version artifacts + run: | + mkdir tmp + dpkg -x leap*.deb tmp + rm build/bin/nodeos + rm build/bin/cleos + mv tmp/usr/bin/nodeos build/bin + mv tmp/usr/bin/cleos build/bin + - name: Run Read Only Trxs Performance Test + run: | + cd build + ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 \ No newline at end of file From 58b0f32894305ed7d655e61da5a93cb1b2f0ea16 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 10:49:56 -0500 Subject: [PATCH 11/37] Revert "Split test scenarios into separate jobs." This reverts commit d42f0e784a761f958b0ce65313de9383d5857104. --- .../workflows/ph_backward_compatibility.yaml | 236 ++---------------- 1 file changed, 23 insertions(+), 213 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index ec99e9ea1e..209443270a 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -80,63 +80,8 @@ jobs: name: ${{matrix.platform}}-build path: build.tar.zst - ph-basic-tests: - name: Performance Harness Basic Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - release: [3.1, 3.2, 4.0] - runs-on: ["self-hosted", "enf-x86-lowtier"] - container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - options: --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v3 - - name: Download builddir - uses: actions/download-artifact@v3 - with: - name: ${{matrix.platform}}-build - - name: Extract Build Directory - run: | - # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs - chown -R $(id -u):$(id -g) $PWD - zstdcat build.tar.zst | tar x - - if: ${{ matrix.release != '3.1' }} - name: Download Prev Leap Version (v3.2.x and after) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - if: ${{ matrix.release == '3.1' }} - name: Download Prev Leap Version (v3.1.x) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - name: Extract and Place Rev Leap Version artifacts - run: | - mkdir tmp - dpkg -x leap*.deb tmp - rm build/bin/nodeos - rm build/bin/cleos - mv tmp/usr/bin/nodeos build/bin - mv tmp/usr/bin/cleos build/bin - - name: Run BP Op Mode Performance Test - run: | - cd build - ctest --output-on-failure -R performance_test_basic --timeout 480 - - bp-op-mode-tests: - name: BP Op Mode Performance Tests + tests: + name: Tests needs: [d, Build] if: always() && needs.Build.result == 'success' strategy: @@ -189,168 +134,33 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_bp --timeout 480 - - cpu-trx-spec-tests: - name: CPU Trx Spec Performance Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - release: [3.1, 3.2, 4.0] - runs-on: ["self-hosted", "enf-x86-lowtier"] - container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - options: --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v3 - - name: Download builddir - uses: actions/download-artifact@v3 - with: - name: ${{matrix.platform}}-build - - name: Extract Build Directory - run: | - # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs - chown -R $(id -u):$(id -g) $PWD - zstdcat build.tar.zst | tar x - - if: ${{ matrix.release != '3.1' }} - name: Download Prev Leap Version (v3.2.x and after) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - if: ${{ matrix.release == '3.1' }} - name: Download Prev Leap Version (v3.1.x) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - name: Extract and Place Rev Leap Version artifacts - run: | - mkdir tmp - dpkg -x leap*.deb tmp - rm build/bin/nodeos - rm build/bin/cleos - mv tmp/usr/bin/nodeos build/bin - mv tmp/usr/bin/cleos build/bin - name: Run CPU Trx Spec Performance Test run: | - cd build ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 - - api-op-mode-tests: - name: API Node Op Mode Performance Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - release: [3.1, 3.2, 4.0] - runs-on: ["self-hosted", "enf-x86-lowtier"] - container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - options: --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v3 - - name: Download builddir - uses: actions/download-artifact@v3 - with: - name: ${{matrix.platform}}-build - - name: Extract Build Directory - run: | - # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs - chown -R $(id -u):$(id -g) $PWD - zstdcat build.tar.zst | tar x - - if: ${{ matrix.release != '3.1' }} - name: Download Prev Leap Version (v3.2.x and after) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - if: ${{ matrix.release == '3.1' }} - name: Download Prev Leap Version (v3.1.x) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - name: Extract and Place Rev Leap Version artifacts - run: | - mkdir tmp - dpkg -x leap*.deb tmp - rm build/bin/nodeos - rm build/bin/cleos - mv tmp/usr/bin/nodeos build/bin - mv tmp/usr/bin/cleos build/bin - name: Run API Node Op Mode Performance Test run: | - cd build ctest --output-on-failure -R performance_test_api --timeout 480 - - read-only-trx-tests: - name: Read Only Trxs Performance Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - release: [3.1, 3.2, 4.0] - runs-on: ["self-hosted", "enf-x86-lowtier"] - container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - options: --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v3 - - name: Download builddir - uses: actions/download-artifact@v3 - with: - name: ${{matrix.platform}}-build - - name: Extract Build Directory + - name: Run Read Only Trxs Performance Test run: | - # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs - chown -R $(id -u):$(id -g) $PWD - zstdcat build.tar.zst | tar x - - if: ${{ matrix.release != '3.1' }} - name: Download Prev Leap Version (v3.2.x and after) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - if: ${{ matrix.release == '3.1' }} - name: Download Prev Leap Version (v3.1.x) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - name: Extract and Place Rev Leap Version artifacts + ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 + - name: Run P2P Performance Basic Test run: | - mkdir tmp - dpkg -x leap*.deb tmp - rm build/bin/nodeos - rm build/bin/cleos - mv tmp/usr/bin/nodeos build/bin - mv tmp/usr/bin/cleos build/bin - - name: Run Read Only Trxs Performance Test + ctest --output-on-failure -R performance_test_basic_p2p --timeout 480 + - name: Run User Defined Transfer Trx Spec Performance Basic Tests run: | - cd build - ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 \ No newline at end of file + ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 480 + - name: Run User Defined New Acct Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 480 + - name: Run User Defined CPU Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 480 + - name: Run User Defined Ram Trx Spec Performance Basic Tests + run: | + ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 480 + - name: Run API Node Op Mode Performance Basic Test + run: | + ctest --output-on-failure -R performance_test_basic_http --timeout 480 + - name: Run Read Only Trx Performance Basic Test + run: | + ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 From 5499dd010eccdab793d85829dc0e9aa395f99ded Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 10:52:06 -0500 Subject: [PATCH 12/37] Always run test scenarios. --- .github/workflows/ph_backward_compatibility.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 209443270a..262036955b 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -131,36 +131,47 @@ jobs: mv tmp/usr/bin/nodeos build/bin mv tmp/usr/bin/cleos build/bin - name: Run BP Op Mode Performance Test + if: always() run: | cd build ctest --output-on-failure -R performance_test_bp --timeout 480 - name: Run CPU Trx Spec Performance Test + if: always() run: | ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Test + if: always() run: | ctest --output-on-failure -R performance_test_api --timeout 480 - name: Run Read Only Trxs Performance Test + if: always() run: | ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 - name: Run P2P Performance Basic Test + if: always() run: | ctest --output-on-failure -R performance_test_basic_p2p --timeout 480 - name: Run User Defined Transfer Trx Spec Performance Basic Tests + if: always() run: | ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 480 - name: Run User Defined New Acct Trx Spec Performance Basic Tests + if: always() run: | ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 480 - name: Run User Defined CPU Trx Spec Performance Basic Tests + if: always() run: | ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 480 - name: Run User Defined Ram Trx Spec Performance Basic Tests + if: always() run: | ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Basic Test + if: always() run: | ctest --output-on-failure -R performance_test_basic_http --timeout 480 - name: Run Read Only Trx Performance Basic Test + if: always() run: | ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 From ea37b69738f18e79d5ff10eeabde0d3a4ee446e0 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 3 Jul 2023 11:20:43 -0500 Subject: [PATCH 13/37] make sure to change to the build dir. --- .github/workflows/ph_backward_compatibility.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 262036955b..347cceedd5 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -138,40 +138,50 @@ jobs: - name: Run CPU Trx Spec Performance Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_cpu_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_api --timeout 480 - name: Run Read Only Trxs Performance Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 - name: Run P2P Performance Basic Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_p2p --timeout 480 - name: Run User Defined Transfer Trx Spec Performance Basic Tests if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_transfer_trx_spec --timeout 480 - name: Run User Defined New Acct Trx Spec Performance Basic Tests if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_new_acct_trx_spec --timeout 480 - name: Run User Defined CPU Trx Spec Performance Basic Tests if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_cpu_trx_spec --timeout 480 - name: Run User Defined Ram Trx Spec Performance Basic Tests if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_ram_trx_spec --timeout 480 - name: Run API Node Op Mode Performance Basic Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_http --timeout 480 - name: Run Read Only Trx Performance Basic Test if: always() run: | + cd build ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 From 3a0960e00441f6e0a820009bc142b08d52cd84f9 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 09:00:57 -0500 Subject: [PATCH 14/37] Use full nodeosVersion. cleos time-limit option was added in 3.2 but is not in 3.1 so need to be able to differentiate on minor version number. --- tests/TestHarness/Node.py | 7 +++++-- tests/performance_tests/performance_test_basic.py | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/TestHarness/Node.py b/tests/TestHarness/Node.py index 76b7aa868c..888048d6dd 100644 --- a/tests/TestHarness/Node.py +++ b/tests/TestHarness/Node.py @@ -75,8 +75,8 @@ def configureVersion(self): self.fetchBlock = lambda blockNum: self.processUrllibRequest("chain", "get_block", {"block_num_or_id":blockNum}, silentErrors=False, exitOnError=True) self.fetchKeyCommand = lambda: "[trx][trx][ref_block_num]" self.fetchRefBlock = lambda trans: trans["trx"]["trx"]["ref_block_num"] - self.cleosLimit = "" self.fetchHeadBlock = lambda node, headBlock: node.processUrllibRequest("chain", "get_block", {"block_num_or_id":headBlock}, silentErrors=False, exitOnError=True) + self.cleosLimit = "" else: self.fetchTransactionCommand = lambda: "get transaction_trace" @@ -84,8 +84,11 @@ def configureVersion(self): self.fetchBlock = lambda blockNum: self.processUrllibRequest("trace_api", "get_block", {"block_num":blockNum}, silentErrors=False, exitOnError=True) self.fetchKeyCommand = lambda: "[transaction][transaction_header][ref_block_num]" self.fetchRefBlock = lambda trans: trans["block_num"] - self.cleosLimit = "--time-limit 999" self.fetchHeadBlock = lambda node, headBlock: node.processUrllibRequest("chain", "get_block_info", {"block_num":headBlock}, silentErrors=False, exitOnError=True) + if 'v3.1' in self.nodeosVers: + self.cleosLimit = "" + else: + self.cleosLimit = "--time-limit 999" def __str__(self): return "Host: %s, Port:%d, NodeNum:%s, Pid:%s" % (self.host, self.port, self.nodeId, self.pid) diff --git a/tests/performance_tests/performance_test_basic.py b/tests/performance_tests/performance_test_basic.py index a22b373c04..30c7f330d4 100755 --- a/tests/performance_tests/performance_test_basic.py +++ b/tests/performance_tests/performance_test_basic.py @@ -124,7 +124,7 @@ def __post_init__(self): def configureValidationNodes(): validationNodeSpecificNodeosStr = "" - if self.nodeosVers == "v2": + if "v2" in self.nodeosVers: validationNodeSpecificNodeosStr += '--plugin eosio::history_api_plugin --filter-on "*" ' else: #If prodsEnableTraceApi, then Cluster configures all nodes with trace_api_plugin so no need to duplicate here @@ -148,8 +148,8 @@ def configureApiNodes(): if self.apiNodeCount > 0: configureApiNodes() - assert self.nodeosVers != "v1" and self.nodeosVers != "v0", f"nodeos version {Utils.getNodeosVersion().split('.')[0]} is unsupported by performance test" - if self.nodeosVers == "v2": + assert "v1" not in self.nodeosVers and "v0" not in self.nodeosVers, f"nodeos version {Utils.getNodeosVersion()} is unsupported by performance test" + if "v2" in self.nodeosVers: self.writeTrx = lambda trxDataFile, blockNum, trx: [trxDataFile.write(f"{trx['trx']['id']},{blockNum},{trx['cpu_usage_us']},{trx['net_usage_words']}\n")] self.createBlockData = lambda block, blockTransactionTotal, blockNetTotal, blockCpuTotal: log_reader.blockData(blockId=block["payload"]["id"], blockNum=block['payload']['block_num'], transactions=blockTransactionTotal, net=blockNetTotal, cpu=blockCpuTotal, producer=block["payload"]["producer"], status=block["payload"]["confirmed"], _timestamp=block["payload"]["timestamp"]) self.updateTrxDict = lambda blockNum, transaction, trxDict: trxDict.update(dict([(transaction['trx']['id'], log_reader.trxData(blockNum, transaction['cpu_usage_us'], transaction['net_usage_words']))])) @@ -286,7 +286,7 @@ def fileOpenMode(self, filePath) -> str: def isOnBlockTransaction(self, transaction): # v2 history does not include onblock - if self.clusterConfig.nodeosVers == "v2": + if "v2" in self.clusterConfig.nodeosVers: return False else: if transaction['actions'][0]['account'] != 'eosio' or transaction['actions'][0]['action'] != 'onblock': @@ -642,8 +642,8 @@ def setupClusterConfig(args) -> ClusterConfig: httpPluginArgs = HttpPluginArgs(httpMaxBytesInFlightMb=args.http_max_bytes_in_flight_mb, httpMaxInFlightRequests=args.http_max_in_flight_requests, httpMaxResponseTimeMs=args.http_max_response_time_ms, httpThreads=args.http_threads) netPluginArgs = NetPluginArgs(netThreads=args.net_threads, maxClients=0) - nodeosVers=Utils.getNodeosVersion().split('.')[0] - resourceMonitorPluginArgs = ResourceMonitorPluginArgs(resourceMonitorNotShutdownOnThresholdExceeded=not nodeosVers == "v2") + nodeosVers=Utils.getNodeosVersion() + resourceMonitorPluginArgs = ResourceMonitorPluginArgs(resourceMonitorNotShutdownOnThresholdExceeded=not "v2" in nodeosVers) ENA = PerformanceTestBasic.ClusterConfig.ExtraNodeosArgs extraNodeosArgs = ENA(chainPluginArgs=chainPluginArgs, httpPluginArgs=httpPluginArgs, producerPluginArgs=producerPluginArgs, netPluginArgs=netPluginArgs, resourceMonitorPluginArgs=resourceMonitorPluginArgs) From 441f5d308c089690e3179d4f623ddf6db1f1c1a6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 10:50:40 -0500 Subject: [PATCH 15/37] Read only transaction feature support was added in 4.0, don't test in prior releases. --- .github/workflows/ph_backward_compatibility.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 347cceedd5..e8fe161207 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -145,7 +145,8 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_api --timeout 480 - - name: Run Read Only Trxs Performance Test + - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + name: Run Read Only Trxs Performance Test if: always() run: | cd build @@ -180,7 +181,8 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_basic_http --timeout 480 - - name: Run Read Only Trx Performance Basic Test + - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + name: Run Read Only Trx Performance Basic Test if: always() run: | cd build From e6ea54b81755195cbfaf7a949909782488d08572 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 10:51:21 -0500 Subject: [PATCH 16/37] Read only transaction feature support was added in 4.0, remove unsupported command line options in earlier versions. --- tests/performance_tests/performance_test_basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/performance_tests/performance_test_basic.py b/tests/performance_tests/performance_test_basic.py index 30c7f330d4..bdd2163b86 100755 --- a/tests/performance_tests/performance_test_basic.py +++ b/tests/performance_tests/performance_test_basic.py @@ -139,7 +139,8 @@ def configureApiNodes(): apiNodeSpecificNodeosStr = "" apiNodeSpecificNodeosStr += "--plugin eosio::chain_api_plugin " apiNodeSpecificNodeosStr += "--plugin eosio::net_api_plugin " - apiNodeSpecificNodeosStr += f"--read-only-threads {self.apiNodesReadOnlyThreadCount} " + if "v4" in self.nodeosVers: + apiNodeSpecificNodeosStr += f"--read-only-threads {self.apiNodesReadOnlyThreadCount} " if apiNodeSpecificNodeosStr: self.specificExtraNodeosArgs.update({f"{nodeId}" : apiNodeSpecificNodeosStr for nodeId in self._apiNodeIds}) From 8cb771a710071fb0b7d4aa8e02e158fb02cb2fae Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 10:54:19 -0500 Subject: [PATCH 17/37] Fix multiple if statements in steps. --- .github/workflows/ph_backward_compatibility.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index e8fe161207..cb9a22baff 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -145,9 +145,8 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_api --timeout 480 - - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + - if: always() && ${{ matrix.release != '3.1' && matrix.release != '3.2' }} name: Run Read Only Trxs Performance Test - if: always() run: | cd build ctest --output-on-failure -R performance_test_read_only_trxs --timeout 480 @@ -181,9 +180,8 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_basic_http --timeout 480 - - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + - if: always() && ${{ matrix.release != '3.1' && matrix.release != '3.2' }} name: Run Read Only Trx Performance Basic Test - if: always() run: | cd build ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 From ff1a83761f119f9f50122cb30ef60830294e0633 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 11:33:20 -0500 Subject: [PATCH 18/37] Shouldn't run read only tests in if < v4.0 --- .github/workflows/ph_backward_compatibility.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index cb9a22baff..40651bdc98 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -145,7 +145,7 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_api --timeout 480 - - if: always() && ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} name: Run Read Only Trxs Performance Test run: | cd build @@ -180,7 +180,7 @@ jobs: run: | cd build ctest --output-on-failure -R performance_test_basic_http --timeout 480 - - if: always() && ${{ matrix.release != '3.1' && matrix.release != '3.2' }} + - if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }} name: Run Read Only Trx Performance Basic Test run: | cd build From 800a37e6055f73001c4ad496dd64b32126ec941f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 13:03:49 -0500 Subject: [PATCH 19/37] Collapse perf tests back into regular expressions to simplifly and reduce future maintenance --- .../workflows/ph_backward_compatibility.yaml | 55 ++----------------- 1 file changed, 5 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 40651bdc98..1ae2adfcf5 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -130,58 +130,13 @@ jobs: rm build/bin/cleos mv tmp/usr/bin/nodeos build/bin mv tmp/usr/bin/cleos build/bin - - name: Run BP Op Mode Performance Test - if: always() + - if: ${{ matrix.release == '3.1' || matrix.release == '3.2' }} + name: Run Performance Tests (=v4.0) run: | cd build - ctest --output-on-failure -R performance_test_basic_read_only_trxs --timeout 480 + ctest --output-on-failure -R performance_test --timeout 480 From c63042bb93291c44fda1933a6fe7c8321e91631f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 13:10:32 -0500 Subject: [PATCH 20/37] Try reducing steps using regex for deb name matching across versions. --- .github/workflows/ph_backward_compatibility.yaml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 1ae2adfcf5..4a3ceaa3d5 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -104,22 +104,12 @@ jobs: # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs chown -R $(id -u):$(id -g) $PWD zstdcat build.tar.zst | tar x - - if: ${{ matrix.release != '3.1' }} - name: Download Prev Leap Version (v3.2.x and after) + - name: Download Prev Leap Version uses: AntelopeIO/asset-artifact-download-action@v2 with: owner: AntelopeIO repo: leap - file: 'leap_.*-${{matrix.platform}}.04_amd64.deb' # Ex. leap_3.2.3-ubuntu20.04_amd64.deb leap_4.0.3-ubuntu20.04_amd64.deb - target: '${{matrix.release}}' - token: ${{github.token}} - - if: ${{ matrix.release == '3.1' }} - name: Download Prev Leap Version (v3.1.x) - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: 'leap-.*-${{matrix.platform}}.04-x86_64.deb' # Ex. leap-3.1.4-ubuntu20.04-x86_64.deb + file: '(leap).*${{matrix.platform}}.04.*(x86_64|amd64).deb' target: '${{matrix.release}}' token: ${{github.token}} - name: Extract and Place Rev Leap Version artifacts From cb447c579dfaba041661200e936849c1ebb0ad89 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 13:11:32 -0500 Subject: [PATCH 21/37] Try removing workaround, as it shouldn't be necessary here. --- .github/workflows/ph_backward_compatibility.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 4a3ceaa3d5..cb5ac49338 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -69,8 +69,6 @@ jobs: - name: Build id: build run: | - # https://github.com/actions/runner/issues/2033 - chown -R $(id -u):$(id -g) $PWD cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja cmake --build build tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst @@ -101,8 +99,6 @@ jobs: name: ${{matrix.platform}}-build - name: Extract Build Directory run: | - # https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs - chown -R $(id -u):$(id -g) $PWD zstdcat build.tar.zst | tar x - name: Download Prev Leap Version uses: AntelopeIO/asset-artifact-download-action@v2 From b7dea9bfde2dc023b71229ebd877d7ff61cd7acf Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 13:29:38 -0500 Subject: [PATCH 22/37] Install the leap deb package to bring along dependencies and then use those nodeos and cleos versions. --- .github/workflows/ph_backward_compatibility.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index cb5ac49338..779a6cc559 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -110,12 +110,12 @@ jobs: token: ${{github.token}} - name: Extract and Place Rev Leap Version artifacts run: | - mkdir tmp - dpkg -x leap*.deb tmp + apt-get update + apt install -y leap*.deb rm build/bin/nodeos rm build/bin/cleos - mv tmp/usr/bin/nodeos build/bin - mv tmp/usr/bin/cleos build/bin + cp /usr/bin/nodeos build/bin + cp /usr/bin/cleos build/bin - if: ${{ matrix.release == '3.1' || matrix.release == '3.2' }} name: Run Performance Tests ( Date: Mon, 10 Jul 2023 13:43:08 -0500 Subject: [PATCH 23/37] Working to fix install of leap deb pkg. --- .github/workflows/ph_backward_compatibility.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 779a6cc559..18d68ff908 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -110,8 +110,9 @@ jobs: token: ${{github.token}} - name: Extract and Place Rev Leap Version artifacts run: | + ls -l apt-get update - apt install -y leap*.deb + apt-get install -y ./leap*.deb rm build/bin/nodeos rm build/bin/cleos cp /usr/bin/nodeos build/bin From b2b22ab99063086e801c4d42ed3a4cb9618b37e2 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 14:09:19 -0500 Subject: [PATCH 24/37] Cleanup. --- .github/workflows/ph_backward_compatibility.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 18d68ff908..b43d71c9fe 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -108,9 +108,8 @@ jobs: file: '(leap).*${{matrix.platform}}.04.*(x86_64|amd64).deb' target: '${{matrix.release}}' token: ${{github.token}} - - name: Extract and Place Rev Leap Version artifacts + - name: Install leap & replace binaries for PH use run: | - ls -l apt-get update apt-get install -y ./leap*.deb rm build/bin/nodeos From 265ee66b539e54f0564f2d1b3129f7a7cedc95fe Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 14:15:54 -0500 Subject: [PATCH 25/37] Sanity check nodeos version. --- .github/workflows/ph_backward_compatibility.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index b43d71c9fe..2b017a5e7b 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -116,6 +116,7 @@ jobs: rm build/bin/cleos cp /usr/bin/nodeos build/bin cp /usr/bin/cleos build/bin + ./build/bin/nodeos --version - if: ${{ matrix.release == '3.1' || matrix.release == '3.2' }} name: Run Performance Tests ( Date: Tue, 11 Jul 2023 14:31:15 -0500 Subject: [PATCH 26/37] Try breaking out build steps into reusable workflow. Make use of reusable workflow in ph_backward_compatibility workflow. --- .github/workflows/build_base.yaml | 86 +++++++++++++++++++ .../workflows/ph_backward_compatibility.yaml | 73 ++-------------- 2 files changed, 91 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/build_base.yaml diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml new file mode 100644 index 0000000000..8fa4de8bde --- /dev/null +++ b/.github/workflows/build_base.yaml @@ -0,0 +1,86 @@ +name: "Build leap" + +on: + workflow_dispatch: + workflow_call: + outputs: + p: + description: "Discovered Build Platforms" + value: ${{ jobs.d.outputs.p }} + +permissions: + packages: read + contents: read + +defaults: + run: + shell: bash + +jobs: + d: + name: Discover Platforms + runs-on: ubuntu-latest + outputs: + missing-platforms: ${{steps.discover.outputs.missing-platforms}} + p: ${{steps.discover.outputs.platforms}} + steps: + - name: Discover Platforms + id: discover + uses: AntelopeIO/discover-platforms-action@v1 + with: + platform-file: .cicd/platforms.json + password: ${{secrets.GITHUB_TOKEN}} + package-name: builders + + build-platforms: + name: Build Platforms + needs: d + if: needs.d.outputs.missing-platforms != '[]' + strategy: + fail-fast: false + matrix: + platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} + runs-on: ["self-hosted", "enf-x86-beefy"] + permissions: + packages: write + contents: read + steps: + - name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{github.repository_owner}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} + + Build: + needs: [d, build-platforms] + if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + strategy: + fail-fast: false + matrix: + platform: [ubuntu20, ubuntu22] + runs-on: ["self-hosted", "enf-x86-beefy"] + container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Build + id: build + run: | + # https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja + cmake --build build + tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst + - name: Upload builddir + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: ${{matrix.platform}}-build + path: build.tar.zst \ No newline at end of file diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 2b017a5e7b..dd239e4b77 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -12,76 +12,13 @@ defaults: shell: bash jobs: - d: - name: Discover Platforms - runs-on: ubuntu-latest - outputs: - missing-platforms: ${{steps.discover.outputs.missing-platforms}} - p: ${{steps.discover.outputs.platforms}} - steps: - - name: Discover Platforms - id: discover - uses: AntelopeIO/discover-platforms-action@v1 - with: - platform-file: .cicd/platforms.json - password: ${{secrets.GITHUB_TOKEN}} - package-name: builders - - build-platforms: - name: Build Platforms - needs: d - if: needs.d.outputs.missing-platforms != '[]' - strategy: - fail-fast: false - matrix: - platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} - runs-on: ["self-hosted", "enf-x86-beefy"] - permissions: - packages: write - contents: read - steps: - - name: Login to Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.repository_owner}} - password: ${{secrets.GITHUB_TOKEN}} - - name: Build and push - uses: docker/build-push-action@v3 - with: - push: true - tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} - - Build: - needs: [d, build-platforms] - if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - runs-on: ["self-hosted", "enf-x86-beefy"] - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Build - id: build - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja - cmake --build build - tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst - - name: Upload builddir - uses: AntelopeIO/upload-artifact-large-chunks-action@v1 - with: - name: ${{matrix.platform}}-build - path: build.tar.zst + build-base: + uses: AntelopeIO/leap/.github/workflows/build_base.yaml@main tests: name: Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' strategy: fail-fast: false matrix: @@ -89,7 +26,7 @@ jobs: release: [3.1, 3.2, 4.0] runs-on: ["self-hosted", "enf-x86-lowtier"] container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 From 8044aa16ba9fc422a6f5924ae7abb9d68977fb1b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 11 Jul 2023 14:33:07 -0500 Subject: [PATCH 27/37] Needs to use this branch's reusable workflow for now, not main --- .github/workflows/ph_backward_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index dd239e4b77..c3c89b0e7c 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -13,7 +13,7 @@ defaults: jobs: build-base: - uses: AntelopeIO/leap/.github/workflows/build_base.yaml@main + uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions tests: name: Tests From de40f8a4bb456016cae2232728711b446d77206b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 11 Jul 2023 14:38:46 -0500 Subject: [PATCH 28/37] Inherit secrets. --- .github/workflows/ph_backward_compatibility.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index c3c89b0e7c..b93675457a 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -14,6 +14,7 @@ defaults: jobs: build-base: uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions + secrets: inherit tests: name: Tests From 7df3af711e1e611b23384b6c245d40175a48b8a9 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 11 Jul 2023 14:40:35 -0500 Subject: [PATCH 29/37] Provide packages write permission for Build Platforms job. --- .github/workflows/build_base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 8fa4de8bde..f5d7773fae 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -9,7 +9,7 @@ on: value: ${{ jobs.d.outputs.p }} permissions: - packages: read + packages: write contents: read defaults: From cf7ae29952238cd8c00f317e0ba18906efdb9fcc Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 11 Jul 2023 14:47:58 -0500 Subject: [PATCH 30/37] Give packages write permissions. --- .github/workflows/ph_backward_compatibility.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index b93675457a..c78d3365fe 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: permissions: - packages: read + packages: write contents: read defaults: @@ -14,7 +14,6 @@ defaults: jobs: build-base: uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions - secrets: inherit tests: name: Tests From 7be77cd7450e0c4b64cf506500c2840c40426381 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 11 Jul 2023 15:24:50 -0500 Subject: [PATCH 31/37] Convert build.yaml to use reusable build-base workflow. --- .github/workflows/build.yaml | 99 +++++++----------------------------- 1 file changed, 18 insertions(+), 81 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 09e926b18d..b520ddb073 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,7 +23,7 @@ on: type: string permissions: - packages: read + packages: write contents: read defaults: @@ -31,20 +31,9 @@ defaults: shell: bash jobs: - d: - name: Discover Platforms - runs-on: ubuntu-latest - outputs: - missing-platforms: ${{steps.discover.outputs.missing-platforms}} - p: ${{steps.discover.outputs.platforms}} - steps: - - name: Discover Platforms - id: discover - uses: AntelopeIO/discover-platforms-action@v1 - with: - platform-file: .cicd/platforms.json - password: ${{secrets.GITHUB_TOKEN}} - package-name: builders + build-base: + uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions + v: name: Discover Versions runs-on: ubuntu-latest @@ -72,69 +61,17 @@ jobs: if [[ "${{inputs.override-eos-system-contracts}}" != "" ]]; then echo eos-system-contracts-ref=${{inputs.override-eos-system-contracts}} >> $GITHUB_OUTPUT fi - build-platforms: - name: Build Platforms - needs: d - if: needs.d.outputs.missing-platforms != '[]' - strategy: - fail-fast: false - matrix: - platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} - runs-on: ["self-hosted", "enf-x86-beefy"] - permissions: - packages: write - contents: read - steps: - - name: Login to Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.repository_owner}} - password: ${{secrets.GITHUB_TOKEN}} - - name: Build and push - uses: docker/build-push-action@v3 - with: - push: true - tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} - - Build: - needs: [d, build-platforms] - if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') - strategy: - fail-fast: false - matrix: - platform: [ubuntu20, ubuntu22] - runs-on: ["self-hosted", "enf-x86-beefy"] - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Build - id: build - run: | - # https://github.com/actions/runner/issues/2033 - chown -R $(id -u):$(id -g) $PWD - cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja - cmake --build build - tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst - - name: Upload builddir - uses: AntelopeIO/upload-artifact-large-chunks-action@v1 - with: - name: ${{matrix.platform}}-build - path: build.tar.zst dev-package: name: Build leap-dev package - needs: [d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' strategy: fail-fast: false matrix: platform: [ubuntu20, ubuntu22] runs-on: ubuntu-latest - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} steps: - uses: actions/checkout@v3 with: @@ -163,15 +100,15 @@ jobs: tests: name: Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' strategy: fail-fast: false matrix: platform: [ubuntu20, ubuntu22] runs-on: ["self-hosted", "enf-x86-hightier"] container: - image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 @@ -189,8 +126,8 @@ jobs: np-tests: name: NP Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' strategy: fail-fast: false matrix: @@ -205,7 +142,7 @@ jobs: - name: Run tests in parallel containers uses: ./.github/actions/parallel-ctest-containers with: - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]' log-tarball-prefix: ${{matrix.platform}} tests-label: nonparallelizable_tests @@ -219,8 +156,8 @@ jobs: lr-tests: name: LR Tests - needs: [d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' strategy: fail-fast: false matrix: @@ -235,7 +172,7 @@ jobs: - name: Run tests in parallel containers uses: ./.github/actions/parallel-ctest-containers with: - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]' log-tarball-prefix: ${{matrix.platform}} tests-label: long_running_tests @@ -249,7 +186,7 @@ jobs: libtester-tests: name: libtester tests - needs: [d, v, Build, dev-package] + needs: [build-base, v, dev-package] if: always() && needs.v.result == 'success' && needs.dev-package.result == 'success' strategy: fail-fast: false @@ -257,7 +194,7 @@ jobs: platform: [ubuntu20, ubuntu22] test: [build-tree, make-dev-install, deb-install] runs-on: ["self-hosted", "enf-x86-midtier"] - container: ${{ matrix.test != 'deb-install' && fromJSON(needs.d.outputs.p)[matrix.platform].image || matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }} + container: ${{ matrix.test != 'deb-install' && fromJSON(needs.build-base.outputs.p)[matrix.platform].image || matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }} steps: # LEAP - if: ${{ matrix.test != 'deb-install' }} From 477f62c85779a081bb4b5180ac55085f8cd5dfd4 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 12 Jul 2023 15:15:14 -0500 Subject: [PATCH 32/37] Remove hardcoded org and repo and ref. --- .github/workflows/build.yaml | 2 +- .github/workflows/ph_backward_compatibility.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b520ddb073..593dce030a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ defaults: jobs: build-base: - uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions + uses: .github/workflows/build_base.yaml v: name: Discover Versions diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index c78d3365fe..d9045f4013 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -13,7 +13,7 @@ defaults: jobs: build-base: - uses: AntelopeIO/leap/.github/workflows/build_base.yaml@GH-1156-ph-cicd-nodeos-versions + uses: .github/workflows/build_base.yaml tests: name: Tests From 495d6eab30fcde1b995c492a4d6bf4e698c299b1 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 12 Jul 2023 15:20:36 -0500 Subject: [PATCH 33/37] Try to rework permissions to leave top level read, but pass write to build-base. --- .github/workflows/build.yaml | 5 ++++- .github/workflows/ph_backward_compatibility.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 593dce030a..0ad6bbd794 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,7 +23,7 @@ on: type: string permissions: - packages: write + packages: read contents: read defaults: @@ -33,6 +33,9 @@ defaults: jobs: build-base: uses: .github/workflows/build_base.yaml + permissions: + packages: write + contents: read v: name: Discover Versions diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index d9045f4013..b3bf8efc5b 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: permissions: - packages: write + packages: read contents: read defaults: @@ -14,6 +14,9 @@ defaults: jobs: build-base: uses: .github/workflows/build_base.yaml + permissions: + packages: read + contents: read tests: name: Tests From 0da3e7b36eb4a4fa52dcc2db099711a026c91e37 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 12 Jul 2023 15:24:44 -0500 Subject: [PATCH 34/37] Fix path to workflow. --- .github/workflows/build.yaml | 2 +- .github/workflows/ph_backward_compatibility.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0ad6bbd794..48bc4ff07a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ defaults: jobs: build-base: - uses: .github/workflows/build_base.yaml + uses: ./.github/workflows/build_base.yaml permissions: packages: write contents: read diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index b3bf8efc5b..4fea2faa00 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -13,7 +13,7 @@ defaults: jobs: build-base: - uses: .github/workflows/build_base.yaml + uses: ./.github/workflows/build_base.yaml permissions: packages: read contents: read From 4e19e3636237596aab66de2f6fceabcf89e0cc3f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 12 Jul 2023 16:04:23 -0500 Subject: [PATCH 35/37] Somehow put the wrong permission here. --- .github/workflows/ph_backward_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 4fea2faa00..7a0892eb5f 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -15,7 +15,7 @@ jobs: build-base: uses: ./.github/workflows/build_base.yaml permissions: - packages: read + packages: write contents: read tests: From 56c00275dbf59cc3451eea916a6a7b99a24bef26 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 13 Jul 2023 16:14:55 -0500 Subject: [PATCH 36/37] fix permission. --- .github/workflows/build_base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index f5d7773fae..8fa4de8bde 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -9,7 +9,7 @@ on: value: ${{ jobs.d.outputs.p }} permissions: - packages: write + packages: read contents: read defaults: From bfa1685672c865cc28152865a26113cfb19df98b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 14 Jul 2023 13:46:12 -0500 Subject: [PATCH 37/37] Add names to jobs for better UI experience. --- .github/workflows/build.yaml | 1 + .github/workflows/build_base.yaml | 1 + .github/workflows/ph_backward_compatibility.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 48bc4ff07a..286d3de481 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,6 +32,7 @@ defaults: jobs: build-base: + name: Run Build Workflow uses: ./.github/workflows/build_base.yaml permissions: packages: write diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 8fa4de8bde..5d47ba37cc 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -59,6 +59,7 @@ jobs: file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} Build: + name: Build leap needs: [d, build-platforms] if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index 7a0892eb5f..e166c92eff 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -13,6 +13,7 @@ defaults: jobs: build-base: + name: Run Build Workflow uses: ./.github/workflows/build_base.yaml permissions: packages: write