From f7f246ac46e0047477dd22450b4ab0ac098f05d2 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 10:57:56 -0500 Subject: [PATCH 01/59] Initial attempt of configurable ph run in cicd. --- .../workflows/performance_harness_run.yaml | 142 +++++++++++++++++- 1 file changed, 138 insertions(+), 4 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 90602d8345..d538a2ecb0 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -2,6 +2,19 @@ name: "Performance Harness Run" on: workflow_dispatch: + inputs: + platform-choice: + description: 'Override build platform' + type: choice + options: + - ubuntu20 + - ubuntu22 + override-test-params: + description: 'Override perf harness params' + type: string + override-leap-ref: + description: 'Override leap ref' + type: string permissions: packages: read @@ -12,10 +25,131 @@ defaults: shell: bash jobs: - tmp: - name: Stub + + v: + name: Discover Inputs + runs-on: ubuntu-latest + outputs: + test-params: ${{steps.overrides.outputs.test-params}} + leap-ref: ${{steps.overrides.outputs.leap-ref}} + steps: + - name: Setup Input Params + id: overrides + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + echo test-params=testBpOpMode >> $GITHUB_OUTPUT + echo leap-ref='' >> $GITHUB_OUTPUT + + if [[ "${{inputs.override-test-params}}" != "" ]]; then + echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT + fi + if [[ "${{inputs.override-leap-ref}}" != "" ]]; then + echo leap-ref=${{inputs.override-leap-ref}} >> $GITHUB_OUTPUT + fi + + 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: [v, d, build-platforms] + if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + runs-on: ["self-hosted", "enf-x86-beefy"] + container: ${{fromJSON(needs.d.outputs.p)[${{github.event.inputs.platform-choice}}].image}} + steps: + - uses: actions/checkout@v3 + with: + ref: '${{needs.v.outputs.leap-ref}}' + 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: ${{github.event.inputs.platform-choice}}-build + path: build.tar.zst + + tests: + name: Tests + needs: [d, Build] + if: always() && needs.Build.result == 'success' + strategy: + fail-fast: false runs-on: ubuntu-latest + container: + image: ${{fromJSON(needs.d.outputs.p)[${{github.event.inputs.platform-choice}}].image}} + options: --security-opt seccomp=unconfined steps: - - name: Workflow Stub + - name: Download builddir + uses: actions/checkout@v3 + uses: actions/download-artifact@v3 + with: + name: ${{github.event.inputs.platform-choice}}-build + - name: Run Performance Test + if: always() run: | - echo "Workflow Stub" + # 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 + cd build + ./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} + - name: Prepare results + id: prep-results + run: | + # https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst + - name: Upload results + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: performance-test-results + path: performance_test_logs.tar.zst + - name: Upload report + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: performance-test-report + path: $(find . -name report.json) From 78564fa3b3e21f63a6e3d850974c9d77d7633d7c Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 11:13:36 -0500 Subject: [PATCH 02/59] Fix yaml file syntax. Minor cleanup. --- .github/workflows/performance_harness_run.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index d538a2ecb0..6a29ce9cad 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -95,7 +95,9 @@ jobs: runs-on: ["self-hosted", "enf-x86-beefy"] container: ${{fromJSON(needs.d.outputs.p)[${{github.event.inputs.platform-choice}}].image}} steps: - - uses: actions/checkout@v3 + - name: Checkout leap ref + id: checkout + uses: actions/checkout@v3 with: ref: '${{needs.v.outputs.leap-ref}}' submodules: recursive @@ -130,7 +132,6 @@ jobs: with: name: ${{github.event.inputs.platform-choice}}-build - name: Run Performance Test - if: always() 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 @@ -138,11 +139,10 @@ jobs: cd build ./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} - name: Prepare results - id: prep-results - run: | - # https://github.com/actions/runner/issues/2033 - chown -R $(id -u):$(id -g) $PWD - tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst + run: | + # https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst - name: Upload results uses: AntelopeIO/upload-artifact-large-chunks-action@v1 with: From 7518f7803eb89dbe216141a096467e0f5aeaefe6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 11:18:26 -0500 Subject: [PATCH 03/59] Fix yaml file syntax. --- .github/workflows/performance_harness_run.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 6a29ce9cad..2542ca5406 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -93,7 +93,7 @@ jobs: needs: [v, d, build-platforms] if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') runs-on: ["self-hosted", "enf-x86-beefy"] - container: ${{fromJSON(needs.d.outputs.p)[${{github.event.inputs.platform-choice}}].image}} + container: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} steps: - name: Checkout leap ref id: checkout @@ -123,7 +123,7 @@ jobs: fail-fast: false runs-on: ubuntu-latest container: - image: ${{fromJSON(needs.d.outputs.p)[${{github.event.inputs.platform-choice}}].image}} + image: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} options: --security-opt seccomp=unconfined steps: - name: Download builddir From 1f2ca0196617fa27a83538ed5e3a896ea45fdf88 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 11:19:59 -0500 Subject: [PATCH 04/59] Fix yaml file syntax 'uses' already defined. --- .github/workflows/performance_harness_run.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 2542ca5406..699a127988 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -127,7 +127,6 @@ jobs: options: --security-opt seccomp=unconfined steps: - name: Download builddir - uses: actions/checkout@v3 uses: actions/download-artifact@v3 with: name: ${{github.event.inputs.platform-choice}}-build From 975426a3771523929d6f7109d11f1e492d98a19b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 11:31:52 -0500 Subject: [PATCH 05/59] Add dependency needs. --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 699a127988..1fd13fab30 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -117,7 +117,7 @@ jobs: tests: name: Tests - needs: [d, Build] + needs: [v, d, Build] if: always() && needs.Build.result == 'success' strategy: fail-fast: false From 947770edc6eb1a27d40ae5e09248f3ee3d667c30 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 11:49:40 -0500 Subject: [PATCH 06/59] Pre-calculate the report location for use in upload step. --- .github/workflows/performance_harness_run.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 1fd13fab30..07e06f500c 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -138,10 +138,12 @@ jobs: cd build ./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} - name: Prepare results + id: prep-results run: | # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst + echo "TEST_REPORT=$(find . -name report.json)" >> "$GITHUB_OUTPUT" - name: Upload results uses: AntelopeIO/upload-artifact-large-chunks-action@v1 with: @@ -151,4 +153,4 @@ jobs: uses: AntelopeIO/upload-artifact-large-chunks-action@v1 with: name: performance-test-report - path: $(find . -name report.json) + path: ${{ steps.prep-results.outputs.TEST_REPORT }} From 8f01104cae3b5a5888b5be541ba606595845b0d4 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 12:00:40 -0500 Subject: [PATCH 07/59] Use normal upload-artifact action. --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 07e06f500c..c42bb10ca0 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -150,7 +150,7 @@ jobs: name: performance-test-results path: performance_test_logs.tar.zst - name: Upload report - uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + uses: actions/upload-artifact@v3 with: name: performance-test-report path: ${{ steps.prep-results.outputs.TEST_REPORT }} From e3ae3a3ded0e97ff0577880c736f69b70c6f815c Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 7 Jul 2023 12:25:20 -0500 Subject: [PATCH 08/59] Try finding and uploading report via wildcard. --- .github/workflows/performance_harness_run.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index c42bb10ca0..b789212169 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -143,7 +143,6 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst - echo "TEST_REPORT=$(find . -name report.json)" >> "$GITHUB_OUTPUT" - name: Upload results uses: AntelopeIO/upload-artifact-large-chunks-action@v1 with: @@ -153,4 +152,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: performance-test-report - path: ${{ steps.prep-results.outputs.TEST_REPORT }} + path: ./build/performance_test/**/report.json From 6b4f7452093ca4e55d95c6ea067725751804fcc2 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 10 Jul 2023 14:24:30 -0500 Subject: [PATCH 09/59] Some cleanup. --- .github/workflows/performance_harness_run.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index b789212169..48b5229f90 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -104,8 +104,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 @@ -119,12 +117,9 @@ jobs: name: Tests needs: [v, d, Build] if: always() && needs.Build.result == 'success' - strategy: - fail-fast: false runs-on: ubuntu-latest container: image: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} - options: --security-opt seccomp=unconfined steps: - name: Download builddir uses: actions/download-artifact@v3 @@ -132,16 +127,12 @@ jobs: name: ${{github.event.inputs.platform-choice}}-build - name: Run 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 cd build ./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} - name: Prepare results id: prep-results run: | - # https://github.com/actions/runner/issues/2033 - chown -R $(id -u):$(id -g) $PWD tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst - name: Upload results uses: AntelopeIO/upload-artifact-large-chunks-action@v1 From feffc035417989af2b6e6c73be3c6f907fe3b93d Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 08:44:57 -0500 Subject: [PATCH 10/59] Try to automatically parse platform matrix in script. --- .github/workflows/build_base.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 5d47ba37cc..824627ed07 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -58,6 +58,22 @@ jobs: tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} + platform-matrx: + name: Platform Matrix + needs: [d] + if: always() && needs.d.result == 'success' + runs-on: ubuntu-latest + outputs: + platform-matrix: ${{steps.platform-matrix.outputs.result}} + steps: + - uses: actions/github-script@v6 + name: Parse Platform Matrix + id: platform-matrix + with: + script: return Object.keys(fromJSON(needs.d.outputs.p)) + - name: Get result + run: echo "${{steps.platform-matrix.outputs.result}}" + Build: name: Build leap needs: [d, build-platforms] From be9452bf5e6a677d7d4b80aa7d136ad0c0a2e53d Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 08:46:43 -0500 Subject: [PATCH 11/59] Attempt to use the json object directly. --- .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 824627ed07..1e1c16d032 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -70,7 +70,7 @@ jobs: name: Parse Platform Matrix id: platform-matrix with: - script: return Object.keys(fromJSON(needs.d.outputs.p)) + script: return Object.keys(needs.d.outputs.p) - name: Get result run: echo "${{steps.platform-matrix.outputs.result}}" From 754638dc2de111b2ce95c38cecc91b67bd952af6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 08:48:45 -0500 Subject: [PATCH 12/59] Attempt to fix github variable reference in script. --- .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 1e1c16d032..24e13ff777 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -70,7 +70,7 @@ jobs: name: Parse Platform Matrix id: platform-matrix with: - script: return Object.keys(needs.d.outputs.p) + script: return Object.keys(${{needs.d.outputs.p}}) - name: Get result run: echo "${{steps.platform-matrix.outputs.result}}" From cb73a84f65d1f5a086e6a94a794d4b5a0f10282f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 08:58:38 -0500 Subject: [PATCH 13/59] Attempt to use constructed platform matrix in build job. --- .github/workflows/build_base.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 24e13ff777..be37980f81 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -58,7 +58,7 @@ jobs: tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} - platform-matrx: + pm: name: Platform Matrix needs: [d] if: always() && needs.d.result == 'success' @@ -76,12 +76,12 @@ jobs: Build: name: Build leap - needs: [d, build-platforms] - if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + needs: [d, build-platforms, pm] + if: always() && needs.pm.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: fail-fast: false matrix: - platform: [ubuntu20, ubuntu22] + platform: ${{needs.pm.outputs.platform-matrix}} runs-on: ["self-hosted", "enf-x86-beefy"] container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} steps: From b0075c092571d8a517580cad8dbbd1817ed34d8e Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:04:20 -0500 Subject: [PATCH 14/59] Put matrix-out into github output for use later. --- .github/workflows/build_base.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index be37980f81..4d3860b0b8 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -64,15 +64,18 @@ jobs: if: always() && needs.d.result == 'success' runs-on: ubuntu-latest outputs: - platform-matrix: ${{steps.platform-matrix.outputs.result}} + platform-matrix: ${{steps.pm-results.outputs.matrix-out}} steps: - uses: actions/github-script@v6 name: Parse Platform Matrix - id: platform-matrix + id: parse-pm with: script: return Object.keys(${{needs.d.outputs.p}}) - name: Get result - run: echo "${{steps.platform-matrix.outputs.result}}" + id: pm-results + run: | + echo "${{steps.parse-pm.outputs.result}}" + echo matrix-out=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT Build: name: Build leap From a414b8cee73a9fc16cc03f517f0359291879be1b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:07:34 -0500 Subject: [PATCH 15/59] Try quotes. --- .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 4d3860b0b8..93d9fc3a48 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -75,7 +75,7 @@ jobs: id: pm-results run: | echo "${{steps.parse-pm.outputs.result}}" - echo matrix-out=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT + echo matrix-out="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT Build: name: Build leap From 3f13595ec5903e718366e2c2cb401c152b7ac84c Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:10:38 -0500 Subject: [PATCH 16/59] Try using fromJSON parsing. --- .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 93d9fc3a48..0468d4df43 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ${{needs.pm.outputs.platform-matrix}} + platform: ${{fromJSON(needs.pm.outputs.platform-matrix)}} runs-on: ["self-hosted", "enf-x86-beefy"] container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} steps: From a83266b2e52842dfc809199669d60a8890a189d7 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:17:51 -0500 Subject: [PATCH 17/59] Debugging output. --- .github/workflows/build_base.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 0468d4df43..ddaaacbeaa 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -64,7 +64,7 @@ jobs: if: always() && needs.d.result == 'success' runs-on: ubuntu-latest outputs: - platform-matrix: ${{steps.pm-results.outputs.matrix-out}} + platform-matrix: ${{steps.parse-pm.outputs.result}} steps: - uses: actions/github-script@v6 name: Parse Platform Matrix @@ -75,12 +75,16 @@ jobs: id: pm-results run: | echo "${{steps.parse-pm.outputs.result}}" - echo matrix-out="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT + echo "${{fromJSON(steps.parse-pm.outputs.result)}}" Build: name: Build leap needs: [d, build-platforms, pm] - if: always() && needs.pm.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + if: | + always() && \ + needs.pm.result == 'success' && \ + needs.d.result == 'success' && \ + (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: fail-fast: false matrix: From 158ad55a3a6100c9512c240d3fea23ab61640196 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:19:45 -0500 Subject: [PATCH 18/59] Don't needs backslashes to break lines up. --- .github/workflows/build_base.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index ddaaacbeaa..0a9646df1e 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -81,9 +81,9 @@ jobs: name: Build leap needs: [d, build-platforms, pm] if: | - always() && \ - needs.pm.result == 'success' && \ - needs.d.result == 'success' && \ + always() && + needs.pm.result == 'success' && + needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: fail-fast: false From ba738b80800e0f36abd44188aa9814acb4c308ca Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:53:46 -0500 Subject: [PATCH 19/59] Add input to override build platform matrix. --- .github/workflows/build_base.yaml | 16 ++- .../workflows/performance_harness_run.yaml | 129 ++++++++++-------- 2 files changed, 81 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 0a9646df1e..cdb91a32d3 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -3,6 +3,11 @@ name: "Build leap" on: workflow_dispatch: workflow_call: + inputs: + override-build-matrix: + description: 'Override build matrix' + type: string + required: false outputs: p: description: "Discovered Build Platforms" @@ -64,18 +69,21 @@ jobs: if: always() && needs.d.result == 'success' runs-on: ubuntu-latest outputs: - platform-matrix: ${{steps.parse-pm.outputs.result}} + platform-matrix: ${{steps.pm-results.outputs.platform-matrix}} steps: - uses: actions/github-script@v6 name: Parse Platform Matrix id: parse-pm with: script: return Object.keys(${{needs.d.outputs.p}}) - - name: Get result + - name: Check | Override result id: pm-results run: | - echo "${{steps.parse-pm.outputs.result}}" - echo "${{fromJSON(steps.parse-pm.outputs.result)}}" + echo platform-matrix=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT + + if [[ "${{inputs.override-build-matrix}}" != "" ]]; then + echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT + fi Build: name: Build leap diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 48b5229f90..c9f1f2d5a2 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -48,70 +48,79 @@ jobs: echo leap-ref=${{inputs.override-leap-ref}} >> $GITHUB_OUTPUT fi - 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"] + build-base: + name: Run Build Workflow + uses: ./.github/workflows/build_base.yaml + with: + override-build-matrix: [${{github.event.inputs.platform-choice}}] 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: [v, d, build-platforms] - if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') - runs-on: ["self-hosted", "enf-x86-beefy"] - container: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} - steps: - - name: Checkout leap ref - id: checkout - uses: actions/checkout@v3 - with: - ref: '${{needs.v.outputs.leap-ref}}' - 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: ${{github.event.inputs.platform-choice}}-build - path: build.tar.zst + # 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: [v, d, build-platforms] + # if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') + # runs-on: ["self-hosted", "enf-x86-beefy"] + # container: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} + # steps: + # - name: Checkout leap ref + # id: checkout + # uses: actions/checkout@v3 + # with: + # ref: '${{needs.v.outputs.leap-ref}}' + # 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: ${{github.event.inputs.platform-choice}}-build + # path: build.tar.zst tests: name: Tests From 282cfe0b58e8cf3b2e9f3de372b28d344f5fc527 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:56:58 -0500 Subject: [PATCH 20/59] Use fromJSON. --- .github/workflows/build_base.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index cdb91a32d3..8bf2a0ed96 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -79,10 +79,10 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT + echo platform-matrix=${{fromJSON(steps.parse-pm.outputs.result)}} >> $GITHUB_OUTPUT if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT + echo platform-matrix=${{fromJSON(inputs.override-build-matrix)}} >> $GITHUB_OUTPUT fi Build: From 1de56988f50e4b22e2d73fe0fc9798d6a7cddbf5 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 09:59:49 -0500 Subject: [PATCH 21/59] Try again. --- .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 8bf2a0ed96..cfc8bb1ce1 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -79,7 +79,7 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix=${{fromJSON(steps.parse-pm.outputs.result)}} >> $GITHUB_OUTPUT + echo platform-matrix="${{fromJSON(steps.parse-pm.outputs.result)}}" >> $GITHUB_OUTPUT if [[ "${{inputs.override-build-matrix}}" != "" ]]; then echo platform-matrix=${{fromJSON(inputs.override-build-matrix)}} >> $GITHUB_OUTPUT From c7695c03fc34322b4938c0147abaea1e273f6b43 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:01:58 -0500 Subject: [PATCH 22/59] Try again. --- .github/workflows/build_base.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index cfc8bb1ce1..e80c42b858 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -79,10 +79,10 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix="${{fromJSON(steps.parse-pm.outputs.result)}}" >> $GITHUB_OUTPUT + echo platform-matrix="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo platform-matrix=${{fromJSON(inputs.override-build-matrix)}} >> $GITHUB_OUTPUT + echo platform-matrix="${{inputs.override-build-matrix}}"" >> $GITHUB_OUTPUT fi Build: From 03855117cf9d27dc269121eebfe4651a9b017e54 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:03:15 -0500 Subject: [PATCH 23/59] Remove extra training quote. --- .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 e80c42b858..7bfa1b2641 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -82,7 +82,7 @@ jobs: echo platform-matrix="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo platform-matrix="${{inputs.override-build-matrix}}"" >> $GITHUB_OUTPUT + echo platform-matrix="${{inputs.override-build-matrix}}" >> $GITHUB_OUTPUT fi Build: From f3097a2ead8081612861fab49dd97a341d9130f7 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:06:03 -0500 Subject: [PATCH 24/59] Try fromJSON in output. --- .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 7bfa1b2641..bfdacd95da 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -69,7 +69,7 @@ jobs: if: always() && needs.d.result == 'success' runs-on: ubuntu-latest outputs: - platform-matrix: ${{steps.pm-results.outputs.platform-matrix}} + platform-matrix: ${{fromJSON(steps.pm-results.outputs.platform-matrix)}} steps: - uses: actions/github-script@v6 name: Parse Platform Matrix From 4e2ebb0f2170b6ef8fa615e12fa84c6a0ce2ecc6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:08:51 -0500 Subject: [PATCH 25/59] Working to get array --- .github/workflows/build_base.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index bfdacd95da..b21c643ffc 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -6,6 +6,7 @@ on: inputs: override-build-matrix: description: 'Override build matrix' + default: '[]' type: string required: false outputs: @@ -79,10 +80,10 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT + echo platform-matrix=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT - if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo platform-matrix="${{inputs.override-build-matrix}}" >> $GITHUB_OUTPUT + if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then + echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT fi Build: From f0277442d295437f13940d7a13a98d73ec03b70b Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:14:04 -0500 Subject: [PATCH 26/59] echo out GITHUB_OUTPUT --- .github/workflows/build_base.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index b21c643ffc..486cb607ac 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -86,6 +86,8 @@ jobs: echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT fi + echo "$GITHUB_OUTPUT" + Build: name: Build leap needs: [d, build-platforms, pm] From 2d7e8c4a65e632f5aaf8efb50fefab2322e66586 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:21:01 -0500 Subject: [PATCH 27/59] Try this again. --- .github/workflows/build_base.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 486cb607ac..1e0e210c7a 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -70,7 +70,7 @@ jobs: if: always() && needs.d.result == 'success' runs-on: ubuntu-latest outputs: - platform-matrix: ${{fromJSON(steps.pm-results.outputs.platform-matrix)}} + platform-matrix: ${{steps.pm-results.outputs.platform-matrix}} steps: - uses: actions/github-script@v6 name: Parse Platform Matrix @@ -86,14 +86,11 @@ jobs: echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT fi - echo "$GITHUB_OUTPUT" - Build: name: Build leap needs: [d, build-platforms, pm] if: | always() && - needs.pm.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: From 96b3d71ecdfc6de2ce27ef66e8d527bae48c1bcc Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:22:18 -0500 Subject: [PATCH 28/59] Try this again. --- .github/workflows/build_base.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 1e0e210c7a..2719f47f9c 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -83,6 +83,7 @@ jobs: echo platform-matrix=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then + echo "Executing override." echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT fi From fd54f6c5d47bf5d50e801d2079e80bc0efe3318e Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:26:46 -0500 Subject: [PATCH 29/59] Try this again. --- .github/workflows/build_base.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 2719f47f9c..14c6f6d7f0 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,11 +80,11 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix=${{steps.parse-pm.outputs.result}} >> $GITHUB_OUTPUT + echo platform-matrix="${{fromJSON(steps.parse-pm.outputs.result)}}" >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." - echo platform-matrix=${{inputs.override-build-matrix}} >> $GITHUB_OUTPUT + echo platform-matrix="${{fromJSON(inputs.override-build-matrix)}}" >> $GITHUB_OUTPUT fi Build: From d0c1e2c339e5bef06d9e31ee9aeea6f1a1985bec Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:43:48 -0500 Subject: [PATCH 30/59] Try to debug output --- .github/workflows/build_base.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 14c6f6d7f0..2bf1530912 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,12 +80,22 @@ jobs: - name: Check | Override result id: pm-results run: | + echo "${{fromJSON(steps.parse-pm.outputs.result)}}" echo platform-matrix="${{fromJSON(steps.parse-pm.outputs.result)}}" >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." echo platform-matrix="${{fromJSON(inputs.override-build-matrix)}}" >> $GITHUB_OUTPUT fi + - name: Check matrix + id: check-matrix + run: | + if [[ ${{ steps.pm-results.outputs.platform-matrix }} == *"[]"* ]]; then + echo "empty_matrix::true" + else + echo "empty_matrix::false" + fi + echo ${{ steps.pm-results.outputs.platform-matrix }} Build: name: Build leap From f995e47fb4e4345ca94b80bcd3c12cbf7b81c83f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:46:54 -0500 Subject: [PATCH 31/59] Try to debug output --- .github/workflows/build_base.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 2bf1530912..9258065743 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,12 +80,11 @@ jobs: - name: Check | Override result id: pm-results run: | - echo "${{fromJSON(steps.parse-pm.outputs.result)}}" - echo platform-matrix="${{fromJSON(steps.parse-pm.outputs.result)}}" >> $GITHUB_OUTPUT + echo platform-matrix="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." - echo platform-matrix="${{fromJSON(inputs.override-build-matrix)}}" >> $GITHUB_OUTPUT + echo platform-matrix="${{inputs.override-build-matrix}}" >> $GITHUB_OUTPUT fi - name: Check matrix id: check-matrix From 41a1824741af9ae36788bc23925c181bf514b1c3 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:48:15 -0500 Subject: [PATCH 32/59] Fix syntax. --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index c9f1f2d5a2..02f73e03a2 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -52,7 +52,7 @@ jobs: name: Run Build Workflow uses: ./.github/workflows/build_base.yaml with: - override-build-matrix: [${{github.event.inputs.platform-choice}}] + override-build-matrix: "[${{github.event.inputs.platform-choice}}]" permissions: packages: write contents: read From a1bcf4bc54ceaa0bffe32090852989c4c39b858c Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:55:30 -0500 Subject: [PATCH 33/59] Try escaping quotes. --- .github/workflows/build_base.yaml | 4 ++-- .github/workflows/performance_harness_run.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 9258065743..38034f4177 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,11 +80,11 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix="${{steps.parse-pm.outputs.result}}" >> $GITHUB_OUTPUT + echo platform-matrix=\"${{steps.parse-pm.outputs.result}}\" >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." - echo platform-matrix="${{inputs.override-build-matrix}}" >> $GITHUB_OUTPUT + echo platform-matrix=\"${{inputs.override-build-matrix}}\" >> $GITHUB_OUTPUT fi - name: Check matrix id: check-matrix diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 02f73e03a2..1ac9ff492a 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -52,7 +52,7 @@ jobs: name: Run Build Workflow uses: ./.github/workflows/build_base.yaml with: - override-build-matrix: "[${{github.event.inputs.platform-choice}}]" + override-build-matrix: \"[${{github.event.inputs.platform-choice}}]\" permissions: packages: write contents: read From f4b7998a2ff8dafee65933bcd6554bd7b0f13bdc Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:58:13 -0500 Subject: [PATCH 34/59] Fix syntax. --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 1ac9ff492a..90fee45cd9 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -52,7 +52,7 @@ jobs: name: Run Build Workflow uses: ./.github/workflows/build_base.yaml with: - override-build-matrix: \"[${{github.event.inputs.platform-choice}}]\" + override-build-matrix: ${{github.event.inputs.platform-choice}} permissions: packages: write contents: read From 56e7a9dc71e857ced1d69a7eb296b27ee7ec2b19 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 10:59:26 -0500 Subject: [PATCH 35/59] Debugging results. --- .github/workflows/build_base.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 38034f4177..939d824f24 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -95,6 +95,7 @@ jobs: echo "empty_matrix::false" fi echo ${{ steps.pm-results.outputs.platform-matrix }} + echo ${{ steps.parse-pm.outputs.result }} Build: name: Build leap From 7a12930a1d5eb943cfb6da5e669bed678a58f231 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:09:39 -0500 Subject: [PATCH 36/59] Surround with single quotes to force not escaping internal quotes. --- .github/workflows/build_base.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 939d824f24..87c699d1a9 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,11 +80,11 @@ jobs: - name: Check | Override result id: pm-results run: | - echo platform-matrix=\"${{steps.parse-pm.outputs.result}}\" >> $GITHUB_OUTPUT + echo 'platform-matrix=\"${{steps.parse-pm.outputs.result}}\"' >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." - echo platform-matrix=\"${{inputs.override-build-matrix}}\" >> $GITHUB_OUTPUT + echo 'platform-matrix=\"${{inputs.override-build-matrix}}\"' >> $GITHUB_OUTPUT fi - name: Check matrix id: check-matrix @@ -94,8 +94,8 @@ jobs: else echo "empty_matrix::false" fi - echo ${{ steps.pm-results.outputs.platform-matrix }} - echo ${{ steps.parse-pm.outputs.result }} + echo '${{ steps.pm-results.outputs.platform-matrix }}' + echo '${{ steps.parse-pm.outputs.result }}' Build: name: Build leap From b1862f244c9b6cbd3504a717ef16d3a8ef3a0a0a Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:11:28 -0500 Subject: [PATCH 37/59] Remove surrounding escaped quotes. --- .github/workflows/build_base.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 87c699d1a9..639eabaa3e 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -80,11 +80,11 @@ jobs: - name: Check | Override result id: pm-results run: | - echo 'platform-matrix=\"${{steps.parse-pm.outputs.result}}\"' >> $GITHUB_OUTPUT + echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then echo "Executing override." - echo 'platform-matrix=\"${{inputs.override-build-matrix}}\"' >> $GITHUB_OUTPUT + echo 'platform-matrix=${{inputs.override-build-matrix}}' >> $GITHUB_OUTPUT fi - name: Check matrix id: check-matrix From d1e099ca0dbc1812cdc35bdde9341acc2c3d4cd6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:15:48 -0500 Subject: [PATCH 38/59] Update workflow for using reusable workflow. --- .github/workflows/performance_harness_run.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 90fee45cd9..ad3816cf0b 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -124,11 +124,11 @@ jobs: tests: name: Tests - needs: [v, d, Build] - if: always() && needs.Build.result == 'success' + needs: [build-base] + if: always() && needs.build-base.result == 'success' runs-on: ubuntu-latest container: - image: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} + image: ${{fromJSON(needs.build-base.outputs.p)[github.event.inputs.platform-choice].image}} steps: - name: Download builddir uses: actions/download-artifact@v3 From 1e562e87277f54631ac96840e06809575c92281d Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:20:31 -0500 Subject: [PATCH 39/59] Make override option into an array for matrix. --- .github/workflows/build_base.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 639eabaa3e..b835b3d954 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -6,7 +6,6 @@ on: inputs: override-build-matrix: description: 'Override build matrix' - default: '[]' type: string required: false outputs: @@ -82,18 +81,13 @@ jobs: run: | echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT - if [[ ${{inputs.override-build-matrix}} != '[]' ]]; then + if [[ ${{inputs.override-build-matrix}} != "" ]]; then echo "Executing override." - echo 'platform-matrix=${{inputs.override-build-matrix}}' >> $GITHUB_OUTPUT + echo 'platform-matrix=["${{inputs.override-build-matrix}}"]' >> $GITHUB_OUTPUT fi - name: Check matrix id: check-matrix run: | - if [[ ${{ steps.pm-results.outputs.platform-matrix }} == *"[]"* ]]; then - echo "empty_matrix::true" - else - echo "empty_matrix::false" - fi echo '${{ steps.pm-results.outputs.platform-matrix }}' echo '${{ steps.parse-pm.outputs.result }}' From 90f0852e733a86f2afa6d59307b6b7e334610a26 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:30:52 -0500 Subject: [PATCH 40/59] Replace accidentally removed dependency on job v. --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index ad3816cf0b..7c47927f2a 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -124,7 +124,7 @@ jobs: tests: name: Tests - needs: [build-base] + needs: [v, build-base] if: always() && needs.build-base.result == 'success' runs-on: ubuntu-latest container: From a155889c2ef4e1a1a4661845963c6e41805dfad6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:32:42 -0500 Subject: [PATCH 41/59] Add quotes around input param for if check. --- .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 b835b3d954..92645de679 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -81,7 +81,7 @@ jobs: run: | echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT - if [[ ${{inputs.override-build-matrix}} != "" ]]; then + if [[ "${{inputs.override-build-matrix}}" != "" ]]; then echo "Executing override." echo 'platform-matrix=["${{inputs.override-build-matrix}}"]' >> $GITHUB_OUTPUT fi From 6c86da5e3e02bc4f6f6ddb9e11513622b46fca4a Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 11:40:15 -0500 Subject: [PATCH 42/59] Cleanup previous jobs now replaced by build-base reusable workflow. --- .../workflows/performance_harness_run.yaml | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 7c47927f2a..42501670d0 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -57,71 +57,6 @@ jobs: packages: write contents: read - # 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: [v, d, build-platforms] - # if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') - # runs-on: ["self-hosted", "enf-x86-beefy"] - # container: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} - # steps: - # - name: Checkout leap ref - # id: checkout - # uses: actions/checkout@v3 - # with: - # ref: '${{needs.v.outputs.leap-ref}}' - # 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: ${{github.event.inputs.platform-choice}}-build - # path: build.tar.zst - tests: name: Tests needs: [v, build-base] From 1b9f64af5e3fb8bf5de649b766242473204eae96 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 12:24:44 -0500 Subject: [PATCH 43/59] Try to make build step optional if build for current commit has already completed. --- .../workflows/performance_harness_run.yaml | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 42501670d0..47f2a20aa5 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -48,8 +48,34 @@ jobs: echo leap-ref=${{inputs.override-leap-ref}} >> $GITHUB_OUTPUT fi + reuse-build: + name: Reuse leap build + needs: [v] + if: | + always() && + needs.v.result == 'success' + runs-on: ubuntu-latest + steps: + - name: Download builddir + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: ${{github.event.inputs.platform-choice}}-build + target: ${{github.sha}} + artifact-name: ${{github.event.inputs.platform-choice}}-build + token: ${{github.token}} + + - name: Upload builddir + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: ${{github.event.inputs.platform-choice}}-build + path: build.tar.zst + build-base: name: Run Build Workflow + needs: [reuse-build] + if: always() && needs.reuse-build.result != 'success' uses: ./.github/workflows/build_base.yaml with: override-build-matrix: ${{github.event.inputs.platform-choice}} @@ -59,8 +85,8 @@ jobs: tests: name: Tests - needs: [v, build-base] - if: always() && needs.build-base.result == 'success' + needs: [v, reuse-build, build-base] + if: always() && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success') runs-on: ubuntu-latest container: image: ${{fromJSON(needs.build-base.outputs.p)[github.event.inputs.platform-choice].image}} From 6c2758fe94d836625165e380a7682d4d8378c204 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 12:53:30 -0500 Subject: [PATCH 44/59] Pipe leap-ref selection/override through workflows. --- .github/workflows/build_base.yaml | 5 +++++ .github/workflows/performance_harness_run.yaml | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 92645de679..9b29ade640 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -8,6 +8,10 @@ on: description: 'Override build matrix' type: string required: false + leap-ref: + description: 'Override leap ref' + default: ${{github.sha}} + type: string outputs: p: description: "Discovered Build Platforms" @@ -107,6 +111,7 @@ jobs: steps: - uses: actions/checkout@v3 with: + ref: '${{inputs.leap-ref}}' submodules: recursive - name: Build id: build diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 47f2a20aa5..e072b606a7 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -39,7 +39,7 @@ jobs: GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | echo test-params=testBpOpMode >> $GITHUB_OUTPUT - echo leap-ref='' >> $GITHUB_OUTPUT + echo leap-ref='${{github.sha}}' >> $GITHUB_OUTPUT if [[ "${{inputs.override-test-params}}" != "" ]]; then echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT @@ -62,7 +62,7 @@ jobs: owner: AntelopeIO repo: leap file: ${{github.event.inputs.platform-choice}}-build - target: ${{github.sha}} + target: '${{needs.v.outputs.leap-ref}}' artifact-name: ${{github.event.inputs.platform-choice}}-build token: ${{github.token}} @@ -79,6 +79,7 @@ jobs: uses: ./.github/workflows/build_base.yaml with: override-build-matrix: ${{github.event.inputs.platform-choice}} + leap-ref: ${{needs.v.outputs.leap-ref}} permissions: packages: write contents: read From 47ddeb6b0e7bc1f4ac8ff488e4e22143a2c16908 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 14:16:50 -0500 Subject: [PATCH 45/59] Fix spacing. --- .../workflows/performance_harness_run.yaml | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index e072b606a7..bed9ce030d 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -56,21 +56,20 @@ jobs: needs.v.result == 'success' runs-on: ubuntu-latest steps: - - name: Download builddir - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: ${{github.event.inputs.platform-choice}}-build - target: '${{needs.v.outputs.leap-ref}}' - artifact-name: ${{github.event.inputs.platform-choice}}-build - token: ${{github.token}} - - - name: Upload builddir - uses: AntelopeIO/upload-artifact-large-chunks-action@v1 - with: - name: ${{github.event.inputs.platform-choice}}-build - path: build.tar.zst + - name: Download builddir + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: ${{github.event.inputs.platform-choice}}-build + target: '${{needs.v.outputs.leap-ref}}' + artifact-name: ${{github.event.inputs.platform-choice}}-build + token: ${{github.token}} + - name: Upload builddir + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: ${{github.event.inputs.platform-choice}}-build + path: build.tar.zst build-base: name: Run Build Workflow From 4f3c5ef089a67f4e7a3362cbc2046228064797fe Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 15:16:26 -0500 Subject: [PATCH 46/59] Revert "Fix spacing." This reverts commit 47ddeb6b0e7bc1f4ac8ff488e4e22143a2c16908. --- .../workflows/performance_harness_run.yaml | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index bed9ce030d..e072b606a7 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -56,20 +56,21 @@ jobs: needs.v.result == 'success' runs-on: ubuntu-latest steps: - - name: Download builddir - uses: AntelopeIO/asset-artifact-download-action@v2 - with: - owner: AntelopeIO - repo: leap - file: ${{github.event.inputs.platform-choice}}-build - target: '${{needs.v.outputs.leap-ref}}' - artifact-name: ${{github.event.inputs.platform-choice}}-build - token: ${{github.token}} - - name: Upload builddir - uses: AntelopeIO/upload-artifact-large-chunks-action@v1 - with: - name: ${{github.event.inputs.platform-choice}}-build - path: build.tar.zst + - name: Download builddir + uses: AntelopeIO/asset-artifact-download-action@v2 + with: + owner: AntelopeIO + repo: leap + file: ${{github.event.inputs.platform-choice}}-build + target: '${{needs.v.outputs.leap-ref}}' + artifact-name: ${{github.event.inputs.platform-choice}}-build + token: ${{github.token}} + + - name: Upload builddir + uses: AntelopeIO/upload-artifact-large-chunks-action@v1 + with: + name: ${{github.event.inputs.platform-choice}}-build + path: build.tar.zst build-base: name: Run Build Workflow From f49f8c99f23b58d0623e5ed23823d12a31d4b9c8 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 15:16:44 -0500 Subject: [PATCH 47/59] Revert "Pipe leap-ref selection/override through workflows." This reverts commit 6c2758fe94d836625165e380a7682d4d8378c204. --- .github/workflows/build_base.yaml | 5 ----- .github/workflows/performance_harness_run.yaml | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 9b29ade640..92645de679 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -8,10 +8,6 @@ on: description: 'Override build matrix' type: string required: false - leap-ref: - description: 'Override leap ref' - default: ${{github.sha}} - type: string outputs: p: description: "Discovered Build Platforms" @@ -111,7 +107,6 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: '${{inputs.leap-ref}}' submodules: recursive - name: Build id: build diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index e072b606a7..47f2a20aa5 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -39,7 +39,7 @@ jobs: GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | echo test-params=testBpOpMode >> $GITHUB_OUTPUT - echo leap-ref='${{github.sha}}' >> $GITHUB_OUTPUT + echo leap-ref='' >> $GITHUB_OUTPUT if [[ "${{inputs.override-test-params}}" != "" ]]; then echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT @@ -62,7 +62,7 @@ jobs: owner: AntelopeIO repo: leap file: ${{github.event.inputs.platform-choice}}-build - target: '${{needs.v.outputs.leap-ref}}' + target: ${{github.sha}} artifact-name: ${{github.event.inputs.platform-choice}}-build token: ${{github.token}} @@ -79,7 +79,6 @@ jobs: uses: ./.github/workflows/build_base.yaml with: override-build-matrix: ${{github.event.inputs.platform-choice}} - leap-ref: ${{needs.v.outputs.leap-ref}} permissions: packages: write contents: read From c597816e6dca64dda2ae5e3a0e18cc60e373449f Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 18 Jul 2023 15:18:56 -0500 Subject: [PATCH 48/59] Remove attempt to override leap ref for this workflow. --- .github/workflows/performance_harness_run.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 47f2a20aa5..9227ff6681 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -12,9 +12,6 @@ on: override-test-params: description: 'Override perf harness params' type: string - override-leap-ref: - description: 'Override leap ref' - type: string permissions: packages: read @@ -31,7 +28,6 @@ jobs: runs-on: ubuntu-latest outputs: test-params: ${{steps.overrides.outputs.test-params}} - leap-ref: ${{steps.overrides.outputs.leap-ref}} steps: - name: Setup Input Params id: overrides @@ -39,14 +35,10 @@ jobs: GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | echo test-params=testBpOpMode >> $GITHUB_OUTPUT - echo leap-ref='' >> $GITHUB_OUTPUT if [[ "${{inputs.override-test-params}}" != "" ]]; then echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT fi - if [[ "${{inputs.override-leap-ref}}" != "" ]]; then - echo leap-ref=${{inputs.override-leap-ref}} >> $GITHUB_OUTPUT - fi reuse-build: name: Reuse leap build From e5139d6d7ad50f4b714659d3a63e6d46af2584d6 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 26 Jul 2023 14:19:28 -0500 Subject: [PATCH 49/59] Try using asset-artifact-download-action@v3 to pull down past build if available. --- .github/workflows/performance_harness_run.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 9227ff6681..2d92fbeaa5 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -49,7 +49,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Download builddir - uses: AntelopeIO/asset-artifact-download-action@v2 + id: downloadBuild + uses: AntelopeIO/asset-artifact-download-action@v3 with: owner: AntelopeIO repo: leap @@ -59,6 +60,7 @@ jobs: token: ${{github.token}} - name: Upload builddir + if: steps.downloadBuild.outputs.downloaded-file != '' uses: AntelopeIO/upload-artifact-large-chunks-action@v1 with: name: ${{github.event.inputs.platform-choice}}-build From 1a968507d7f0b2a2ab14701e389ebd0c5f7debb9 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 26 Jul 2023 14:58:31 -0500 Subject: [PATCH 50/59] Fix file name in asset-artifact-download-action --- .github/workflows/performance_harness_run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 2d92fbeaa5..313bc703e6 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -54,7 +54,7 @@ jobs: with: owner: AntelopeIO repo: leap - file: ${{github.event.inputs.platform-choice}}-build + file: build.tar.zst target: ${{github.sha}} artifact-name: ${{github.event.inputs.platform-choice}}-build token: ${{github.token}} From 775cce489cf1526e8a8a82cadbb07ab60d5bc161 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 27 Jul 2023 16:13:48 -0500 Subject: [PATCH 51/59] Split out platforms workflow into separate reusable workflow. Use platforms in conjunction with build-base such that platforms can be run separately from build-base. Together they accomplish the same as build-base used to, but now can separate concerns between discovering and building platform knowledge from doing the actual software build. Update previous usages of build-base to now use platforms and build-base together. --- .github/workflows/build.yaml | 43 ++++++--- .github/workflows/build_base.yaml | 90 ++---------------- .../workflows/performance_harness_run.yaml | 24 ++++- .../workflows/ph_backward_compatibility.yaml | 19 +++- .github/workflows/platforms.yaml | 95 +++++++++++++++++++ 5 files changed, 166 insertions(+), 105 deletions(-) create mode 100644 .github/workflows/platforms.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 286d3de481..35e42c98e6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,9 +31,22 @@ defaults: shell: bash jobs: + platforms: + name: Run Platforms Workflow + uses: ./.github/workflows/platforms.yaml + with: + override-build-matrix: ${{github.event.inputs.platform-choice}} + permissions: + packages: write + contents: read + build-base: name: Run Build Workflow uses: ./.github/workflows/build_base.yaml + needs: [platforms] + with: + p: ${{needs.platforms.outputs.p}} + platform-matrix: ${{needs.platforms.outputs.platform-matrix}} permissions: packages: write contents: read @@ -68,14 +81,14 @@ jobs: dev-package: name: Build leap-dev package - needs: [build-base] - if: always() && needs.build-base.result == 'success' + needs: [platforms, build-base] + if: always() && needs.platforms.result == 'success' && needs.build-base.result == 'success' strategy: fail-fast: false matrix: platform: [ubuntu20, ubuntu22] runs-on: ubuntu-latest - container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.platforms.outputs.p)[matrix.platform].image}} steps: - uses: actions/checkout@v3 with: @@ -104,15 +117,15 @@ jobs: tests: name: Tests - needs: [build-base] - if: always() && needs.build-base.result == 'success' + needs: [platforms, build-base] + if: always() && needs.platforms.result == 'success' && needs.build-base.result == 'success' strategy: fail-fast: false matrix: platform: [ubuntu20, ubuntu22] runs-on: ["self-hosted", "enf-x86-hightier"] container: - image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} + image: ${{fromJSON(needs.platforms.outputs.p)[matrix.platform].image}} options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 @@ -130,8 +143,8 @@ jobs: np-tests: name: NP Tests - needs: [build-base] - if: always() && needs.build-base.result == 'success' + needs: [platforms, build-base] + if: always() && needs.platforms.result == 'success' && needs.build-base.result == 'success' strategy: fail-fast: false matrix: @@ -146,7 +159,7 @@ jobs: - name: Run tests in parallel containers uses: ./.github/actions/parallel-ctest-containers with: - container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.platforms.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 @@ -160,8 +173,8 @@ jobs: lr-tests: name: LR Tests - needs: [build-base] - if: always() && needs.build-base.result == 'success' + needs: [platforms, build-base] + if: always() && needs.platforms.result == 'success' && needs.build-base.result == 'success' strategy: fail-fast: false matrix: @@ -176,7 +189,7 @@ jobs: - name: Run tests in parallel containers uses: ./.github/actions/parallel-ctest-containers with: - container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(needs.platforms.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 @@ -190,15 +203,15 @@ jobs: libtester-tests: name: libtester tests - needs: [build-base, v, dev-package] - if: always() && needs.v.result == 'success' && needs.dev-package.result == 'success' + needs: [platforms, build-base, v, dev-package] + if: always() && needs.platforms.result == 'success' && needs.v.result == 'success' && needs.dev-package.result == 'success' strategy: fail-fast: false matrix: 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.build-base.outputs.p)[matrix.platform].image || matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }} + container: ${{ matrix.test != 'deb-install' && fromJSON(needs.platforms.outputs.p)[matrix.platform].image || matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }} steps: # LEAP - if: ${{ matrix.test != 'deb-install' }} diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 92645de679..e8d92f354e 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -4,14 +4,14 @@ on: workflow_dispatch: workflow_call: inputs: - override-build-matrix: - description: 'Override build matrix' - type: string - required: false - outputs: p: description: "Discovered Build Platforms" - value: ${{ jobs.d.outputs.p }} + type: string + required: true + platform-matrix: + description: "Platform Matrix" + type: string + required: true permissions: packages: read @@ -22,88 +22,14 @@ 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}} - - pm: - name: Platform Matrix - needs: [d] - if: always() && needs.d.result == 'success' - runs-on: ubuntu-latest - outputs: - platform-matrix: ${{steps.pm-results.outputs.platform-matrix}} - steps: - - uses: actions/github-script@v6 - name: Parse Platform Matrix - id: parse-pm - with: - script: return Object.keys(${{needs.d.outputs.p}}) - - name: Check | Override result - id: pm-results - run: | - echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT - - if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo "Executing override." - echo 'platform-matrix=["${{inputs.override-build-matrix}}"]' >> $GITHUB_OUTPUT - fi - - name: Check matrix - id: check-matrix - run: | - echo '${{ steps.pm-results.outputs.platform-matrix }}' - echo '${{ steps.parse-pm.outputs.result }}' - Build: name: Build leap - needs: [d, build-platforms, pm] - if: | - always() && - needs.d.result == 'success' && - (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: fail-fast: false matrix: - platform: ${{fromJSON(needs.pm.outputs.platform-matrix)}} + platform: ${{fromJSON(inputs.platform-matrix)}} runs-on: ["self-hosted", "enf-x86-beefy"] - container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} + container: ${{fromJSON(inputs.p)[matrix.platform].image}} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 313bc703e6..100e5a1831 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -40,6 +40,15 @@ jobs: echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT fi + platforms: + name: Run Platforms Workflow + uses: ./.github/workflows/platforms.yaml + with: + override-build-matrix: ${{github.event.inputs.platform-choice}} + permissions: + packages: write + contents: read + reuse-build: name: Reuse leap build needs: [v] @@ -47,6 +56,8 @@ jobs: always() && needs.v.result == 'success' runs-on: ubuntu-latest + outputs: + build-artifact: '' steps: - name: Download builddir id: downloadBuild @@ -57,6 +68,7 @@ jobs: file: build.tar.zst target: ${{github.sha}} artifact-name: ${{github.event.inputs.platform-choice}}-build + fail-on-missing-target: false token: ${{github.token}} - name: Upload builddir @@ -66,10 +78,14 @@ jobs: name: ${{github.event.inputs.platform-choice}}-build path: build.tar.zst + - name: Set build-artifact output + if: steps.downloadBuild.outputs.downloaded-file != '' + run: echo "build-artifact=${{steps.downloadBuild.outputs.downloaded-file}}" >> "$GITHUB_OUTPUT" + build-base: name: Run Build Workflow needs: [reuse-build] - if: always() && needs.reuse-build.result != 'success' + if: always() && needs.reuse-build.outputs.build-artifact == '' uses: ./.github/workflows/build_base.yaml with: override-build-matrix: ${{github.event.inputs.platform-choice}} @@ -79,11 +95,11 @@ jobs: tests: name: Tests - needs: [v, reuse-build, build-base] - if: always() && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success') + needs: [v, platforms, reuse-build, build-base] + if: always() && needs.platforms.result == 'success' && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success') runs-on: ubuntu-latest container: - image: ${{fromJSON(needs.build-base.outputs.p)[github.event.inputs.platform-choice].image}} + image: ${{fromJSON(needs.platforms.outputs.p)[github.event.inputs.platform-choice].image}} steps: - name: Download builddir uses: actions/download-artifact@v3 diff --git a/.github/workflows/ph_backward_compatibility.yaml b/.github/workflows/ph_backward_compatibility.yaml index e166c92eff..3f5190009a 100644 --- a/.github/workflows/ph_backward_compatibility.yaml +++ b/.github/workflows/ph_backward_compatibility.yaml @@ -12,25 +12,36 @@ defaults: shell: bash jobs: + platforms: + name: Run Platforms Workflow + uses: ./.github/workflows/platforms.yaml + permissions: + packages: write + contents: read + build-base: name: Run Build Workflow uses: ./.github/workflows/build_base.yaml + needs: [platforms] + with: + p: ${{needs.platforms.outputs.p}} + platform-matrix: ${{needs.platforms.outputs.platform-matrix}} permissions: packages: write contents: read tests: name: Tests - needs: [build-base] - if: always() && needs.build-base.result == 'success' + needs: [platforms, build-base] + if: always() && needs.platforms.result == 'success' && needs.build-base.result == 'success' strategy: fail-fast: false matrix: - platform: [ubuntu20, ubuntu22] + platform: ${{fromJSON(needs.platforms.outputs.platform-matrix)}} release: [3.1, 3.2, 4.0] runs-on: ["self-hosted", "enf-x86-lowtier"] container: - image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}} + image: ${{fromJSON(needs.platforms.outputs.p)[matrix.platform].image}} options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/platforms.yaml b/.github/workflows/platforms.yaml new file mode 100644 index 0000000000..cd11ff37f4 --- /dev/null +++ b/.github/workflows/platforms.yaml @@ -0,0 +1,95 @@ +name: "Platforms" + +on: + workflow_dispatch: + workflow_call: + inputs: + override-build-matrix: + description: 'Override build matrix' + type: string + required: false + outputs: + p: + description: "Discovered Build Platforms" + value: ${{ jobs.d.outputs.p }} + platform-matrix: + description: "Overridden Platform Matrix" + value: ${{ jobs.pm.outputs.platform-matrix }} + +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}} + + pm: + name: Platform Matrix + needs: [d] + if: always() && needs.d.result == 'success' + runs-on: ubuntu-latest + outputs: + platform-matrix: ${{steps.pm-results.outputs.platform-matrix}} + steps: + - name: Parse Platform Matrix + id: parse-pm + uses: actions/github-script@v6 + with: + script: return Object.keys(${{needs.d.outputs.p}}) + - name: Check | Override result + id: pm-results + run: | + echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT + + if [[ "${{inputs.override-build-matrix}}" != "" ]]; then + echo "Executing override." + echo 'platform-matrix=["${{inputs.override-build-matrix}}"]' >> $GITHUB_OUTPUT + fi + - name: Check matrix + id: check-matrix + run: | + echo '${{ steps.pm-results.outputs.platform-matrix }}' + echo '${{ steps.parse-pm.outputs.result }}' From 13424e223daa8794bceb12185399d56ce63bcad4 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 27 Jul 2023 16:16:50 -0500 Subject: [PATCH 52/59] Remove workflow_dispatch from reusable workflows. These reusable workflows are intended to be called from other workflows, not necessarily dispatched individually in their own capacity. --- .github/workflows/build_base.yaml | 1 - .github/workflows/platforms.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index e8d92f354e..ae38bd3c03 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -1,7 +1,6 @@ name: "Build leap" on: - workflow_dispatch: workflow_call: inputs: p: diff --git a/.github/workflows/platforms.yaml b/.github/workflows/platforms.yaml index cd11ff37f4..26dc110f71 100644 --- a/.github/workflows/platforms.yaml +++ b/.github/workflows/platforms.yaml @@ -1,7 +1,6 @@ name: "Platforms" on: - workflow_dispatch: workflow_call: inputs: override-build-matrix: From 78b16c5a4da82826c2ef074b90c2071191cf3045 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 27 Jul 2023 16:19:55 -0500 Subject: [PATCH 53/59] Fix call to build-base with proper new inputs. --- .github/workflows/performance_harness_run.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 100e5a1831..0a0d49ff66 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -84,11 +84,12 @@ jobs: build-base: name: Run Build Workflow - needs: [reuse-build] - if: always() && needs.reuse-build.outputs.build-artifact == '' + needs: [platforms, reuse-build] + if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-artifact == '' uses: ./.github/workflows/build_base.yaml with: - override-build-matrix: ${{github.event.inputs.platform-choice}} + p: ${{needs.platforms.outputs.p}} + platform-matrix: ${{needs.platforms.outputs.platform-matrix}} permissions: packages: write contents: read From 4cb312e9026d0debd961458338843cae0c97fd2e Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 27 Jul 2023 21:48:55 -0500 Subject: [PATCH 54/59] Try using something other than empty string. --- .github/workflows/performance_harness_run.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 0a0d49ff66..3340d3888e 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -57,7 +57,7 @@ jobs: needs.v.result == 'success' runs-on: ubuntu-latest outputs: - build-artifact: '' + build-found: 'false' steps: - name: Download builddir id: downloadBuild @@ -78,14 +78,14 @@ jobs: name: ${{github.event.inputs.platform-choice}}-build path: build.tar.zst - - name: Set build-artifact output + - name: Set build-found output if: steps.downloadBuild.outputs.downloaded-file != '' - run: echo "build-artifact=${{steps.downloadBuild.outputs.downloaded-file}}" >> "$GITHUB_OUTPUT" + run: echo "build-found=true" >> "$GITHUB_OUTPUT" build-base: name: Run Build Workflow needs: [platforms, reuse-build] - if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-artifact == '' + if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-found == 'false' uses: ./.github/workflows/build_base.yaml with: p: ${{needs.platforms.outputs.p}} From 45b6c77ff171918de12d81640be9e3dac50a2d46 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 28 Jul 2023 07:55:56 -0500 Subject: [PATCH 55/59] Get the output directly from the step output. --- .github/workflows/performance_harness_run.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 3340d3888e..a032be1d07 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -57,7 +57,7 @@ jobs: needs.v.result == 'success' runs-on: ubuntu-latest outputs: - build-found: 'false' + build-artifact: ${{steps.downloadBuild.outputs.downloaded-file}} steps: - name: Download builddir id: downloadBuild @@ -78,14 +78,10 @@ jobs: name: ${{github.event.inputs.platform-choice}}-build path: build.tar.zst - - name: Set build-found output - if: steps.downloadBuild.outputs.downloaded-file != '' - run: echo "build-found=true" >> "$GITHUB_OUTPUT" - build-base: name: Run Build Workflow needs: [platforms, reuse-build] - if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-found == 'false' + if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-artifact == '' uses: ./.github/workflows/build_base.yaml with: p: ${{needs.platforms.outputs.p}} From bf95111e0117f1ee653960d7e53855c17d45c01e Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Mon, 31 Jul 2023 09:35:29 -0500 Subject: [PATCH 56/59] Remove override input as build will always use the full platforms.json input. --- .github/workflows/build.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b38c102e0c..28366fe239 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,8 +34,6 @@ jobs: platforms: name: Run Platforms Workflow uses: ./.github/workflows/platforms.yaml - with: - override-build-matrix: ${{github.event.inputs.platform-choice}} permissions: packages: write contents: read From 8c47cce233698dd4801896b7727eeb09188057a9 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 2 Aug 2023 10:20:15 -0500 Subject: [PATCH 57/59] Address peer review comments. --- .github/workflows/performance_harness_run.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index a032be1d07..22cb97bf5c 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: platform-choice: - description: 'Override build platform' + description: 'Select Platform' type: choice options: - ubuntu20 @@ -31,8 +31,6 @@ jobs: steps: - name: Setup Input Params id: overrides - env: - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | echo test-params=testBpOpMode >> $GITHUB_OUTPUT From cd872b3b27580866ee09c335b1475b018a31b725 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 2 Aug 2023 11:04:42 -0500 Subject: [PATCH 58/59] Remove debugging step and unnecessary echo. --- .github/workflows/platforms.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/platforms.yaml b/.github/workflows/platforms.yaml index 26dc110f71..e44ce0ffda 100644 --- a/.github/workflows/platforms.yaml +++ b/.github/workflows/platforms.yaml @@ -84,11 +84,5 @@ jobs: echo 'platform-matrix=${{steps.parse-pm.outputs.result}}' >> $GITHUB_OUTPUT if [[ "${{inputs.override-build-matrix}}" != "" ]]; then - echo "Executing override." echo 'platform-matrix=["${{inputs.override-build-matrix}}"]' >> $GITHUB_OUTPUT fi - - name: Check matrix - id: check-matrix - run: | - echo '${{ steps.pm-results.outputs.platform-matrix }}' - echo '${{ steps.parse-pm.outputs.result }}' From d50381b037be24b1d66b006ab4eb897729613884 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Wed, 2 Aug 2023 13:19:05 -0500 Subject: [PATCH 59/59] Remove unnecessary token input. --- .github/workflows/performance_harness_run.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/performance_harness_run.yaml b/.github/workflows/performance_harness_run.yaml index 22cb97bf5c..1584edf80c 100644 --- a/.github/workflows/performance_harness_run.yaml +++ b/.github/workflows/performance_harness_run.yaml @@ -67,8 +67,7 @@ jobs: target: ${{github.sha}} artifact-name: ${{github.event.inputs.platform-choice}}-build fail-on-missing-target: false - token: ${{github.token}} - + - name: Upload builddir if: steps.downloadBuild.outputs.downloaded-file != '' uses: AntelopeIO/upload-artifact-large-chunks-action@v1