From f40c84c8c9a800d8b0311fbc142db20e82eb1a08 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Thu, 31 Jul 2025 14:17:45 +0000 Subject: [PATCH 01/85] Parent workflow to trigger non trudag workflows --- .github/workflows/check_amalgamation.yml | 3 +- .github/workflows/cifuzz.yml | 2 +- .github/workflows/dependency-review.yml | 4 +- .github/workflows/labeler.yml | 5 +- .github/workflows/parent-workflow.yml | 40 ++++++++ .github/workflows/publish_documentation.yml | 100 +++++++++++++------ .github/workflows/test_trudag_extensions.yml | 47 +++++++++ 7 files changed, 164 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/parent-workflow.yml create mode 100644 .github/workflows/test_trudag_extensions.yml diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index eb0fb34597..92a7a16f22 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -1,7 +1,8 @@ name: "Check amalgamation" on: - pull_request: + workflow_dispatch: +# pull_request: permissions: contents: read diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 6cdd04a765..48ae0cd543 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,5 +1,5 @@ name: CIFuzz -on: [pull_request] +on: workflow_dispatch #[pull_request] permissions: contents: read diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 1b495dbce7..5bc8468513 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -7,7 +7,9 @@ # # Source repository: https://github.com/actions/dependency-review-action name: 'Dependency Review' -on: [pull_request] +on: + pull_request: + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7ab563222e..6852d7f8e6 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,8 +1,9 @@ name: "Pull Request Labeler" on: - pull_request_target: - types: [opened, synchronize] + workflow_dispatch: +# pull_request_target: + # types: [opened, synchronize] permissions: contents: read diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml new file mode 100644 index 0000000000..5dbf87c099 --- /dev/null +++ b/.github/workflows/parent-workflow.yml @@ -0,0 +1,40 @@ +name: Parent Workflow + +on: [pull_request] + +permissions: + contents: write + pages: write + pull-requests: write + id-token: write + +jobs: + trigger-workflows: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Trigger "Check Amalgamation" Workflow + run: gh workflow run "Check amalgamation" + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + + - name: Trigger "Dependency Review" Workflow + run: gh workflow run "Dependency Review" + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + + - name: Trigger "Test Trudag Extensions" Workflow + run: gh workflow run "Test Trudag extensions" + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + + #- name: Trigger "CIFuzz" Workflow + # run: gh workflow run "CIFuzz" + + - name: Trigger "Pull Request Labeler" Workflow + run: gh workflow run "Pull Request Labeler" + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} \ No newline at end of file diff --git a/.github/workflows/publish_documentation.yml b/.github/workflows/publish_documentation.yml index 80f76843d8..c6476f3d06 100644 --- a/.github/workflows/publish_documentation.yml +++ b/.github/workflows/publish_documentation.yml @@ -1,46 +1,82 @@ -name: Publish documentation +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* -# publish the documentation on every merge to develop branch -on: - push: - branches: - - develop - paths: - - docs/mkdocs/** - - docs/examples/** - workflow_dispatch: - -# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications -concurrency: - group: documentation - cancel-in-progress: false +name: Documentation permissions: - contents: read + contents: write + pages: write + pull-requests: write + id-token: write + +on: + workflow_run: + workflows: + - "Parent Workflow" + + types: + - completed jobs: - publish_documentation: + run-trudag: + runs-on: ubuntu-latest permissions: contents: write + pages: write + pull-requests: write + id-token: write - if: github.repository == 'nlohmann/json' - runs-on: ubuntu-22.04 steps: - - name: Harden Runner - uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 with: - egress-policy: audit + python-version: '3.11.2' - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install trudag and dependencies + run: | + sudo apt-get update + sudo apt-get install -y graphviz + pip install trustable --index-url https://gitlab.com/api/v4/projects/66600816/packages/pypi/simple + - - name: Install virtual environment - run: make install_venv -C docs/mkdocs + - name: Generate trudag report + run: | + TRUDAG_REPORT_FOLDER="docs/s-core/trustable/generated" + mkdir -p "$TRUDAG_REPORT_FOLDER" + trudag publish --validate --output-dir "$TRUDAG_REPORT_FOLDER" + trudag plot -o "$TRUDAG_REPORT_FOLDER/graph.svg" + python scripts/clean_trudag_output.py - - name: Build documentation - run: make build -C docs/mkdocs - - - name: Deploy documentation - uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 + - name: Upload trudag artifact + uses: actions/upload-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/mkdocs/site + name: trudag-report-${{ github.event.pull_request.head.sha || github.sha }} + path: docs/s-core/trustable/generated/ + if-no-files-found: error + + build-docs: + needs: run-trudag + # the eclipse-score/cicd-workflow docs.yml is adjusted to download the trudag report artifact before building the documentation + uses: ./.github/workflows/docs.yml + permissions: + contents: write + pages: write + pull-requests: write + id-token: write + + with: + # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix")Add commentMore actions + bazel-target: "//docs:incremental -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" + retention-days: 3 \ No newline at end of file diff --git a/.github/workflows/test_trudag_extensions.yml b/.github/workflows/test_trudag_extensions.yml new file mode 100644 index 0000000000..0b41070f61 --- /dev/null +++ b/.github/workflows/test_trudag_extensions.yml @@ -0,0 +1,47 @@ +name: Test Trudag extensions + +on: + workflow_dispatch: + inputs: + PARENT_SHA: + description: "Parent Workflow SHA" + required: true + push: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11.2' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install trustable --index-url https://gitlab.com/api/v4/projects/66600816/packages/pypi/simple + + - name: Run tests + run: | + cd .dotstop_extensions + pytest -v + + - name: Checkout specific commit from Parent Workflow + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.PARENT_SHA }} + + - name: Create Completion Flag + run: echo "Trudag extensions workflow completed." > TRUDAG_EXTENSIONS_flag_${{ github.event.inputs.PARENT_SHA }}.txt + + - name: Upload completion artifact + uses: actions/upload-artifact@v4 + with: + name: workflow-TRUDAG-EXTENSIONS-completed_${{ github.event.inputs.PARENT_SHA }} + path: TRUDAG_EXTENSIONS_flag_${{ github.event.inputs.PARENT_SHA }}.txt \ No newline at end of file From 61d01f99d511175f66f6bae79f5d5643bdf273db Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Fri, 1 Aug 2025 09:14:35 +0000 Subject: [PATCH 02/85] Add completion artifacts from child workflows --- .github/workflows/check_amalgamation.yml | 9 +++++ .github/workflows/dependency-review.yml | 2 +- .github/workflows/labeler.yml | 9 +++++ .github/workflows/parent-workflow.yml | 49 ++++++++++++++++++++---- 4 files changed, 61 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index 92a7a16f22..3a9ebace5d 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -75,3 +75,12 @@ jobs: ${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=orig $(find docs/examples include tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort) echo Check find $MAIN_DIR -name '*.orig' -exec false {} \+ + + - name: Create Completion Flag + run: echo "Check amalgamation workflow completed." > AMALGAMATION_flag1.txt + + - name: Upload completion artifact + uses: actions/upload-artifact@v4 + with: + name: workflow-AMALGAMATION-completed1 + path: AMALGAMATION_flag1.txt \ No newline at end of file diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 5bc8468513..89ccfd31e6 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -9,7 +9,7 @@ name: 'Dependency Review' on: pull_request: - workflow_dispatch: + permissions: contents: read diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 6852d7f8e6..edf81aec9c 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -25,3 +25,12 @@ jobs: - uses: srvaroa/labeler@e216fb40e2e6d3b17d90fb1d950f98bee92f65ce # master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Create Completion Flag + run: echo "Labeler workflow completed." > LABELER_flag1.txt + + - name: Upload completion artifact + uses: actions/upload-artifact@v4 + with: + name: workflow-LABELER-completed1 + path: LABELER_flag1.txt diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 5dbf87c099..f2a554a16e 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -7,7 +7,7 @@ permissions: pages: write pull-requests: write id-token: write - +#test19 jobs: trigger-workflows: runs-on: ubuntu-latest @@ -21,11 +21,6 @@ jobs: env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - - name: Trigger "Dependency Review" Workflow - run: gh workflow run "Dependency Review" - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - - name: Trigger "Test Trudag Extensions" Workflow run: gh workflow run "Test Trudag extensions" env: @@ -37,4 +32,44 @@ jobs: - name: Trigger "Pull Request Labeler" Workflow run: gh workflow run "Pull Request Labeler" env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} \ No newline at end of file + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + + - name: Wait and Download Artifacts From Child Workflows + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + run: | + echo "Waiting for artifacts from child workflows..." + + REQUIRED_ARTIFACTS=( + workflow-AMALGAMATION-completed1 + workflow-TRUDAG-EXTENSIONS-completed1 + workflow-LABELER-completed1 + ) + + COMPLETED=false + MAX_RETRIES=60 # Retry up to 60 times (15 mins with 15s intervals) + RETRY_COUNT=0 + + while [ "$COMPLETED" = "false" ] && [ $RETRY_COUNT -lt $MAX_RETRIES ]; do + COMPLETED=true # Assume all artifacts exist initially + + for ARTIFACT in "${REQUIRED_ARTIFACTS[@]}"; do + echo "Attempting to download artifact: $ARTIFACT" + + # Download the artifact (fails silently if it doesn't exist yet) + gh run download --name "$ARTIFACT" || COMPLETED=false + done + + if [ "$COMPLETED" = "false" ]; then + echo "Not all artifacts are ready. Waiting 15 seconds..." + sleep 15 + RETRY_COUNT=$((RETRY_COUNT + 1)) + fi + done + + if [ $COMPLETED = "false" ]; then + echo "Timed out while waiting for artifacts." + exit 1 + fi + + echo "All required artifacts have been downloaded successfully!" \ No newline at end of file From 0eb5cbe44ceb31789b76ee378f78ad085b0ae9a3 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Fri, 1 Aug 2025 14:50:52 +0000 Subject: [PATCH 03/85] Pass parent SHA to child workflows --- .github/workflows/check_amalgamation.yml | 15 ++++++++++++--- .github/workflows/labeler.yml | 16 +++++++++++++--- .github/workflows/parent-workflow.yml | 20 +++++++++++++------- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index 3a9ebace5d..5aee541166 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -3,6 +3,10 @@ name: "Check amalgamation" on: workflow_dispatch: # pull_request: + inputs: + PARENT_SHA: + description: "Parent Workflow SHA" + required: true permissions: contents: read @@ -76,11 +80,16 @@ jobs: echo Check find $MAIN_DIR -name '*.orig' -exec false {} \+ + - name: Checkout specific commit from Parent Workflow + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.PARENT_SHA }} + - name: Create Completion Flag - run: echo "Check amalgamation workflow completed." > AMALGAMATION_flag1.txt + run: echo "Check amalgamation workflow completed." > AMALGAMATION_flag_${{ github.event.inputs.PARENT_SHA }}.txt - name: Upload completion artifact uses: actions/upload-artifact@v4 with: - name: workflow-AMALGAMATION-completed1 - path: AMALGAMATION_flag1.txt \ No newline at end of file + name: workflow-AMALGAMATION-completed_${{ github.event.inputs.PARENT_SHA }} + path: AMALGAMATION_flag_${{ github.event.inputs.PARENT_SHA }}.txt \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index edf81aec9c..09cd935c93 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -4,6 +4,10 @@ on: workflow_dispatch: # pull_request_target: # types: [opened, synchronize] + inputs: + PARENT_SHA: + description: "Parent Workflow SHA" + required: true permissions: contents: read @@ -26,11 +30,17 @@ jobs: env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - name: Checkout specific commit from Parent Workflow + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.PARENT_SHA }} + - name: Create Completion Flag - run: echo "Labeler workflow completed." > LABELER_flag1.txt + run: echo "Labeler workflow completed" > LABELER_flag_${{ github.event.inputs.PARENT_SHA }}.txt + - name: Upload completion artifact uses: actions/upload-artifact@v4 with: - name: workflow-LABELER-completed1 - path: LABELER_flag1.txt + name: workflow-LABELER-completed_${{ github.event.inputs.PARENT_SHA }} + path: LABELER_flag_${{ github.event.inputs.PARENT_SHA }}.txt diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index f2a554a16e..5f3ca89863 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -7,7 +7,7 @@ permissions: pages: write pull-requests: write id-token: write -#test19 +#test22 jobs: trigger-workflows: runs-on: ubuntu-latest @@ -17,12 +17,16 @@ jobs: uses: actions/checkout@v4 - name: Trigger "Check Amalgamation" Workflow - run: gh workflow run "Check amalgamation" + run: | + echo "Triggering Check Amalgamation workflow with branch: ${{ github.head_ref }}" + gh workflow run "Check amalgamation" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - name: Trigger "Test Trudag Extensions" Workflow - run: gh workflow run "Test Trudag extensions" + run: | + echo "Triggering Test Trudag Extensions workflow with branch: ${{ github.head_ref }}" + gh workflow run "Test Trudag extensions" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} @@ -30,7 +34,9 @@ jobs: # run: gh workflow run "CIFuzz" - name: Trigger "Pull Request Labeler" Workflow - run: gh workflow run "Pull Request Labeler" + run: | + echo "Triggering Pull Request Labeler workflow with branch: ${{ github.head_ref }}" + gh workflow run "Pull Request Labeler" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} @@ -41,9 +47,9 @@ jobs: echo "Waiting for artifacts from child workflows..." REQUIRED_ARTIFACTS=( - workflow-AMALGAMATION-completed1 - workflow-TRUDAG-EXTENSIONS-completed1 - workflow-LABELER-completed1 + workflow-AMALGAMATION-completed_${{ github.sha }} + workflow-TRUDAG-EXTENSIONS-completed_${{ github.sha }} + workflow-LABELER-completed_${{ github.sha }} ) COMPLETED=false From c1b948fbb684906ee5ef97d495f5790894aebcbc Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Fri, 1 Aug 2025 15:44:23 +0000 Subject: [PATCH 04/85] unique directories --- .github/workflows/parent-workflow.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 5f3ca89863..4ecfb20eaa 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -53,17 +53,23 @@ jobs: ) COMPLETED=false - MAX_RETRIES=60 # Retry up to 60 times (15 mins with 15s intervals) + MAX_RETRIES=60 # Retry up to 60 times (15 mins, with 15s intervals) RETRY_COUNT=0 + # Create a directory for each artifact to prevent name conflicts while [ "$COMPLETED" = "false" ] && [ $RETRY_COUNT -lt $MAX_RETRIES ]; do - COMPLETED=true # Assume all artifacts exist initially + COMPLETED=true for ARTIFACT in "${REQUIRED_ARTIFACTS[@]}"; do echo "Attempting to download artifact: $ARTIFACT" - # Download the artifact (fails silently if it doesn't exist yet) - gh run download --name "$ARTIFACT" || COMPLETED=false + # Create a fresh directory for the artifact + EXTRACT_DIR="artifacts/$ARTIFACT" + rm -rf "$EXTRACT_DIR" # Ensure the directory is clean + mkdir -p "$EXTRACT_DIR" + + # Download and extract the artifact into the clean directory + gh run download --name "$ARTIFACT" --dir "$EXTRACT_DIR" || COMPLETED=false done if [ "$COMPLETED" = "false" ]; then @@ -73,9 +79,10 @@ jobs: fi done - if [ $COMPLETED = "false" ]; then + if [ "$COMPLETED" = "false" ]; then echo "Timed out while waiting for artifacts." exit 1 fi - echo "All required artifacts have been downloaded successfully!" \ No newline at end of file + echo "All required artifacts have been downloaded successfully!" + echo "Artifacts can be found in the 'artifacts/' directory." From efc057e0c39cdb6358fd22fbfaee469bb8474faf Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Fri, 1 Aug 2025 15:45:27 +0000 Subject: [PATCH 05/85] Add CIFuzz to parent workflow --- .github/workflows/check_amalgamation.yml | 1 - .github/workflows/cifuzz.yml | 75 ++++++++++++++++-------- .github/workflows/labeler.yml | 2 - .github/workflows/parent-workflow.yml | 11 +++- 4 files changed, 57 insertions(+), 32 deletions(-) diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index 5aee541166..45eb333575 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -2,7 +2,6 @@ name: "Check amalgamation" on: workflow_dispatch: -# pull_request: inputs: PARENT_SHA: description: "Parent Workflow SHA" diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 48ae0cd543..51bb49f901 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,5 +1,11 @@ name: CIFuzz -on: workflow_dispatch #[pull_request] + +on: + workflow_dispatch: + inputs: + PARENT_SHA: + description: "Parent Workflow SHA" + required: true permissions: contents: read @@ -8,28 +14,45 @@ jobs: Fuzzing: runs-on: ubuntu-latest steps: - - name: Harden Runner - uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 - with: - egress-policy: audit - - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master - with: - oss-fuzz-project-name: 'json' - dry-run: false - language: c++ - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master - with: - oss-fuzz-project-name: 'json' - fuzz-seconds: 300 - dry-run: false - language: c++ - - name: Upload Crash - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts + - name: Harden Runner + uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 + with: + egress-policy: audit + + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e + with: + oss-fuzz-project-name: 'json' + dry-run: false + language: c++ + + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master + with: + oss-fuzz-project-name: 'json' + fuzz-seconds: 300 + dry-run: false + language: c++ + + - name: Upload Crash + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts + + - name: Checkout specific commit from Parent Workflow + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.PARENT_SHA }} + path: actions/checkout@v4 + + - name: Create Completion Flag + run: echo "CIfuzz workflow completed." > CIFUZZ_flag_${{ github.event.inputs.PARENT_SHA }}.txt + + - name: Upload completion artifact + uses: actions/upload-artifact@v4 + with: + name: workflow-CIFUZZ-completed_${{ github.event.inputs.PARENT_SHA }} + path: CIFUZZ_flag_${{ github.event.inputs.PARENT_SHA }}.txt diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 09cd935c93..96ec25fb64 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -2,8 +2,6 @@ name: "Pull Request Labeler" on: workflow_dispatch: -# pull_request_target: - # types: [opened, synchronize] inputs: PARENT_SHA: description: "Parent Workflow SHA" diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 4ecfb20eaa..914ba9c302 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -7,7 +7,7 @@ permissions: pages: write pull-requests: write id-token: write -#test22 + jobs: trigger-workflows: runs-on: ubuntu-latest @@ -30,8 +30,12 @@ jobs: env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - #- name: Trigger "CIFuzz" Workflow - # run: gh workflow run "CIFuzz" + - name: Trigger "CIFuzz" Workflow + run: | + echo "Triggering cifuzz workflow with branch: ${{ github.head_ref }}" + gh workflow run "CIFuzz" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} + env: + GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - name: Trigger "Pull Request Labeler" Workflow run: | @@ -50,6 +54,7 @@ jobs: workflow-AMALGAMATION-completed_${{ github.sha }} workflow-TRUDAG-EXTENSIONS-completed_${{ github.sha }} workflow-LABELER-completed_${{ github.sha }} + workflow-CIFUZZ-completed_${{ github.event.inputs.PARENT_SHA }} ) COMPLETED=false From 18bab1f15fa10d9f12a3336fd08d90ca572ccf55 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 13:19:41 +0000 Subject: [PATCH 06/85] fix typo --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 914ba9c302..fdcf24e3b8 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -54,7 +54,7 @@ jobs: workflow-AMALGAMATION-completed_${{ github.sha }} workflow-TRUDAG-EXTENSIONS-completed_${{ github.sha }} workflow-LABELER-completed_${{ github.sha }} - workflow-CIFUZZ-completed_${{ github.event.inputs.PARENT_SHA }} + workflow-CIFUZZ-completed_${{ github.sha }} ) COMPLETED=false From 09f264e0248aa8ae6ebc0ec3bd3d17b01b5109a8 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 14:34:37 +0000 Subject: [PATCH 07/85] dynamic workflow triggers --- .github/workflows/parent-workflow.yml | 38 +++++++++------------------ 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index fdcf24e3b8..25da73f806 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -3,7 +3,7 @@ name: Parent Workflow on: [pull_request] permissions: - contents: write + contents: write pages: write pull-requests: write id-token: write @@ -16,31 +16,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Trigger "Check Amalgamation" Workflow + - name: Define Workflows to Trigger + id: define-workflows run: | - echo "Triggering Check Amalgamation workflow with branch: ${{ github.head_ref }}" - gh workflow run "Check amalgamation" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - - - name: Trigger "Test Trudag Extensions" Workflow - run: | - echo "Triggering Test Trudag Extensions workflow with branch: ${{ github.head_ref }}" - gh workflow run "Test Trudag extensions" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - - - name: Trigger "CIFuzz" Workflow - run: | - echo "Triggering cifuzz workflow with branch: ${{ github.head_ref }}" - gh workflow run "CIFuzz" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + echo "CHECK_AMALGAMATION=Check amalgamation" >> workflows_list.txt + echo "TEST_TRUDAG_EXTENSIONS=Test Trudag extensions" >> workflows_list.txt + echo "CIFUZZ=CIFuzz" >> workflows_list.txt + echo "PR_LABELER=Pull Request Labeler" >> workflows_list.txt - - name: Trigger "Pull Request Labeler" Workflow + - name: Trigger Workflows Dynamically run: | - echo "Triggering Pull Request Labeler workflow with branch: ${{ github.head_ref }}" - gh workflow run "Pull Request Labeler" --ref ${{ github.head_ref }} -F PARENT_SHA=${{ github.sha }} + while IFS='=' read -r ID WORKFLOW; do + echo "Triggering $WORKFLOW workflow with branch: ${{ github.head_ref }}" + gh workflow run "$WORKFLOW" --ref "${{ github.head_ref }}" -F PARENT_SHA="${{ github.sha }}" + done < workflows_list.txt env: GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} @@ -61,19 +50,16 @@ jobs: MAX_RETRIES=60 # Retry up to 60 times (15 mins, with 15s intervals) RETRY_COUNT=0 - # Create a directory for each artifact to prevent name conflicts while [ "$COMPLETED" = "false" ] && [ $RETRY_COUNT -lt $MAX_RETRIES ]; do COMPLETED=true for ARTIFACT in "${REQUIRED_ARTIFACTS[@]}"; do echo "Attempting to download artifact: $ARTIFACT" - # Create a fresh directory for the artifact EXTRACT_DIR="artifacts/$ARTIFACT" rm -rf "$EXTRACT_DIR" # Ensure the directory is clean mkdir -p "$EXTRACT_DIR" - # Download and extract the artifact into the clean directory gh run download --name "$ARTIFACT" --dir "$EXTRACT_DIR" || COMPLETED=false done From 14bb82273c43434b6c2c158363e7f7dd166cdc3f Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 15:13:14 +0000 Subject: [PATCH 08/85] add codeql --- .github/workflows/codeql-analysis.yml | 20 ++++++++++++++++++++ .github/workflows/parent-workflow.yml | 2 ++ .github/workflows/publish_documentation.yml | 1 - 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6dd814cf7e..4d954474f5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,6 +1,11 @@ name: "Code scanning - action" on: + workflow_dispatch: + inputs: + PARENT_SHA: + description: "Parent Workflow SHA" + required: true push: branches: - develop @@ -47,3 +52,18 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14 + + - name: Checkout specific commit from Parent Workflow + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.PARENT_SHA }} + path: actions/checkout@v4 + + - name: Create Completion Flag + run: echo "CODEQL workflow completed." > CODEQL_flag_${{ github.event.inputs.PARENT_SHA }}.txt + + - name: Upload completion artifact + uses: actions/upload-artifact@v4 + with: + name: workflow-CODEQL-completed_${{ github.event.inputs.PARENT_SHA }} + path: CODEQL_flag_${{ github.event.inputs.PARENT_SHA }}.txt diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 25da73f806..d3ac9dc4df 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -23,6 +23,7 @@ jobs: echo "TEST_TRUDAG_EXTENSIONS=Test Trudag extensions" >> workflows_list.txt echo "CIFUZZ=CIFuzz" >> workflows_list.txt echo "PR_LABELER=Pull Request Labeler" >> workflows_list.txt + echo "CODEQL=Code scanning - action" >> workflows_list.txt - name: Trigger Workflows Dynamically run: | @@ -44,6 +45,7 @@ jobs: workflow-TRUDAG-EXTENSIONS-completed_${{ github.sha }} workflow-LABELER-completed_${{ github.sha }} workflow-CIFUZZ-completed_${{ github.sha }} + workflow-CODEQL-completed_${{ github.sha }} ) COMPLETED=false diff --git a/.github/workflows/publish_documentation.yml b/.github/workflows/publish_documentation.yml index c0cc542e21..35472a9c6c 100644 --- a/.github/workflows/publish_documentation.yml +++ b/.github/workflows/publish_documentation.yml @@ -23,7 +23,6 @@ on: workflow_run: workflows: - "Parent Workflow" - types: - completed From f06b7b7926af97369bc332598c6219440fcb69da Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 15:14:34 +0000 Subject: [PATCH 09/85] test --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index d3ac9dc4df..444dac8de9 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,5 +1,5 @@ name: Parent Workflow - +#test on: [pull_request] permissions: From e1f6b299f87043494fadbe7000eb5f8d9d5219cb Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 15:16:06 +0000 Subject: [PATCH 10/85] test --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 444dac8de9..4a1fe9ede9 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,5 +1,5 @@ name: Parent Workflow -#test +#testerr on: [pull_request] permissions: From 8afabdf29ff83ad97adca1eff8f180de59147d64 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 15:51:00 +0000 Subject: [PATCH 11/85] test needs command --- .github/workflows/check_amalgamation.yml | 25 +++-- .github/workflows/labeler.yml | 28 +++-- .github/workflows/parent-workflow.yml | 126 +++++++++++++---------- 3 files changed, 96 insertions(+), 83 deletions(-) diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index 6477cac37e..36ad95340d 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -1,11 +1,12 @@ name: "Check amalgamation" on: - workflow_dispatch: + workflow_call: inputs: - PARENT_SHA: - description: "Parent Workflow SHA" + artifact_id: + description: 'Unique identifier for artifacts' required: true + type: string permissions: contents: read @@ -79,16 +80,14 @@ jobs: echo Check find $MAIN_DIR -name '*.orig' -exec false {} \+ - - name: Checkout specific commit from Parent Workflow - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.PARENT_SHA }} - - - name: Create Completion Flag - run: echo "Check amalgamation workflow completed." > AMALGAMATION_flag_${{ github.event.inputs.PARENT_SHA }}.txt + - name: Generate amalgamation artifact + run: | + echo "Generating amalgamation artifact..." + mkdir -p amalgamation + echo "Amalgamation processed for ${{ inputs.artifact_id }}" > amalgamation/amalgamation.txt - - name: Upload completion artifact + - name: Upload amalgamation artifact uses: actions/upload-artifact@v4 with: - name: workflow-AMALGAMATION-completed_${{ github.event.inputs.PARENT_SHA }} - path: AMALGAMATION_flag_${{ github.event.inputs.PARENT_SHA }}.txt \ No newline at end of file + name: ${{ inputs.artifact_id }} + path: amalgamation/ \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index bb1651ad6a..ccfe246ae0 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,11 +1,12 @@ name: "Pull Request Labeler" on: - workflow_dispatch: - inputs: - PARENT_SHA: - description: "Parent Workflow SHA" + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' required: true + type: string permissions: contents: read @@ -28,17 +29,14 @@ jobs: env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - name: Checkout specific commit from Parent Workflow - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.PARENT_SHA }} - - - name: Create Completion Flag - run: echo "Labeler workflow completed" > LABELER_flag_${{ github.event.inputs.PARENT_SHA }}.txt - + - name: Generate label artifact + run: | + echo "Generating label artifact..." + mkdir -p labeler + echo "Labels processed for ${{ inputs.artifact_id }}" > labeler/labeler.txt - - name: Upload completion artifact + - name: Upload label artifact uses: actions/upload-artifact@v4 with: - name: workflow-LABELER-completed_${{ github.event.inputs.PARENT_SHA }} - path: LABELER_flag_${{ github.event.inputs.PARENT_SHA }}.txt + name: ${{ inputs.artifact_id }} + path: labeler/ \ No newline at end of file diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 4a1fe9ede9..d094f57dd8 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,6 +1,11 @@ name: Parent Workflow -#testerr -on: [pull_request] + +on: + pull_request: + push: + branches: + - develop + - main permissions: contents: write @@ -10,72 +15,83 @@ permissions: jobs: trigger-workflows: + name: Trigger Child Workflows runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Define Workflows to Trigger - id: define-workflows - run: | - echo "CHECK_AMALGAMATION=Check amalgamation" >> workflows_list.txt - echo "TEST_TRUDAG_EXTENSIONS=Test Trudag extensions" >> workflows_list.txt - echo "CIFUZZ=CIFuzz" >> workflows_list.txt - echo "PR_LABELER=Pull Request Labeler" >> workflows_list.txt - echo "CODEQL=Code scanning - action" >> workflows_list.txt - - - name: Trigger Workflows Dynamically - run: | - while IFS='=' read -r ID WORKFLOW; do - echo "Triggering $WORKFLOW workflow with branch: ${{ github.head_ref }}" - gh workflow run "$WORKFLOW" --ref "${{ github.head_ref }}" -F PARENT_SHA="${{ github.sha }}" - done < workflows_list.txt - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - - - name: Wait and Download Artifacts From Child Workflows - env: - GH_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} - run: | - echo "Waiting for artifacts from child workflows..." + # Call the Pull Request Labeler Workflow + - name: Run Labeler Workflow + id: labeler + uses: ./.github/workflows/labeler.yml + with: + artifact_id: "labeler-${{ github.sha }}" - REQUIRED_ARTIFACTS=( - workflow-AMALGAMATION-completed_${{ github.sha }} - workflow-TRUDAG-EXTENSIONS-completed_${{ github.sha }} - workflow-LABELER-completed_${{ github.sha }} - workflow-CIFUZZ-completed_${{ github.sha }} - workflow-CODEQL-completed_${{ github.sha }} - ) + # Call another reusable workflow (e.g., Build & Security Tests) + - name: Run Amalgamation Workflow + id: amalgamation + uses: ./.github/workflows/check_amalgamation.yml + with: + artifact_id: "amalgamation-${{ github.sha }}" - COMPLETED=false - MAX_RETRIES=60 # Retry up to 60 times (15 mins, with 15s intervals) - RETRY_COUNT=0 + collect-and-deploy: + name: "Collect Results & Deploy" + needs: [trigger-workflows] + runs-on: ubuntu-latest + if: always() # Run even if some jobs fail - while [ "$COMPLETED" = "false" ] && [ $RETRY_COUNT -lt $MAX_RETRIES ]; do - COMPLETED=true + steps: + - name: Checkout code + uses: actions/checkout@v4 - for ARTIFACT in "${REQUIRED_ARTIFACTS[@]}"; do - echo "Attempting to download artifact: $ARTIFACT" + - name: Check child workflow results + run: | + echo "=== Child Workflow Results ===" + echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" + echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" + echo "================================" + + if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ + [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then + echo "❌ One or more child workflows failed" + exit 1 + fi - EXTRACT_DIR="artifacts/$ARTIFACT" - rm -rf "$EXTRACT_DIR" # Ensure the directory is clean - mkdir -p "$EXTRACT_DIR" + echo "✅ Child workflows completed successfully!" - gh run download --name "$ARTIFACT" --dir "$EXTRACT_DIR" || COMPLETED=false - done + - name: Download labeler artifacts + uses: actions/download-artifact@v4 + with: + name: "labeler-${{ github.sha }}" + path: artifacts/ - if [ "$COMPLETED" = "false" ]; then - echo "Not all artifacts are ready. Waiting 15 seconds..." - sleep 15 - RETRY_COUNT=$((RETRY_COUNT + 1)) - fi - done + - name: Download amalgamation artifacts + uses: actions/download-artifact@v4 + with: + name: "amalgamation-${{ github.sha }}" + path: artifacts/ - if [ "$COMPLETED" = "false" ]; then - echo "Timed out while waiting for artifacts." - exit 1 + - name: Create deployment package + run: | + echo "Creating deployment package..." + mkdir -p deployment + echo "Deployment ready - $(date)" > deployment/deployment-info.txt + + # Copy all artifacts to deployment folder + if [[ -d artifacts ]]; then + cp -r artifacts/* deployment/ fi - echo "All required artifacts have been downloaded successfully!" - echo "Artifacts can be found in the 'artifacts/' directory." + - name: Upload final deployment artifact + uses: actions/upload-artifact@v4 + with: + name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" + path: deployment/ + + - name: Deployment simulation + run: | + echo "🚀 Simulating deployment..." + sleep 2 + echo "✅ Deployment completed successfully!" From a260ee9648071f5e98c214f586c26acafdd378a9 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 15:57:12 +0000 Subject: [PATCH 12/85] fix parent --- .github/workflows/parent-workflow.yml | 131 ++++++++++++-------------- 1 file changed, 60 insertions(+), 71 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index d094f57dd8..cf2c2a7b24 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,84 +14,73 @@ permissions: id-token: write jobs: - trigger-workflows: - name: Trigger Child Workflows - runs-on: ubuntu-latest + run-tests: + name: Run Labeler Workflow + uses: ./.github/workflows/labeler.yml + with: + artifact_id: "labeler-${{ github.sha }}" - steps: - - name: Checkout repository - uses: actions/checkout@v4 + name: Run Amalgamation Workflow + uses: ./.github/workflows/check_amalgamation.yml + with: + artifact_id: "amalgamation-${{ github.sha }}" - # Call the Pull Request Labeler Workflow - - name: Run Labeler Workflow - id: labeler - uses: ./.github/workflows/labeler.yml - with: - artifact_id: "labeler-${{ github.sha }}" + collect-and-deploy: + name: "Collect Results & Deploy" + needs: [trigger-workflows] + runs-on: ubuntu-latest + if: always() # Run even if some jobs fail - # Call another reusable workflow (e.g., Build & Security Tests) - - name: Run Amalgamation Workflow - id: amalgamation - uses: ./.github/workflows/check_amalgamation.yml - with: - artifact_id: "amalgamation-${{ github.sha }}" + steps: + - name: Checkout code + uses: actions/checkout@v4 - collect-and-deploy: - name: "Collect Results & Deploy" - needs: [trigger-workflows] - runs-on: ubuntu-latest - if: always() # Run even if some jobs fail + - name: Check child workflow results + run: | + echo "=== Child Workflow Results ===" + echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" + echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" + echo "================================" + + if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ + [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then + echo "❌ One or more child workflows failed" + exit 1 + fi - steps: - - name: Checkout code - uses: actions/checkout@v4 + echo "✅ Child workflows completed successfully!" - - name: Check child workflow results - run: | - echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" - echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" - echo "================================" - - if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ - [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then - echo "❌ One or more child workflows failed" - exit 1 - fi + - name: Download labeler artifacts + uses: actions/download-artifact@v4 + with: + name: "labeler-${{ github.sha }}" + path: artifacts/ - echo "✅ Child workflows completed successfully!" + - name: Download amalgamation artifacts + uses: actions/download-artifact@v4 + with: + name: "amalgamation-${{ github.sha }}" + path: artifacts/ - - name: Download labeler artifacts - uses: actions/download-artifact@v4 - with: - name: "labeler-${{ github.sha }}" - path: artifacts/ + - name: Create deployment package + run: | + echo "Creating deployment package..." + mkdir -p deployment + echo "Deployment ready - $(date)" > deployment/deployment-info.txt + + # Copy all artifacts to deployment folder + if [[ -d artifacts ]]; then + cp -r artifacts/* deployment/ + fi - - name: Download amalgamation artifacts - uses: actions/download-artifact@v4 - with: - name: "amalgamation-${{ github.sha }}" - path: artifacts/ + - name: Upload final deployment artifact + uses: actions/upload-artifact@v4 + with: + name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" + path: deployment/ - - name: Create deployment package - run: | - echo "Creating deployment package..." - mkdir -p deployment - echo "Deployment ready - $(date)" > deployment/deployment-info.txt - - # Copy all artifacts to deployment folder - if [[ -d artifacts ]]; then - cp -r artifacts/* deployment/ - fi - - - name: Upload final deployment artifact - uses: actions/upload-artifact@v4 - with: - name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" - path: deployment/ - - - name: Deployment simulation - run: | - echo "🚀 Simulating deployment..." - sleep 2 - echo "✅ Deployment completed successfully!" + - name: Deployment simulation + run: | + echo "🚀 Simulating deployment..." + sleep 2 + echo "✅ Deployment completed successfully!" From 5a4360c2b660dd50047509fab4aeaab90ef9bb1a Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:02:29 +0000 Subject: [PATCH 13/85] disable ubuntu --- .github/workflows/ubuntu.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3130a3f434..044c270bb5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,16 +1,16 @@ name: Ubuntu on: - push: - branches: - - develop - - main - - release/* - pull_request: workflow_dispatch: - schedule: + # push: + # branches: + # - develop + # - main + # - release/* + #pull_request: + #schedule: # Runs every day at 9:00 AM UTC - - cron: "0 9 * * *" + #- cron: "0 9 * * *" permissions: contents: read From 2de1611e04f75d27fba5b0188ee532350d6e8369 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:05:22 +0000 Subject: [PATCH 14/85] fix error --- .github/workflows/parent-workflow.yml | 120 +++++++++++++------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index cf2c2a7b24..219e0a474d 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,73 +14,73 @@ permissions: id-token: write jobs: - run-tests: - name: Run Labeler Workflow - uses: ./.github/workflows/labeler.yml - with: - artifact_id: "labeler-${{ github.sha }}" + run-tests: + name: Run Labeler Workflow + uses: ./.github/workflows/labeler.yml + with: + artifact_id: "labeler-${{ github.sha }}" - name: Run Amalgamation Workflow - uses: ./.github/workflows/check_amalgamation.yml - with: - artifact_id: "amalgamation-${{ github.sha }}" + name: Run Amalgamation Workflow + uses: ./.github/workflows/check_amalgamation.yml + with: + artifact_id: "amalgamation-${{ github.sha }}" - collect-and-deploy: - name: "Collect Results & Deploy" - needs: [trigger-workflows] - runs-on: ubuntu-latest - if: always() # Run even if some jobs fail + collect-and-deploy: + name: "Collect Results & Deploy" + needs: [trigger-workflows] + runs-on: ubuntu-latest + if: always() # Run even if some jobs fail - steps: - - name: Checkout code - uses: actions/checkout@v4 + steps: + - name: Checkout code + uses: actions/checkout@v4 - - name: Check child workflow results - run: | - echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" - echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" - echo "================================" - - if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ - [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then - echo "❌ One or more child workflows failed" - exit 1 - fi + - name: Check child workflow results + run: | + echo "=== Child Workflow Results ===" + echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" + echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" + echo "================================" + + if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ + [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then + echo "❌ One or more child workflows failed" + exit 1 + fi - echo "✅ Child workflows completed successfully!" + echo "✅ Child workflows completed successfully!" - - name: Download labeler artifacts - uses: actions/download-artifact@v4 - with: - name: "labeler-${{ github.sha }}" - path: artifacts/ + - name: Download labeler artifacts + uses: actions/download-artifact@v4 + with: + name: "labeler-${{ github.sha }}" + path: artifacts/ - - name: Download amalgamation artifacts - uses: actions/download-artifact@v4 - with: - name: "amalgamation-${{ github.sha }}" - path: artifacts/ + - name: Download amalgamation artifacts + uses: actions/download-artifact@v4 + with: + name: "amalgamation-${{ github.sha }}" + path: artifacts/ - - name: Create deployment package - run: | - echo "Creating deployment package..." - mkdir -p deployment - echo "Deployment ready - $(date)" > deployment/deployment-info.txt - - # Copy all artifacts to deployment folder - if [[ -d artifacts ]]; then - cp -r artifacts/* deployment/ - fi + - name: Create deployment package + run: | + echo "Creating deployment package..." + mkdir -p deployment + echo "Deployment ready - $(date)" > deployment/deployment-info.txt + + # Copy all artifacts to deployment folder + if [[ -d artifacts ]]; then + cp -r artifacts/* deployment/ + fi - - name: Upload final deployment artifact - uses: actions/upload-artifact@v4 - with: - name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" - path: deployment/ + - name: Upload final deployment artifact + uses: actions/upload-artifact@v4 + with: + name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" + path: deployment/ - - name: Deployment simulation - run: | - echo "🚀 Simulating deployment..." - sleep 2 - echo "✅ Deployment completed successfully!" + - name: Deployment simulation + run: | + echo "🚀 Simulating deployment..." + sleep 2 + echo "✅ Deployment completed successfully!" From 0e139df8893ab3ab4bc92b17e6ba7cddde4ae322 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:07:01 +0000 Subject: [PATCH 15/85] fix error --- .github/workflows/codeql-analysis.yml | 5 ----- .github/workflows/parent-workflow.yml | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4d954474f5..a87426658c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,11 +1,6 @@ name: "Code scanning - action" on: - workflow_dispatch: - inputs: - PARENT_SHA: - description: "Parent Workflow SHA" - required: true push: branches: - develop diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 219e0a474d..a1f33c1195 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,12 +14,13 @@ permissions: id-token: write jobs: - run-tests: + run-labeler: name: Run Labeler Workflow uses: ./.github/workflows/labeler.yml with: artifact_id: "labeler-${{ github.sha }}" + run-amalgamation: name: Run Amalgamation Workflow uses: ./.github/workflows/check_amalgamation.yml with: From 330d98ca8f0156c55d6f8994e08dede7680006d9 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:07:55 +0000 Subject: [PATCH 16/85] fix error --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index a1f33c1195..f2234003f3 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -28,7 +28,7 @@ jobs: collect-and-deploy: name: "Collect Results & Deploy" - needs: [trigger-workflows] + needs: [run-labeler, run-amalgamation] runs-on: ubuntu-latest if: always() # Run even if some jobs fail From d1e4a096e4c1a1c72da6cae6192ab5a8fb236419 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:11:06 +0000 Subject: [PATCH 17/85] fix error --- .github/workflows/codeql-analysis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a87426658c..9a83497e41 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,12 +1,12 @@ name: "Code scanning - action" on: - push: - branches: - - develop - - main - - release/* - pull_request: +# push: +# branches: +# - develop +# - main +# - release/* +# pull_request: schedule: - cron: '0 19 * * 1' workflow_dispatch: From 0a9ffff27f8dbd04f1cb6b585b3570a77341df1b Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:15:12 +0000 Subject: [PATCH 18/85] fix error --- .github/workflows/parent-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index f2234003f3..5994abda1b 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -39,12 +39,12 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.trigger-workflows.outputs.labeler }}" - echo "Amalgamation workflow: ${{ needs.trigger-workflows.outputs.amalgamation }}" + echo "Labeler workflow: ${{ needs.run-labeler.outputs.labeler }}" + echo "Amalgamation workflow: ${{ needs.run-amalgamation.outputs.amalgamation }}" echo "================================" - if [[ "${{ needs.trigger-workflows.outputs.labeler }}" != "success" ]] || \ - [[ "${{ needs.trigger-workflows.outputs.amalgamation }}" != "success" ]]; then + if [[ "${{ needs.run-labeler.outputs.labeler }}" != "success" ]] || \ + [[ "${{ needs.run-amalgamation.outputs.amalgamation }}" != "success" ]]; then echo "❌ One or more child workflows failed" exit 1 fi From 4706a91adfd62df3c6dc5d64419c1b245bbee2be Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:17:49 +0000 Subject: [PATCH 19/85] fix error --- .github/workflows/parent-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 5994abda1b..169a4cfd07 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -39,12 +39,12 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.run-labeler.outputs.labeler }}" - echo "Amalgamation workflow: ${{ needs.run-amalgamation.outputs.amalgamation }}" + echo "Labeler workflow: ${{ needs.run-labeler.labeler }}" + echo "Amalgamation workflow: ${{ needs.run-amalgamation.amalgamation }}" echo "================================" - if [[ "${{ needs.run-labeler.outputs.labeler }}" != "success" ]] || \ - [[ "${{ needs.run-amalgamation.outputs.amalgamation }}" != "success" ]]; then + if [[ "${{ needs.run-labeler.labeler }}" != "success" ]] || \ + [[ "${{ needs.run-amalgamation.amalgamation }}" != "success" ]]; then echo "❌ One or more child workflows failed" exit 1 fi From 16ae08f2c0531f5161620b32f6cc619c6e978926 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:21:40 +0000 Subject: [PATCH 20/85] fix errors --- .github/workflows/parent-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 169a4cfd07..fb07af5d3f 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -39,12 +39,12 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.run-labeler.labeler }}" - echo "Amalgamation workflow: ${{ needs.run-amalgamation.amalgamation }}" + echo "Labeler workflow: ${{ needs.run-labeler.result }}" + echo "Amalgamation workflow: ${{ needs.run-amalgamation.result }}" echo "================================" - if [[ "${{ needs.run-labeler.labeler }}" != "success" ]] || \ - [[ "${{ needs.run-amalgamation.amalgamation }}" != "success" ]]; then + if [[ "${{ needs.run-labeler.result }}" != "success" ]] || \ + [[ "${{ needs.run-amalgamation.result }}" != "success" ]]; then echo "❌ One or more child workflows failed" exit 1 fi From fee238fa72348e71697c63be49ebc49664c0da49 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:24:07 +0000 Subject: [PATCH 21/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index fb07af5d3f..ad6588e092 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -77,7 +77,7 @@ jobs: - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: - name: "deployment-package-${{ github.ref_name }}-${{ github.sha }}" + name: "deployment-package-${{ github.sha }}" path: deployment/ - name: Deployment simulation From 5b4905072110e4d9ed1d149cec4c3c0a55cc5d5a Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:34:48 +0000 Subject: [PATCH 22/85] add test_trudag_extensions --- .github/workflows/parent-workflow.yml | 32 +++++++++++++++----- .github/workflows/test_trudag_extensions.yml | 29 +++++++++--------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index ad6588e092..74f411d7fa 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,21 +14,28 @@ permissions: id-token: write jobs: - run-labeler: + labeler: name: Run Labeler Workflow uses: ./.github/workflows/labeler.yml with: artifact_id: "labeler-${{ github.sha }}" - run-amalgamation: + check_amalgamation: name: Run Amalgamation Workflow uses: ./.github/workflows/check_amalgamation.yml with: artifact_id: "amalgamation-${{ github.sha }}" + + test_trudag_extensions: + name: Run Test Trudag Extensions Workflow + uses: ./.github/workflows/test_trudag_extensions.yml + with: + artifact_id: "test_trudag_extensions-${{ github.sha }}" + collect-and-deploy: name: "Collect Results & Deploy" - needs: [run-labeler, run-amalgamation] + needs: [labeler, check_amalgamation, test_trudag_extensions] runs-on: ubuntu-latest if: always() # Run even if some jobs fail @@ -39,12 +46,15 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.run-labeler.result }}" - echo "Amalgamation workflow: ${{ needs.run-amalgamation.result }}" + echo "Labeler workflow: ${{ needs.labeler.result }}" + echo "Amalgamation workflow: ${{ needs.check_amalgamation.result }}" + echo "Test Trudag Extensions workflow: ${{ needs.test_trudag_extensions.result }}" echo "================================" - if [[ "${{ needs.run-labeler.result }}" != "success" ]] || \ - [[ "${{ needs.run-amalgamation.result }}" != "success" ]]; then + if [[ "${{ needs.labeler.result }}" != "success" ]] || \ + [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ + [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] + ; then echo "❌ One or more child workflows failed" exit 1 fi @@ -60,7 +70,13 @@ jobs: - name: Download amalgamation artifacts uses: actions/download-artifact@v4 with: - name: "amalgamation-${{ github.sha }}" + name: "check_amalgamation-${{ github.sha }}" + path: artifacts/ + + - name: Download test_trudag_extensions artifacts + uses: actions/download-artifact@v4 + with: + name: "test_trudag_extensions-${{ github.sha }}" path: artifacts/ - name: Create deployment package diff --git a/.github/workflows/test_trudag_extensions.yml b/.github/workflows/test_trudag_extensions.yml index f8bf40e314..3d48abf08f 100644 --- a/.github/workflows/test_trudag_extensions.yml +++ b/.github/workflows/test_trudag_extensions.yml @@ -1,11 +1,12 @@ name: Test Trudag extensions on: - workflow_dispatch: - inputs: - PARENT_SHA: - description: "Parent Workflow SHA" - required: true + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' + required: true + type: string push: branches: [ main ] @@ -32,16 +33,14 @@ jobs: cd .dotstop_extensions pytest -v - - name: Checkout specific commit from Parent Workflow - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.PARENT_SHA }} - - - name: Create Completion Flag - run: echo "Trudag extensions workflow completed." > TRUDAG_EXTENSIONS_flag_${{ github.event.inputs.PARENT_SHA }}.txt + - name: Generate test_trudag_extensions artifact + run: | + echo "Generating test_trudag_extensions artifact..." + mkdir -p labeler + echo "test_trudag_extensions processed for ${{ inputs.artifact_id }}" > test_trudag_extensions/test_trudag_extensions.txt - - name: Upload completion artifact + - name: Upload test_trudag_extensions artifact uses: actions/upload-artifact@v4 with: - name: workflow-TRUDAG-EXTENSIONS-completed_${{ github.event.inputs.PARENT_SHA }} - path: TRUDAG_EXTENSIONS_flag_${{ github.event.inputs.PARENT_SHA }}.txt + name: ${{ inputs.artifact_id }} + path: test_trudag_extensions/ \ No newline at end of file From 451cd4b6e75404f2b7e5f1886d36e0bcec292461 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:38:51 +0000 Subject: [PATCH 23/85] add test_trudag_extensions --- .github/workflows/test_trudag_extensions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_trudag_extensions.yml b/.github/workflows/test_trudag_extensions.yml index 3d48abf08f..6cbba91b84 100644 --- a/.github/workflows/test_trudag_extensions.yml +++ b/.github/workflows/test_trudag_extensions.yml @@ -36,7 +36,7 @@ jobs: - name: Generate test_trudag_extensions artifact run: | echo "Generating test_trudag_extensions artifact..." - mkdir -p labeler + mkdir -p test_trudag_extensions echo "test_trudag_extensions processed for ${{ inputs.artifact_id }}" > test_trudag_extensions/test_trudag_extensions.txt - name: Upload test_trudag_extensions artifact From 02e0e9b99e6c2789b295531ffe4a91c69f76bc94 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:43:38 +0000 Subject: [PATCH 24/85] dynamic code --- .github/workflows/parent-workflow.yml | 95 +++++++++++---------------- 1 file changed, 38 insertions(+), 57 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 74f411d7fa..a240963f5d 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -2,7 +2,7 @@ name: Parent Workflow on: pull_request: - push: + push: branches: - develop - main @@ -13,29 +13,31 @@ permissions: pull-requests: write id-token: write -jobs: - labeler: - name: Run Labeler Workflow - uses: ./.github/workflows/labeler.yml - with: - artifact_id: "labeler-${{ github.sha }}" - - check_amalgamation: - name: Run Amalgamation Workflow - uses: ./.github/workflows/check_amalgamation.yml - with: - artifact_id: "amalgamation-${{ github.sha }}" - - test_trudag_extensions: - name: Run Test Trudag Extensions Workflow - uses: ./.github/workflows/test_trudag_extensions.yml - with: - artifact_id: "test_trudag_extensions-${{ github.sha }}" +env: + WORKFLOWS: | + [ + {"name": "labeler", "file": "labeler.yml"}, + {"name": "check_amalgamation", "file": "check_amalgamation.yml"}, + {"name": "test_trudag_extensions", "file": "test_trudag_extensions.yml"} + ] +jobs: + trigger-and-collect: + name: Trigger All Workflows + runs-on: ubuntu-latest + strategy: + matrix: + workflow: ${{ fromJson(env.WORKFLOWS) }} + steps: + - name: Trigger Child Workflow - ${{ matrix.workflow.name }} + uses: ./.github/workflows/${{ matrix.workflow.file }} + with: + artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + collect-and-deploy: - name: "Collect Results & Deploy" - needs: [labeler, check_amalgamation, test_trudag_extensions] + name: Collect Results & Deploy + needs: trigger-and-collect runs-on: ubuntu-latest if: always() # Run even if some jobs fail @@ -43,43 +45,22 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Check child workflow results + - name: Download All Workflow Artifacts run: | - echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.labeler.result }}" - echo "Amalgamation workflow: ${{ needs.check_amalgamation.result }}" - echo "Test Trudag Extensions workflow: ${{ needs.test_trudag_extensions.result }}" - echo "================================" - - if [[ "${{ needs.labeler.result }}" != "success" ]] || \ - [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ - [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] - ; then - echo "❌ One or more child workflows failed" - exit 1 - fi - - echo "✅ Child workflows completed successfully!" - - - name: Download labeler artifacts - uses: actions/download-artifact@v4 - with: - name: "labeler-${{ github.sha }}" - path: artifacts/ + WORKFLOWS='${{ env.WORKFLOWS }}' + for WORKFLOW in $(echo "$WORKFLOWS" | jq -cr '.[] | @base64'); do + _jq() { + echo "$WORKFLOW" | base64 --decode | jq -r "${1}" + } + NAME=$(_jq '.name') + ARTIFACT_ID="${NAME}-${{ github.sha }}" - - name: Download amalgamation artifacts - uses: actions/download-artifact@v4 - with: - name: "check_amalgamation-${{ github.sha }}" - path: artifacts/ - - - name: Download test_trudag_extensions artifacts - uses: actions/download-artifact@v4 - with: - name: "test_trudag_extensions-${{ github.sha }}" - path: artifacts/ + echo "Downloading artifact for workflow: $NAME" + mkdir -p artifacts/$NAME + gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts for $NAME" + done - - name: Create deployment package + - name: Create Deployment Package run: | echo "Creating deployment package..." mkdir -p deployment @@ -90,13 +71,13 @@ jobs: cp -r artifacts/* deployment/ fi - - name: Upload final deployment artifact + - name: Upload Deployment Package uses: actions/upload-artifact@v4 with: name: "deployment-package-${{ github.sha }}" path: deployment/ - - name: Deployment simulation + - name: Deployment Simulation run: | echo "🚀 Simulating deployment..." sleep 2 From 8f033d318235770e49f42bd79c0216bf35898957 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:44:53 +0000 Subject: [PATCH 25/85] dynamic code --- .github/workflows/parent-workflow.yml | 40 ++++++++++++--------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index a240963f5d..2c8c1c5cca 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,6 +1,6 @@ name: Parent Workflow -on: +on: pull_request: push: branches: @@ -12,32 +12,31 @@ permissions: pages: write pull-requests: write id-token: write - -env: - WORKFLOWS: | - [ - {"name": "labeler", "file": "labeler.yml"}, - {"name": "check_amalgamation", "file": "check_amalgamation.yml"}, - {"name": "test_trudag_extensions", "file": "test_trudag_extensions.yml"} - ] + workflows: write jobs: - trigger-and-collect: + trigger-workflows: name: Trigger All Workflows runs-on: ubuntu-latest strategy: matrix: - workflow: ${{ fromJson(env.WORKFLOWS) }} + workflow: + - { name: "labeler", file: "labeler.yml" } + - { name: "check_amalgamation", file: "check_amalgamation.yml" } + - { name: "test_trudag_extensions", file: "test_trudag_extensions.yml" } steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Trigger Child Workflow - ${{ matrix.workflow.name }} uses: ./.github/workflows/${{ matrix.workflow.file }} with: artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" - + collect-and-deploy: name: Collect Results & Deploy - needs: trigger-and-collect + needs: trigger-workflows runs-on: ubuntu-latest if: always() # Run even if some jobs fail @@ -47,15 +46,10 @@ jobs: - name: Download All Workflow Artifacts run: | - WORKFLOWS='${{ env.WORKFLOWS }}' - for WORKFLOW in $(echo "$WORKFLOWS" | jq -cr '.[] | @base64'); do - _jq() { - echo "$WORKFLOW" | base64 --decode | jq -r "${1}" - } - NAME=$(_jq '.name') + workflows=("labeler" "check_amalgamation" "test_trudag_extensions") + for NAME in "${workflows[@]}"; do ARTIFACT_ID="${NAME}-${{ github.sha }}" - - echo "Downloading artifact for workflow: $NAME" + echo "Downloading artifact for workflow: $NAME (Artifact ID: $ARTIFACT_ID)" mkdir -p artifacts/$NAME gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts for $NAME" done @@ -65,8 +59,8 @@ jobs: echo "Creating deployment package..." mkdir -p deployment echo "Deployment ready - $(date)" > deployment/deployment-info.txt - - # Copy all artifacts to deployment folder + + # Copy artifacts into deployment folder if [[ -d artifacts ]]; then cp -r artifacts/* deployment/ fi From 8b5d9ee2f7fa69610bec7514854c7b14db0d6bb1 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:45:22 +0000 Subject: [PATCH 26/85] dynamic code --- .github/workflows/parent-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 2c8c1c5cca..b2a9152f7b 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -12,7 +12,6 @@ permissions: pages: write pull-requests: write id-token: write - workflows: write jobs: trigger-workflows: From 8fd6d0afc5e6bb1a8278914d249bfb7a5f7cd824 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:48:23 +0000 Subject: [PATCH 27/85] fix dynamic code# --- .github/workflows/parent-workflow.yml | 61 ++++++++++++++++----------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index b2a9152f7b..415ffded65 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,40 +14,51 @@ permissions: id-token: write jobs: - trigger-workflows: - name: Trigger All Workflows + trigger-and-deploy: + name: Trigger and Deploy All Workflows runs-on: ubuntu-latest - strategy: - matrix: - workflow: - - { name: "labeler", file: "labeler.yml" } - - { name: "check_amalgamation", file: "check_amalgamation.yml" } - - { name: "test_trudag_extensions", file: "test_trudag_extensions.yml" } steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Trigger Child Workflow - ${{ matrix.workflow.name }} - uses: ./.github/workflows/${{ matrix.workflow.file }} - with: - artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + - name: Define Workflows + id: define-workflows + run: | + echo "::set-output name=workflows::$(cat < deployment/deployment-info.txt - # Copy artifacts into deployment folder + # Copy all artifacts to deployment folder if [[ -d artifacts ]]; then cp -r artifacts/* deployment/ fi - - name: Upload Deployment Package + - name: Upload Final Deployment Package uses: actions/upload-artifact@v4 with: name: "deployment-package-${{ github.sha }}" From bf9ef6058d243e4edc4668af95abeff03d5f86b8 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:52:46 +0000 Subject: [PATCH 28/85] fix error --- .github/workflows/parent-workflow.yml | 54 +++++++++++++++++++-------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 415ffded65..e1991e7cc2 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,55 +22,79 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Define Workflows + - name: Save Workflows to Environment id: define-workflows run: | - echo "::set-output name=workflows::$(cat <> $GITHUB_ENV - - name: Trigger Workflows Dynamically + - name: Trigger Workflows Dynamically and Track Results id: trigger run: | - workflows='${{ steps.define-workflows.outputs.workflows }}' + workflows="$WORKFLOWS" + results=() + echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') FILE=$(echo "$workflow" | jq -r '.file') ARTIFACT_ID="${NAME}-${GITHUB_SHA}" + + echo "Triggering workflow: $NAME (file: $FILE, artifact ID: $ARTIFACT_ID)" + RUN_ID=$(gh workflow run "./.github/workflows/$FILE" -F artifact_id="${ARTIFACT_ID}" --json id -q '.id') - echo "Triggering workflow: $NAME from file: $FILE with artifact ID: $ARTIFACT_ID" - gh workflow run "./.github/workflows/$FILE" -F artifact_id="${ARTIFACT_ID}" || exit 1 + echo "$RUN_ID started for $NAME" + results+=("{\"name\":\"$NAME\",\"run_id\":\"$RUN_ID\"}") done - - name: Wait for Workflows to Complete + echo "::set-output name=workflow-results::$(echo ${results[@]} | jq -c '.')" + + - name: Wait for Workflows and Output Results run: | - echo "Waiting for workflows to complete..." - sleep 20 # Optional step to wait or add smarter polling based on workflow state + workflow_results='${{ steps.trigger.outputs.workflow-results }}' + echo "$workflow_results" | jq -c '.[]' | while read -r result; do + NAME=$(echo "$result" | jq -r '.name') + RUN_ID=$(echo "$result" | jq -r '.run_id') + + echo "Checking status for $NAME workflow..." + STATUS="" + while [[ "$STATUS" != "completed" ]]; do + STATUS=$(gh run view "$RUN_ID" --json status -q '.status') + [[ "$STATUS" == "completed" ]] || sleep 10 + done + + CONCLUSION=$(gh run view "$RUN_ID" --json conclusion -q '.conclusion') + if [[ "$CONCLUSION" == "success" ]]; then + echo "✅ Workflow $NAME completed successfully." + else + echo "❌ Workflow $NAME failed with status: $CONCLUSION" + fi + done - name: Download All Workflow Artifacts run: | - workflows='${{ steps.define-workflows.outputs.workflows }}' + workflows="$WORKFLOWS" echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') ARTIFACT_ID="${NAME}-${GITHUB_SHA}" echo "Downloading artifact for workflow: $NAME (Artifact ID: $ARTIFACT_ID)" mkdir -p artifacts/$NAME - gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts for $NAME" + gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts found for $NAME" done - name: Create Deployment Package run: | echo "Creating deployment package..." mkdir -p deployment - echo "Deployment ready - $(date)" > deployment/deployment-info.txt + echo "Deployment created at $(date)" >> deployment/deployment-info.txt - # Copy all artifacts to deployment folder + # Consolidate artifacts into deployment folder if [[ -d artifacts ]]; then cp -r artifacts/* deployment/ fi @@ -85,4 +109,4 @@ jobs: run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" + echo "✅ Deployment completed successfully!" \ No newline at end of file From 66110b14df64b399261f3d609c9f7ef052928d20 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:54:46 +0000 Subject: [PATCH 29/85] fix error --- .github/workflows/parent-workflow.yml | 54 ++++++++------------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index e1991e7cc2..415ffded65 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,79 +22,55 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Save Workflows to Environment + - name: Define Workflows id: define-workflows run: | - echo "WORKFLOWS=$(cat <> $GITHUB_ENV + )" - - name: Trigger Workflows Dynamically and Track Results + - name: Trigger Workflows Dynamically id: trigger run: | - workflows="$WORKFLOWS" - results=() - + workflows='${{ steps.define-workflows.outputs.workflows }}' echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') FILE=$(echo "$workflow" | jq -r '.file') ARTIFACT_ID="${NAME}-${GITHUB_SHA}" - - echo "Triggering workflow: $NAME (file: $FILE, artifact ID: $ARTIFACT_ID)" - RUN_ID=$(gh workflow run "./.github/workflows/$FILE" -F artifact_id="${ARTIFACT_ID}" --json id -q '.id') - echo "$RUN_ID started for $NAME" - results+=("{\"name\":\"$NAME\",\"run_id\":\"$RUN_ID\"}") + echo "Triggering workflow: $NAME from file: $FILE with artifact ID: $ARTIFACT_ID" + gh workflow run "./.github/workflows/$FILE" -F artifact_id="${ARTIFACT_ID}" || exit 1 done - echo "::set-output name=workflow-results::$(echo ${results[@]} | jq -c '.')" - - - name: Wait for Workflows and Output Results + - name: Wait for Workflows to Complete run: | - workflow_results='${{ steps.trigger.outputs.workflow-results }}' - echo "$workflow_results" | jq -c '.[]' | while read -r result; do - NAME=$(echo "$result" | jq -r '.name') - RUN_ID=$(echo "$result" | jq -r '.run_id') - - echo "Checking status for $NAME workflow..." - STATUS="" - while [[ "$STATUS" != "completed" ]]; do - STATUS=$(gh run view "$RUN_ID" --json status -q '.status') - [[ "$STATUS" == "completed" ]] || sleep 10 - done - - CONCLUSION=$(gh run view "$RUN_ID" --json conclusion -q '.conclusion') - if [[ "$CONCLUSION" == "success" ]]; then - echo "✅ Workflow $NAME completed successfully." - else - echo "❌ Workflow $NAME failed with status: $CONCLUSION" - fi - done + echo "Waiting for workflows to complete..." + sleep 20 # Optional step to wait or add smarter polling based on workflow state - name: Download All Workflow Artifacts run: | - workflows="$WORKFLOWS" + workflows='${{ steps.define-workflows.outputs.workflows }}' echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') ARTIFACT_ID="${NAME}-${GITHUB_SHA}" echo "Downloading artifact for workflow: $NAME (Artifact ID: $ARTIFACT_ID)" mkdir -p artifacts/$NAME - gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts found for $NAME" + gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts for $NAME" done - name: Create Deployment Package run: | echo "Creating deployment package..." mkdir -p deployment - echo "Deployment created at $(date)" >> deployment/deployment-info.txt + echo "Deployment ready - $(date)" > deployment/deployment-info.txt - # Consolidate artifacts into deployment folder + # Copy all artifacts to deployment folder if [[ -d artifacts ]]; then cp -r artifacts/* deployment/ fi @@ -109,4 +85,4 @@ jobs: run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" \ No newline at end of file + echo "✅ Deployment completed successfully!" From 680efaaf3b600c97991f790e112ac4ba2b8dc943 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 16:56:45 +0000 Subject: [PATCH 30/85] fix error --- .github/workflows/parent-workflow.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 415ffded65..b1f0aed284 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -19,25 +19,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout Repository uses: actions/checkout@v4 - name: Define Workflows id: define-workflows run: | - echo "::set-output name=workflows::$(cat <> $GITHUB_ENV - name: Trigger Workflows Dynamically id: trigger run: | - workflows='${{ steps.define-workflows.outputs.workflows }}' + workflows="$WORKFLOWS" echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') FILE=$(echo "$workflow" | jq -r '.file') @@ -50,11 +50,11 @@ jobs: - name: Wait for Workflows to Complete run: | echo "Waiting for workflows to complete..." - sleep 20 # Optional step to wait or add smarter polling based on workflow state + sleep 20 # Optionally replace this with smarter polling logic - name: Download All Workflow Artifacts run: | - workflows='${{ steps.define-workflows.outputs.workflows }}' + workflows="$WORKFLOWS" echo "$workflows" | jq -c '.[]' | while read -r workflow; do NAME=$(echo "$workflow" | jq -r '.name') ARTIFACT_ID="${NAME}-${GITHUB_SHA}" From 4b3a892ebb87ce9d4375008c3425479569db0a11 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:02:28 +0000 Subject: [PATCH 31/85] use matrix --- .github/workflows/parent-workflow.yml | 90 +++++++++++++-------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index b1f0aed284..44ebe7fbc7 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,8 +1,8 @@ name: Parent Workflow -on: +on: pull_request: - push: + push: branches: - develop - main @@ -14,74 +14,72 @@ permissions: id-token: write jobs: - trigger-and-deploy: - name: Trigger and Deploy All Workflows + child-workflows: + name: Run Child Workflows runs-on: ubuntu-latest + strategy: + matrix: + workflow: + - { name: "labeler", path: ".github/workflows/labeler.yml" } + - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } + - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } + steps: + - name: Trigger ${{ matrix.workflow.name }} Workflow + uses: ${{ matrix.workflow.path }} + with: + artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + + collect-and-deploy: + name: "Collect Results & Deploy" + needs: child-workflows + runs-on: ubuntu-latest + if: always() # Run even if some jobs fail steps: - - name: Checkout Repository + - name: Checkout code uses: actions/checkout@v4 - - name: Define Workflows - id: define-workflows + - name: Check child workflow results run: | - echo "WORKFLOWS=$(jq -c . <> $GITHUB_ENV - - - name: Trigger Workflows Dynamically - id: trigger - run: | - workflows="$WORKFLOWS" - echo "$workflows" | jq -c '.[]' | while read -r workflow; do - NAME=$(echo "$workflow" | jq -r '.name') - FILE=$(echo "$workflow" | jq -r '.file') - ARTIFACT_ID="${NAME}-${GITHUB_SHA}" - - echo "Triggering workflow: $NAME from file: $FILE with artifact ID: $ARTIFACT_ID" - gh workflow run "./.github/workflows/$FILE" -F artifact_id="${ARTIFACT_ID}" || exit 1 + echo "=== Child Workflow Results ===" + for workflow in labeler check_amalgamation test_trudag_extensions; do + echo "${workflow} workflow: ${{ needs.child-workflows.outputs[workflow].result }}" + done + echo "================================" + + for workflow in labeler check_amalgamation test_trudag_extensions; do + if [[ "${{ needs.child-workflows.outputs[workflow].result }}" != "success" ]]; then + echo "❌ One or more child workflows failed" + exit 1 + fi done - - name: Wait for Workflows to Complete - run: | - echo "Waiting for workflows to complete..." - sleep 20 # Optionally replace this with smarter polling logic - - - name: Download All Workflow Artifacts - run: | - workflows="$WORKFLOWS" - echo "$workflows" | jq -c '.[]' | while read -r workflow; do - NAME=$(echo "$workflow" | jq -r '.name') - ARTIFACT_ID="${NAME}-${GITHUB_SHA}" + echo "✅ Child workflows completed successfully!" - echo "Downloading artifact for workflow: $NAME (Artifact ID: $ARTIFACT_ID)" - mkdir -p artifacts/$NAME - gh run download --name "$ARTIFACT_ID" --dir "artifacts/$NAME" || echo "⚠️ No artifacts for $NAME" - done + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: "${{ matrix.workflow.name }}-${{ github.sha }}" + path: artifacts/ - - name: Create Deployment Package + - name: Create deployment package run: | echo "Creating deployment package..." mkdir -p deployment echo "Deployment ready - $(date)" > deployment/deployment-info.txt - + # Copy all artifacts to deployment folder if [[ -d artifacts ]]; then cp -r artifacts/* deployment/ fi - - name: Upload Final Deployment Package + - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: name: "deployment-package-${{ github.sha }}" path: deployment/ - - name: Deployment Simulation + - name: Deployment simulation run: | echo "🚀 Simulating deployment..." sleep 2 From 71731a37c13e2f37570caa9dc989d5900198036c Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:03:48 +0000 Subject: [PATCH 32/85] use matrix --- .github/workflows/parent-workflow.yml | 113 +++++++++++++++++++------- 1 file changed, 83 insertions(+), 30 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 44ebe7fbc7..e7871e9daf 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -23,64 +23,117 @@ jobs: - { name: "labeler", path: ".github/workflows/labeler.yml" } - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } + outputs: + results: ${{ steps.collect.results }} + steps: + - name: Trigger Child Workflow - Run ${{ matrix.workflow.name }} + uses: ${{ matrix.workflow.path }} + with: + artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + + # Collect outputs at runtime + - name: Collect Workflow Results + id: collect + run: echo '{"result": "success"}' # Example placeholder + env: + WORKFLOW_NAME: ${{ matrix.workflow.name }} + + collect-and-deploy: + name: "Collect Results & Deploy" + needs: [child-workflowsCleaning enjoyable expandable assistance +Apologies for the interruptions earlier! Let’s finalize the **dynamic GitHub Actions workflow** with proper references and ensure all issues are addressed. + +--- + +### Final and Correct Version: `parent-workflow.yml` + +```yaml +name: Parent Workflow + +on: + pull_request: + push: + branches: + - develop + - main + +permissions: + contents: write + pages: write + pull-requests: write + id-token: write + +jobs: + child-workflows: + name: Run Child Workflows + runs-on: ubuntu-latest + strategy: + matrix: + workflow: + - { name: "labeler", path: ".github/workflows/labeler.yml" } + - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } + - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } + outputs: + results: ${{ steps.collect-results.outputs.results }} steps: - name: Trigger ${{ matrix.workflow.name }} Workflow uses: ${{ matrix.workflow.path }} with: artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + id: trigger-workflow + + - name: Collect Workflow Results + id: collect-results + run: echo '{"${{ matrix.workflow.name }}": "${{ job.status }}"}' > results.json + env: + JOB_STATUS: ${{ job.status }} + outputs: + results: ${{ steps.collect-results.outputs.results }} collect-and-deploy: name: "Collect Results & Deploy" needs: child-workflows runs-on: ubuntu-latest - if: always() # Run even if some jobs fail - steps: - name: Checkout code uses: actions/checkout@v4 - - name: Check child workflow results + - name: Display Workflow Results run: | echo "=== Child Workflow Results ===" - for workflow in labeler check_amalgamation test_trudag_extensions; do - echo "${workflow} workflow: ${{ needs.child-workflows.outputs[workflow].result }}" - done + echo "${{ needs.child-workflows.outputs.results }}" echo "================================" - + # Example check (all child workflows must pass) + if [[ "${{ needs.child-workflows.outputs.results }}" != *"success"* ]]; then + echo "❌ One or more workflows failed!" + exit 1 + else + echo "✅ All workflows succeeded!" + fi + + - name: Download Artifacts for All Workflows + run: | for workflow in labeler check_amalgamation test_trudag_extensions; do - if [[ "${{ needs.child-workflows.outputs[workflow].result }}" != "success" ]]; then - echo "❌ One or more child workflows failed" - exit 1 - fi + echo "Downloading artifact for $workflow" + mkdir -p artifacts/$workflow + curl -O "actions/download-artifact" done - echo "✅ Child workflows completed successfully!" - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: "${{ matrix.workflow.name }}-${{ github.sha }}" - path: artifacts/ - - - name: Create deployment package + - name: Create Deployment Package run: | - echo "Creating deployment package..." mkdir -p deployment - echo "Deployment ready - $(date)" > deployment/deployment-info.txt - - # Copy all artifacts to deployment folder - if [[ -d artifacts ]]; then - cp -r artifacts/* deployment/ - fi + echo "Preparing deployment artifacts..." + cp -r artifacts/* deployment/ + echo "Deployment ready at $(date)" > deployment/deployment-info.txt - - name: Upload final deployment artifact + - name: Upload Deployment Package uses: actions/upload-artifact@v4 with: name: "deployment-package-${{ github.sha }}" path: deployment/ - - name: Deployment simulation + - name: Deployment Simulation run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" + echo "✅ Deployment successful!" From 6bedf2d3eedd4924e3fd1620da6997b4c44c6532 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:04:50 +0000 Subject: [PATCH 33/85] fix error --- .github/workflows/parent-workflow.yml | 50 --------------------------- 1 file changed, 50 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index e7871e9daf..f927633876 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,55 +1,5 @@ name: Parent Workflow -on: - pull_request: - push: - branches: - - develop - - main - -permissions: - contents: write - pages: write - pull-requests: write - id-token: write - -jobs: - child-workflows: - name: Run Child Workflows - runs-on: ubuntu-latest - strategy: - matrix: - workflow: - - { name: "labeler", path: ".github/workflows/labeler.yml" } - - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } - - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } - outputs: - results: ${{ steps.collect.results }} - steps: - - name: Trigger Child Workflow - Run ${{ matrix.workflow.name }} - uses: ${{ matrix.workflow.path }} - with: - artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" - - # Collect outputs at runtime - - name: Collect Workflow Results - id: collect - run: echo '{"result": "success"}' # Example placeholder - env: - WORKFLOW_NAME: ${{ matrix.workflow.name }} - - collect-and-deploy: - name: "Collect Results & Deploy" - needs: [child-workflowsCleaning enjoyable expandable assistance -Apologies for the interruptions earlier! Let’s finalize the **dynamic GitHub Actions workflow** with proper references and ensure all issues are addressed. - ---- - -### Final and Correct Version: `parent-workflow.yml` - -```yaml -name: Parent Workflow - on: pull_request: push: From 34275d00fe757c270647101f2b28ed8f3ef548a5 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:05:37 +0000 Subject: [PATCH 34/85] fix error --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index f927633876..fe25520cac 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -34,7 +34,7 @@ jobs: - name: Collect Workflow Results id: collect-results - run: echo '{"${{ matrix.workflow.name }}": "${{ job.status }}"}' > results.json + run: echo '{"${{ matrix.workflow.name }}" "${{ job.status }}"}' > results.json env: JOB_STATUS: ${{ job.status }} outputs: From 0016fa0b4e0654d8eb460623a41c08850f6ab6bd Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:06:38 +0000 Subject: [PATCH 35/85] fix error --- .github/workflows/parent-workflow.yml | 63 +++++++++++++-------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index fe25520cac..8d13f334e3 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -14,67 +14,66 @@ permissions: id-token: write jobs: + # Dynamically run all child workflows child-workflows: name: Run Child Workflows runs-on: ubuntu-latest strategy: matrix: workflow: + # Define workflows to trigger - { name: "labeler", path: ".github/workflows/labeler.yml" } - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } - outputs: - results: ${{ steps.collect-results.outputs.results }} steps: - name: Trigger ${{ matrix.workflow.name }} Workflow - uses: ${{ matrix.workflow.path }} + uses: ./${{ matrix.workflow.path }} with: artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" - id: trigger-workflow - - - name: Collect Workflow Results - id: collect-results - run: echo '{"${{ matrix.workflow.name }}" "${{ job.status }}"}' > results.json - env: - JOB_STATUS: ${{ job.status }} - outputs: - results: ${{ steps.collect-results.outputs.results }} + # Collect results and deploy collect-and-deploy: - name: "Collect Results & Deploy" - needs: child-workflows + name: Collect Results & Deploy + needs: + - child-workflows runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 + # This will summarize the results of each child workflow triggered dynamically - name: Display Workflow Results run: | - echo "=== Child Workflow Results ===" - echo "${{ needs.child-workflows.outputs.results }}" - echo "================================" - # Example check (all child workflows must pass) - if [[ "${{ needs.child-workflows.outputs.results }}" != *"success"* ]]; then - echo "❌ One or more workflows failed!" + echo "Checking results from matrix child workflows..." + RESULTS_SUCCESS=true + for result in ${{ toJson(needs.child-workflows.result) }}; do + echo "Child workflow: $result" + if [[ "$result" != "success" ]]; then + echo "❌ A child workflow failed." + RESULTS_SUCCESS=false + fi + done + + if [[ "$RESULTS_SUCCESS" == "false" ]]; then exit 1 - else - echo "✅ All workflows succeeded!" fi - name: Download Artifacts for All Workflows run: | - for workflow in labeler check_amalgamation test_trudag_extensions; do - echo "Downloading artifact for $workflow" - mkdir -p artifacts/$workflow - curl -O "actions/download-artifact" + echo "Downloading generated artifacts..." + mkdir -p artifacts + for workflow_name in labeler check_amalgamation test_trudag_extensions; do + echo "Downloading artifact for $workflow_name" + mkdir -p artifacts/$workflow_name + curl -O "" done - name: Create Deployment Package run: | + echo "Creating deployment package..." mkdir -p deployment - echo "Preparing deployment artifacts..." cp -r artifacts/* deployment/ - echo "Deployment ready at $(date)" > deployment/deployment-info.txt + echo "Deployment package prepared at $(date)" > deployment/deployment-info.txt - name: Upload Deployment Package uses: actions/upload-artifact@v4 @@ -82,8 +81,8 @@ jobs: name: "deployment-package-${{ github.sha }}" path: deployment/ - - name: Deployment Simulation + - name: Run Deployment Simulation run: | - echo "🚀 Simulating deployment..." - sleep 2 - echo "✅ Deployment successful!" + echo "Running deployment simulation..." + sleep 3 + echo "✅ Deployment complete!" From 512bd202c14c699f4913285d9f5d190fb980ee90 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Mon, 4 Aug 2025 17:13:33 +0000 Subject: [PATCH 36/85] fix error --- .github/workflows/parent-workflow.yml | 88 +++++++++++++-------------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 8d13f334e3..84f2da6375 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,8 +1,8 @@ name: Parent Workflow -on: +on: pull_request: - push: + push: branches: - develop - main @@ -14,75 +14,69 @@ permissions: id-token: write jobs: - # Dynamically run all child workflows - child-workflows: - name: Run Child Workflows - runs-on: ubuntu-latest + child_workflows: + name: Run ${{ matrix.name }} Workflow strategy: matrix: - workflow: - # Define workflows to trigger - - { name: "labeler", path: ".github/workflows/labeler.yml" } - - { name: "check_amalgamation", path: ".github/workflows/check_amalgamation.yml" } - - { name: "test_trudag_extensions", path: ".github/workflows/test_trudag_extensions.yml" } - steps: - - name: Trigger ${{ matrix.workflow.name }} Workflow - uses: ./${{ matrix.workflow.path }} - with: - artifact_id: "${{ matrix.workflow.name }}-${{ github.sha }}" + include: + - name: labeler + workflow: labeler.yml + - name: check_amalgamation + workflow: check_amalgamation.yml + - name: test_trudag_extensions + workflow: test_trudag_extensions.yml + uses: ./.github/workflows/${{ matrix.workflow }} + with: + artifact_id: "${{ matrix.name }}-${{ github.sha }}" + secrets: inherit - # Collect results and deploy collect-and-deploy: - name: Collect Results & Deploy - needs: - - child-workflows + name: "Collect Results & Deploy" + needs: [child_workflows] runs-on: ubuntu-latest + if: always() + steps: - name: Checkout code uses: actions/checkout@v4 - # This will summarize the results of each child workflow triggered dynamically - - name: Display Workflow Results + - name: Check child workflow results run: | - echo "Checking results from matrix child workflows..." - RESULTS_SUCCESS=true - for result in ${{ toJson(needs.child-workflows.result) }}; do - echo "Child workflow: $result" + echo "=== Child Workflow Results ===" + for job in labeler check_amalgamation test_trudag_extensions; do + result="${{ needs.child_workflows.outputs['${job}'] }}" + echo "$job workflow: $result" if [[ "$result" != "success" ]]; then - echo "❌ A child workflow failed." - RESULTS_SUCCESS=false + echo "❌ $job failed" + exit 1 fi done + echo "✅ All workflows succeeded" - if [[ "$RESULTS_SUCCESS" == "false" ]]; then - exit 1 - fi - - - name: Download Artifacts for All Workflows + - name: Download Artifacts run: | - echo "Downloading generated artifacts..." - mkdir -p artifacts - for workflow_name in labeler check_amalgamation test_trudag_extensions; do - echo "Downloading artifact for $workflow_name" - mkdir -p artifacts/$workflow_name - curl -O "" + mkdir -p artifacts/ + for job in labeler check_amalgamation test_trudag_extensions; do + echo "Downloading artifact for $job" + gh run download --name "${job}-${GITHUB_SHA}" --dir artifacts/ done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create Deployment Package + - name: Create deployment package run: | - echo "Creating deployment package..." mkdir -p deployment + echo "Deployment ready - $(date)" > deployment/deployment-info.txt cp -r artifacts/* deployment/ - echo "Deployment package prepared at $(date)" > deployment/deployment-info.txt - - name: Upload Deployment Package + - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: name: "deployment-package-${{ github.sha }}" path: deployment/ - - name: Run Deployment Simulation + - name: Deployment simulation run: | - echo "Running deployment simulation..." - sleep 3 - echo "✅ Deployment complete!" + echo "🚀 Simulating deployment..." + sleep 2 + echo "✅ Deployment completed successfully!" From 56f91ff85f020c3e78ec2634115e873c71820143 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:32:23 +0000 Subject: [PATCH 37/85] matrix method --- .github/workflows/parent-workflow.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 84f2da6375..9cccae7237 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -18,13 +18,7 @@ jobs: name: Run ${{ matrix.name }} Workflow strategy: matrix: - include: - - name: labeler - workflow: labeler.yml - - name: check_amalgamation - workflow: check_amalgamation.yml - - name: test_trudag_extensions - workflow: test_trudag_extensions.yml + target: [labeler.yml, check_amalgamation.yml, test_trudag_extensions.yml] uses: ./.github/workflows/${{ matrix.workflow }} with: artifact_id: "${{ matrix.name }}-${{ github.sha }}" @@ -52,7 +46,6 @@ jobs: fi done echo "✅ All workflows succeeded" - - name: Download Artifacts run: | mkdir -p artifacts/ @@ -68,7 +61,6 @@ jobs: mkdir -p deployment echo "Deployment ready - $(date)" > deployment/deployment-info.txt cp -r artifacts/* deployment/ - - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: @@ -79,4 +71,4 @@ jobs: run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" + echo "✅ Deployment completed successfully!" \ No newline at end of file From 5a8d85a707544b4b93f37be95d26ee1718bc2c89 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:34:20 +0000 Subject: [PATCH 38/85] fix error --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 9cccae7237..055f4f37fb 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: target: [labeler.yml, check_amalgamation.yml, test_trudag_extensions.yml] - uses: ./.github/workflows/${{ matrix.workflow }} + uses: ./.github/workflows/${{ matrix.target }} with: artifact_id: "${{ matrix.name }}-${{ github.sha }}" secrets: inherit From 4933a988019bbeb09929b51447336244fce104bb Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:41:33 +0000 Subject: [PATCH 39/85] fix error --- .github/workflows/parent-workflow.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 055f4f37fb..b2bf6b8374 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -15,14 +15,16 @@ permissions: jobs: child_workflows: - name: Run ${{ matrix.name }} Workflow + runs-on: ubuntu-latest strategy: matrix: target: [labeler.yml, check_amalgamation.yml, test_trudag_extensions.yml] - uses: ./.github/workflows/${{ matrix.target }} - with: - artifact_id: "${{ matrix.name }}-${{ github.sha }}" - secrets: inherit + steps: + - name: run child workflows + - uses: ./.github/workflows/${{ matrix.target }} + - with: + artifact_id: "${{ matrix.name }}-${{ github.sha }}" + - secrets: inherit collect-and-deploy: name: "Collect Results & Deploy" From 9a6baefff23f27b60561a6d946f8813e495f6c79 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:47:17 +0000 Subject: [PATCH 40/85] fix errors --- .github/workflows/parent-workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index b2bf6b8374..ff3d5b0cc5 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -20,11 +20,11 @@ jobs: matrix: target: [labeler.yml, check_amalgamation.yml, test_trudag_extensions.yml] steps: - - name: run child workflows - - uses: ./.github/workflows/${{ matrix.target }} - - with: - artifact_id: "${{ matrix.name }}-${{ github.sha }}" - - secrets: inherit + - name: Run child workflows + uses: ./.github/workflows/${{ matrix.target }}.yml + with: + artifact_id: "${{ matrix.target }}-${{ github.sha }}" + collect-and-deploy: name: "Collect Results & Deploy" From c2faa0dfdf627be522804e3395690307b2f143fd Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:49:52 +0000 Subject: [PATCH 41/85] fix errors --- .github/workflows/parent-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index ff3d5b0cc5..5409b5f911 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -18,9 +18,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - target: [labeler.yml, check_amalgamation.yml, test_trudag_extensions.yml] + target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows + run: echo "${{ matrix.target }}" uses: ./.github/workflows/${{ matrix.target }}.yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From 131615de1b2f8f99e445a3902016ccdc6d0f17f2 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:50:45 +0000 Subject: [PATCH 42/85] fix errors --- .github/workflows/parent-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 5409b5f911..09a554aeee 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,9 +22,7 @@ jobs: steps: - name: Run child workflows run: echo "${{ matrix.target }}" - uses: ./.github/workflows/${{ matrix.target }}.yml - with: - artifact_id: "${{ matrix.target }}-${{ github.sha }}" + collect-and-deploy: From 1ea53ea83a3365075c3d017da3e4fac494853285 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:54:04 +0000 Subject: [PATCH 43/85] fix errors --- .github/workflows/parent-workflow.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 09a554aeee..dad7974f96 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -21,8 +21,9 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - run: echo "${{ matrix.target }}" - + uses: ./.github/workflows/ ${{ matrix.target }}.yml + with: + artifact_id: "${{ matrix.target }}-${{ github.sha }}" collect-and-deploy: From 172a58b1b482d55b4e536265406e12aa79f6de09 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 07:56:17 +0000 Subject: [PATCH 44/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index dad7974f96..832c152693 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -21,7 +21,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: ./.github/workflows/ ${{ matrix.target }}.yml + uses: ./.github/workflows/"${{ matrix.target }}".yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From da6a8d241144fdbadf5ef5ac108f45b4960b7a3d Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:02:24 +0000 Subject: [PATCH 45/85] fix errors --- .github/workflows/parent-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 832c152693..0ff4e77bee 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -6,6 +6,7 @@ on: branches: - develop - main + - needs_method permissions: contents: write @@ -21,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: ./.github/workflows/"${{ matrix.target }}".yml + uses: "./.github/workflows/${{ matrix.target }}.yml" with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From d1300cb11d97aa27254e292e6b6e9ed8fc15f70f Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:03:20 +0000 Subject: [PATCH 46/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 0ff4e77bee..5839203ecd 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: "./.github/workflows/${{ matrix.target }}.yml" + uses: ./workflows/${{ matrix.target }}.yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From 7ac7d643480135722457254e389db89a97040646 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:03:52 +0000 Subject: [PATCH 47/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 5839203ecd..b23569572c 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: ./workflows/${{ matrix.target }}.yml + uses: ./workflows/${{ matrix12.target }}.yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From e3c0a6e1aaca296df3997612564c58084abbd60e Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:04:26 +0000 Subject: [PATCH 48/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index b23569572c..88e636d502 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: ./workflows/${{ matrix12.target }}.yml + uses: ./workflows/${{ target }}.yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From 1755c2aa5ef2c689005d0d1e75b4dbb9d562e636 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:06:07 +0000 Subject: [PATCH 49/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 88e636d502..e7523ebd2d 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - uses: ./workflows/${{ target }}.yml + run: ./workflows/${{ matrix.target }}.yml with: artifact_id: "${{ matrix.target }}-${{ github.sha }}" From 7e7e7db68e9e825fa98d9a4f752e877de24b1625 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:15:10 +0000 Subject: [PATCH 50/85] fix errors --- .github/workflows/parent-workflow.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index e7523ebd2d..cf072a6e56 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -23,8 +23,6 @@ jobs: steps: - name: Run child workflows run: ./workflows/${{ matrix.target }}.yml - with: - artifact_id: "${{ matrix.target }}-${{ github.sha }}" collect-and-deploy: From b7f74b4afedc192c6ef9a113c1a9af1834f6adb3 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:16:12 +0000 Subject: [PATCH 51/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index cf072a6e56..459da26a90 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -22,7 +22,7 @@ jobs: target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Run child workflows - run: ./workflows/${{ matrix.target }}.yml + run: ./.github/workflows/${{ matrix.target }}.yml collect-and-deploy: From 0904976010fded5ac7a206e4c22f2252db2cdb48 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:25:21 +0000 Subject: [PATCH 52/85] fix errors --- .github/workflows/parent-workflow.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 459da26a90..4372c45ad6 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -19,10 +19,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - target: [labeler, check_amalgamation, test_trudag_extensions] + target: + - { name: "labeler", workflow: "./workflows/labeler.yml" } + - { name: "check_amalgamation", workflow: "./workflows/check_amalgamation.yml" } + - { name: "test_trudag_extensions", workflow: "./workflows/test_trudag_extensions.yml" } steps: - - name: Run child workflows - run: ./.github/workflows/${{ matrix.target }}.yml + - name: Run child workflow + uses: ${{ matrix.target.workflow }} # Dynamically choose a fixed workflow based on the matrix + with: + artifact_id: "${{ matrix.target.name }}-${{ github.sha }}" collect-and-deploy: From 56759facae1168364281028fd51677867896e781 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:27:35 +0000 Subject: [PATCH 53/85] fix errors --- .github/workflows/parent-workflow.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 4372c45ad6..207dbfb3a8 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -15,19 +15,19 @@ permissions: id-token: write jobs: - child_workflows: + trigger_dynamic_workflows: runs-on: ubuntu-latest - strategy: - matrix: - target: - - { name: "labeler", workflow: "./workflows/labeler.yml" } - - { name: "check_amalgamation", workflow: "./workflows/check_amalgamation.yml" } - - { name: "test_trudag_extensions", workflow: "./workflows/test_trudag_extensions.yml" } steps: - - name: Run child workflow - uses: ${{ matrix.target.workflow }} # Dynamically choose a fixed workflow based on the matrix - with: - artifact_id: "${{ matrix.target.name }}-${{ github.sha }}" + - name: Dynamically Trigger Workflow + run: | + targets=("labeler" "check_amalgamation" "test_trudag_extensions") + for target in "${targets[@]}"; do + echo "Triggering $target" + gh workflow run "${target}.yml" --field artifact_id="${target}-${GITHUB_SHA}" + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + collect-and-deploy: From 90e3616d7d78b9e4b3c8a8639a7a3bafad5287a8 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:28:38 +0000 Subject: [PATCH 54/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 207dbfb3a8..d2ab1b0f1e 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -15,7 +15,7 @@ permissions: id-token: write jobs: - trigger_dynamic_workflows: + child_workflows: runs-on: ubuntu-latest steps: - name: Dynamically Trigger Workflow From 21be299c5728713cfa1a2d00b814840a2f442828 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:31:46 +0000 Subject: [PATCH 55/85] fix errors --- .github/workflows/parent-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index d2ab1b0f1e..20e3bccaf8 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -20,10 +20,10 @@ jobs: steps: - name: Dynamically Trigger Workflow run: | - targets=("labeler" "check_amalgamation" "test_trudag_extensions") + targets=("Pull Request Labeler" "Check amalgamation" "Test Trudag extensions") for target in "${targets[@]}"; do echo "Triggering $target" - gh workflow run "${target}.yml" --field artifact_id="${target}-${GITHUB_SHA}" + gh workflow run "${target}" --field artifact_id="${target}-${GITHUB_SHA}" done env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f7034dae65b37a885594d706a35a7b09b684d1ee Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:34:11 +0000 Subject: [PATCH 56/85] fix errors --- .github/workflows/parent-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 20e3bccaf8..14a31c60e4 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -18,6 +18,8 @@ jobs: child_workflows: runs-on: ubuntu-latest steps: + - name: checkout repository + uses: actions/checkout@v4 - name: Dynamically Trigger Workflow run: | targets=("Pull Request Labeler" "Check amalgamation" "Test Trudag extensions") From 129293c8ecc90b2902b2d6c37272acbb23f37295 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:35:12 +0000 Subject: [PATCH 57/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 14a31c60e4..91c7bc3eee 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -28,7 +28,7 @@ jobs: gh workflow run "${target}" --field artifact_id="${target}-${GITHUB_SHA}" done env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} From 73ab5a7cbd8eec272af9dcc0eae169b7127a9421 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:39:44 +0000 Subject: [PATCH 58/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 91c7bc3eee..db289917e9 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -25,7 +25,7 @@ jobs: targets=("Pull Request Labeler" "Check amalgamation" "Test Trudag extensions") for target in "${targets[@]}"; do echo "Triggering $target" - gh workflow run "${target}" --field artifact_id="${target}-${GITHUB_SHA}" + gh workflow run "${target}" --f artifact_id="${target}-${GITHUB_SHA}" done env: GITHUB_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} From 3317b213dd1c0d2bc03f736dc3e8bf71e6d21ccb Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:40:26 +0000 Subject: [PATCH 59/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index db289917e9..cb60920603 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -25,7 +25,7 @@ jobs: targets=("Pull Request Labeler" "Check amalgamation" "Test Trudag extensions") for target in "${targets[@]}"; do echo "Triggering $target" - gh workflow run "${target}" --f artifact_id="${target}-${GITHUB_SHA}" + gh workflow run "${target}" -F artifact_id="${target}-${GITHUB_SHA}" done env: GITHUB_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} From 5a1a2684797359d2d45e5a0657dba48c1afab6f8 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:51:25 +0000 Subject: [PATCH 60/85] fix errors --- .github/workflows/parent-workflow.yml | 85 +++++++++++++++------------ 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index cb60920603..debe0ed442 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -1,12 +1,11 @@ name: Parent Workflow -on: +on: pull_request: - push: + push: branches: - develop - main - - needs_method permissions: contents: write @@ -15,28 +14,33 @@ permissions: id-token: write jobs: - child_workflows: - runs-on: ubuntu-latest - steps: - - name: checkout repository - uses: actions/checkout@v4 - - name: Dynamically Trigger Workflow - run: | - targets=("Pull Request Labeler" "Check amalgamation" "Test Trudag extensions") - for target in "${targets[@]}"; do - echo "Triggering $target" - gh workflow run "${target}" -F artifact_id="${target}-${GITHUB_SHA}" - done - env: - GITHUB_TOKEN: ${{ secrets.PARENT_WORKFLOW_TRIGGER }} + labeler: + name: Run Labeler Workflow + uses: ./.github/workflows/labeler.yml + with: + artifact_id: "labeler-${{ github.sha }}" + check_amalgamation: + name: Run Amalgamation Workflow + uses: ./.github/workflows/check_amalgamation.yml + with: + artifact_id: "amalgamation-${{ github.sha }}" + + test_trudag_extensions: + name: Run Test Trudag Extensions Workflow + uses: ./.github/workflows/test_trudag_extensions.yml + with: + artifact_id: "test_trudag_extensions-${{ github.sha }}" collect-and-deploy: name: "Collect Results & Deploy" - needs: [child_workflows] + needs: [labeler, check_amalgamation, test_trudag_extensions] runs-on: ubuntu-latest - if: always() + if: always() # Run even if some jobs fail + strategy: + matrix: + target: [labeler, check_amalgamation, test_trudag_extensions] steps: - name: Checkout code @@ -45,30 +49,33 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - for job in labeler check_amalgamation test_trudag_extensions; do - result="${{ needs.child_workflows.outputs['${job}'] }}" - echo "$job workflow: $result" - if [[ "$result" != "success" ]]; then - echo "❌ $job failed" - exit 1 - fi - done - echo "✅ All workflows succeeded" - - name: Download Artifacts - run: | - mkdir -p artifacts/ - for job in labeler check_amalgamation test_trudag_extensions; do - echo "Downloading artifact for $job" - gh run download --name "${job}-${GITHUB_SHA}" --dir artifacts/ - done - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + echo "${{ matrix.target }} workflow: ${{ needs.${{ matrix.target }}.result }}" + echo "================================" + + if [[ "${{ needs.${{ matrix.target }}.result }}" != "success" ]] ; then + echo "❌ One or more child workflows failed" + exit 1 + fi + + echo "✅ Child workflows completed successfully!" + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: "${{ matrix.target }}-${{ github.sha }}" + path: artifacts/ - name: Create deployment package run: | + echo "Creating deployment package..." mkdir -p deployment echo "Deployment ready - $(date)" > deployment/deployment-info.txt - cp -r artifacts/* deployment/ + + # Copy all artifacts to deployment folder + if [[ -d artifacts ]]; then + cp -r artifacts/* deployment/ + fi + - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: @@ -79,4 +86,4 @@ jobs: run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" \ No newline at end of file + echo "✅ Deployment completed successfully!" From 3aa9a532a69300a2f7925639bafb1d361dfcbf48 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:52:30 +0000 Subject: [PATCH 61/85] fix errors --- .github/workflows/parent-workflow.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index debe0ed442..08d0ad7db0 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -49,10 +49,13 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "${{ matrix.target }} workflow: ${{ needs.${{ matrix.target }}.result }}" + echo "${{ matrix.target }} workflow: ${{ needs.result }}" echo "================================" - if [[ "${{ needs.${{ matrix.target }}.result }}" != "success" ]] ; then + if [[ "${{ needs.labeler.result }}" != "success" ]] || \ + [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ + [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] + ; then echo "❌ One or more child workflows failed" exit 1 fi From a9816ae30896da2b29264c3e0f6d4bd077a75243 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:54:59 +0000 Subject: [PATCH 62/85] fix errors --- .github/workflows/parent-workflow.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 08d0ad7db0..33e018bd8d 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -52,10 +52,7 @@ jobs: echo "${{ matrix.target }} workflow: ${{ needs.result }}" echo "================================" - if [[ "${{ needs.labeler.result }}" != "success" ]] || \ - [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ - [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] - ; then + if [[ "${{ needs.result }}" != "success" ]] ; then echo "❌ One or more child workflows failed" exit 1 fi From 93dc263f01ff896361d8f88fe7738cceca38c7a7 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 08:57:11 +0000 Subject: [PATCH 63/85] fix errors --- .github/workflows/parent-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 33e018bd8d..54e1248c18 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -49,10 +49,10 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "${{ matrix.target }} workflow: ${{ needs.result }}" + echo "${{ matrix.target }} workflow: ${{ needs.labeler.result }}" echo "================================" - if [[ "${{ needs.result }}" != "success" ]] ; then + if [[ "${{ needs.labeler.result }}" != "success" ]] ; then echo "❌ One or more child workflows failed" exit 1 fi From c2d5fee75826ced83971703505890175715ea5d8 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:00:26 +0000 Subject: [PATCH 64/85] fix errors --- .github/workflows/parent-workflow.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 54e1248c18..993434ff75 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -49,10 +49,14 @@ jobs: - name: Check child workflow results run: | echo "=== Child Workflow Results ===" - echo "${{ matrix.target }} workflow: ${{ needs.labeler.result }}" + echo "Labeler workflow: ${{ needs.labeler.result }}" + echo "Amalgamation workflow: ${{ needs.check_amalgamation.result }}" + echo "Test Trudag Extensions workflow: ${{ needs.test_trudag_extensions.result }}" echo "================================" - if [[ "${{ needs.labeler.result }}" != "success" ]] ; then + if [[ "${{ needs.labeler.result }}" != "success" ]] || \ + [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ + [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] ; then echo "❌ One or more child workflows failed" exit 1 fi From 652d8251fa374965a436880cae626bf955774f37 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:05:13 +0000 Subject: [PATCH 65/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 993434ff75..4a02d4ab00 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -6,7 +6,7 @@ on: branches: - develop - main - +#test permissions: contents: write pages: write From 34c7cce6f096b2926c775fdec06daa917106879d Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:08:05 +0000 Subject: [PATCH 66/85] fix errors --- .github/workflows/parent-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 4a02d4ab00..e1ec654589 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -2,10 +2,10 @@ name: Parent Workflow on: pull_request: - push: - branches: - - develop - - main + #push: + # branches: + # - develop + # - main #test permissions: contents: write From a2566fda8810a90c98d3fa5f2f56b42cadc88e62 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:12:02 +0000 Subject: [PATCH 67/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index e1ec654589..6c9d7e2928 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -83,7 +83,7 @@ jobs: - name: Upload final deployment artifact uses: actions/upload-artifact@v4 with: - name: "deployment-package-${{ github.sha }}" + name: "deployment-package-${{ github.sha }}-${{ matrix.target }}" path: deployment/ - name: Deployment simulation From d65355fb5ca9972a34ffabe850ec3f1014eea98e Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:16:30 +0000 Subject: [PATCH 68/85] fix errors --- .github/workflows/check_amalgamation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_amalgamation.yml b/.github/workflows/check_amalgamation.yml index 36ad95340d..9cd5bb1c51 100644 --- a/.github/workflows/check_amalgamation.yml +++ b/.github/workflows/check_amalgamation.yml @@ -83,11 +83,11 @@ jobs: - name: Generate amalgamation artifact run: | echo "Generating amalgamation artifact..." - mkdir -p amalgamation - echo "Amalgamation processed for ${{ inputs.artifact_id }}" > amalgamation/amalgamation.txt + mkdir -p check_amalgamation + echo "Amalgamation processed for ${{ inputs.artifact_id }}" > check_amalgamation/check_amalgamation.txt - name: Upload amalgamation artifact uses: actions/upload-artifact@v4 with: name: ${{ inputs.artifact_id }} - path: amalgamation/ \ No newline at end of file + path: check_amalgamation/ \ No newline at end of file From 279a299105de3333e6ddcb0513146fd1a82af261 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:20:03 +0000 Subject: [PATCH 69/85] fix errors --- .github/workflows/parent-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 6c9d7e2928..33a936ccb1 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -24,7 +24,7 @@ jobs: name: Run Amalgamation Workflow uses: ./.github/workflows/check_amalgamation.yml with: - artifact_id: "amalgamation-${{ github.sha }}" + artifact_id: "check_amalgamation-${{ github.sha }}" test_trudag_extensions: name: Run Test Trudag Extensions Workflow @@ -91,3 +91,4 @@ jobs: echo "🚀 Simulating deployment..." sleep 2 echo "✅ Deployment completed successfully!" +check_amalgamation-e571c9d4d883472b91f1053ffb1e8d3950f3f168 \ No newline at end of file From 375597ee43f920bb001a081bdbea3c2cd7adc28c Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:20:29 +0000 Subject: [PATCH 70/85] fix errors --- .github/workflows/parent-workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 33a936ccb1..eeab42d52e 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -90,5 +90,4 @@ jobs: run: | echo "🚀 Simulating deployment..." sleep 2 - echo "✅ Deployment completed successfully!" -check_amalgamation-e571c9d4d883472b91f1053ffb1e8d3950f3f168 \ No newline at end of file + echo "✅ Deployment completed successfully!" \ No newline at end of file From 5201603d3e7e281d444f5754981d0658722d7abf Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:27:09 +0000 Subject: [PATCH 71/85] fix errors --- .github/workflows/parent-workflow.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index eeab42d52e..adc6c266b0 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -69,23 +69,6 @@ jobs: name: "${{ matrix.target }}-${{ github.sha }}" path: artifacts/ - - name: Create deployment package - run: | - echo "Creating deployment package..." - mkdir -p deployment - echo "Deployment ready - $(date)" > deployment/deployment-info.txt - - # Copy all artifacts to deployment folder - if [[ -d artifacts ]]; then - cp -r artifacts/* deployment/ - fi - - - name: Upload final deployment artifact - uses: actions/upload-artifact@v4 - with: - name: "deployment-package-${{ github.sha }}-${{ matrix.target }}" - path: deployment/ - - name: Deployment simulation run: | echo "🚀 Simulating deployment..." From 94f53346719ee1172bd6e235b73320d6a800a2a9 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:40:09 +0000 Subject: [PATCH 72/85] fix errors --- .github/workflows/parent-workflow.yml | 20 +++++++++----------- .github/workflows/test_trudag_extensions.yml | 3 +++ TSF/docs/index.rst | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index adc6c266b0..64b4fa4e60 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -46,20 +46,18 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Check child workflow results + - name: Check child workflow results run: | - echo "=== Child Workflow Results ===" - echo "Labeler workflow: ${{ needs.labeler.result }}" - echo "Amalgamation workflow: ${{ needs.check_amalgamation.result }}" - echo "Test Trudag Extensions workflow: ${{ needs.test_trudag_extensions.result }}" - echo "================================" - - if [[ "${{ needs.labeler.result }}" != "success" ]] || \ - [[ "${{ needs.check_amalgamation.result }}" != "success" ]] || \ - [[ "${{ needs.test_trudag_extensions.result }}" != "success" ]] ; then - echo "❌ One or more child workflows failed" + echo "=== Checking Child Workflow Results ===" + result="${{ needs[matrix.target].result }}" + echo "${{ matrix.target }} workflow result: $result" + + if [[ "$result" != "success" ]]; then + echo "❌ ${{ matrix.target }} workflow failed! Exiting..." exit 1 fi + env: + current_workflow: ${{ matrix.target }} echo "✅ Child workflows completed successfully!" diff --git a/.github/workflows/test_trudag_extensions.yml b/.github/workflows/test_trudag_extensions.yml index 6cbba91b84..f7cb879064 100644 --- a/.github/workflows/test_trudag_extensions.yml +++ b/.github/workflows/test_trudag_extensions.yml @@ -10,6 +10,9 @@ on: push: branches: [ main ] +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest diff --git a/TSF/docs/index.rst b/TSF/docs/index.rst index 0d79ec02ac..199bf9900a 100644 --- a/TSF/docs/index.rst +++ b/TSF/docs/index.rst @@ -15,7 +15,7 @@ .. _library_description: S-CORE NLOHMANN JSON LIBRARY FORK -============================= +================================= This module is dedicated to implementing the Trustable Software Framework for the Niels Lohmann JSON Library. Initially, it emphasizes ensuring the reliability and correctness of the library's parsing functionality. The Niels Lohmann JSON Library is recognized for its efficient and straightforward approach to JSON parsing, manipulation, and serialization within modern C++ applications, aiming to provide developers with a flexible and robust tool for managing JSON data structures. The framework seeks to enhance these capabilities, aligning them with rigorous software quality standards to ensure dependable JSON processing across diverse applications. From 891074bc2e18262c062a648187bb94beaaded127 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:41:07 +0000 Subject: [PATCH 73/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 64b4fa4e60..09650bf625 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -56,10 +56,10 @@ jobs: echo "❌ ${{ matrix.target }} workflow failed! Exiting..." exit 1 fi + echo "✅ Child workflows completed successfully!" env: current_workflow: ${{ matrix.target }} - echo "✅ Child workflows completed successfully!" - name: Download artifacts uses: actions/download-artifact@v4 From 68a33cd03f95185db8d6ddeee7bc703bd3b48846 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:49:26 +0000 Subject: [PATCH 74/85] fix errors --- .github/workflows/cifuzz.yml | 28 +++++++++++++-------------- .github/workflows/codeql-analysis.yml | 26 +++++++++++++------------ .github/workflows/parent-workflow.yml | 17 +++++++++++++--- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 51bb49f901..77023008f7 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,11 +1,12 @@ name: CIFuzz on: - workflow_dispatch: - inputs: - PARENT_SHA: - description: "Parent Workflow SHA" + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' required: true + type: string permissions: contents: read @@ -42,17 +43,14 @@ jobs: name: artifacts path: ./out/artifacts - - name: Checkout specific commit from Parent Workflow - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.PARENT_SHA }} - path: actions/checkout@v4 - - - name: Create Completion Flag - run: echo "CIfuzz workflow completed." > CIFUZZ_flag_${{ github.event.inputs.PARENT_SHA }}.txt + - name: Generate cifuzz artifact + run: | + echo "Generating cifuzz artifact..." + mkdir -p cifuzz + echo "cifuzz processed for ${{ inputs.artifact_id }}" > cifuzz/cifuzz.txt - - name: Upload completion artifact + - name: Upload cifuzz artifact uses: actions/upload-artifact@v4 with: - name: workflow-CIFUZZ-completed_${{ github.event.inputs.PARENT_SHA }} - path: CIFUZZ_flag_${{ github.event.inputs.PARENT_SHA }}.txt + name: ${{ inputs.artifact_id }} + path: cifuzz/ \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9a83497e41..c9f69bb882 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -6,7 +6,12 @@ on: # - develop # - main # - release/* -# pull_request: + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' + required: true + type: string schedule: - cron: '0 19 * * 1' workflow_dispatch: @@ -48,17 +53,14 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14 - - name: Checkout specific commit from Parent Workflow - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.PARENT_SHA }} - path: actions/checkout@v4 - - - name: Create Completion Flag - run: echo "CODEQL workflow completed." > CODEQL_flag_${{ github.event.inputs.PARENT_SHA }}.txt + - name: Generate codeql artifact + run: | + echo "Generating codeql artifact..." + mkdir -p codeql + echo "codeql processed for ${{ inputs.artifact_id }}" > codeql/codeql.txt - - name: Upload completion artifact + - name: Upload codeql artifact uses: actions/upload-artifact@v4 with: - name: workflow-CODEQL-completed_${{ github.event.inputs.PARENT_SHA }} - path: CODEQL_flag_${{ github.event.inputs.PARENT_SHA }}.txt + name: ${{ inputs.artifact_id }} + path: codeql/ diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 09650bf625..d251235a3c 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -32,15 +32,27 @@ jobs: with: artifact_id: "test_trudag_extensions-${{ github.sha }}" + cifuzz: + name: Run Test Trudag Extensions Workflow + uses: ./.github/workflows/cifuzz.yml + with: + artifact_id: "cifuzz-${{ github.sha }}" + + codeql: + name: Run Test Trudag Extensions Workflow + uses: ./.github/workflows/codeql.yml + with: + artifact_id: "codeql-${{ github.sha }}" + collect-and-deploy: name: "Collect Results & Deploy" - needs: [labeler, check_amalgamation, test_trudag_extensions] + needs: [labeler, check_amalgamation, test_trudag_extensions, cifuzz, codeql] runs-on: ubuntu-latest if: always() # Run even if some jobs fail strategy: matrix: - target: [labeler, check_amalgamation, test_trudag_extensions] + target: [labeler, check_amalgamation, test_trudag_extensions, cifuzz, codeql] steps: - name: Checkout code @@ -59,7 +71,6 @@ jobs: echo "✅ Child workflows completed successfully!" env: current_workflow: ${{ matrix.target }} - - name: Download artifacts uses: actions/download-artifact@v4 From f8eda05248a1293fe139f8c4651795aba8379c2a Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:50:20 +0000 Subject: [PATCH 75/85] fix errors --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index d251235a3c..8fbf97cb26 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -40,7 +40,7 @@ jobs: codeql: name: Run Test Trudag Extensions Workflow - uses: ./.github/workflows/codeql.yml + uses: ./.github/workflows/codeql-analysis.yml with: artifact_id: "codeql-${{ github.sha }}" From ce683cbfa6daff717d8a41e171b3f9952e7e90aa Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:51:58 +0000 Subject: [PATCH 76/85] fix errors --- .github/workflows/codeql-analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c9f69bb882..59098afa32 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,6 +22,7 @@ concurrency: permissions: contents: read + security-events: write jobs: CodeQL-Build: From f0a34d8fd1cf9efad04c52494d63a2ad91d51ce4 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 09:52:48 +0000 Subject: [PATCH 77/85] fix errors --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/parent-workflow.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 59098afa32..a097b537ab 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,7 +22,7 @@ concurrency: permissions: contents: read - security-events: write + jobs: CodeQL-Build: diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 8fbf97cb26..4db613cfc7 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -12,6 +12,7 @@ permissions: pages: write pull-requests: write id-token: write + security-events: write jobs: labeler: From 5d04c237ae6dd6429a1c08fcab65ef85741b5d87 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 10:02:38 +0000 Subject: [PATCH 78/85] fix errors --- .github/workflows/cifuzz.yml | 4 ++++ .github/workflows/ubuntu.yml | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 77023008f7..2982923fe6 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -15,6 +15,10 @@ jobs: Fuzzing: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Harden Runner uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 with: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 044c270bb5..a2e401510b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,13 +1,18 @@ name: Ubuntu on: + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' + required: true + type: string workflow_dispatch: # push: # branches: # - develop # - main # - release/* - #pull_request: #schedule: # Runs every day at 9:00 AM UTC #- cron: "0 9 * * *" From d508e1aae784124d5212d33308feb42ca3ce74e4 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 10:09:22 +0000 Subject: [PATCH 79/85] fix errors --- .github/workflows/cifuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 2982923fe6..c5b0bb763b 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -28,7 +28,7 @@ jobs: id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e with: - oss-fuzz-project-name: 'json' + oss-fuzz-project-name: 'json_dev' dry-run: false language: c++ From be3f5a1f6d63ec9146e5b2effead37a9cd1c9221 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 10:14:48 +0000 Subject: [PATCH 80/85] fix errors --- .github/workflows/cifuzz.yml | 2 +- .github/workflows/parent-workflow.yml | 21 +++++++++++++-------- .github/workflows/ubuntu.yml | 12 ++++++++++++ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index c5b0bb763b..2982923fe6 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -28,7 +28,7 @@ jobs: id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e with: - oss-fuzz-project-name: 'json_dev' + oss-fuzz-project-name: 'json' dry-run: false language: c++ diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 4db613cfc7..86e0300c28 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -33,27 +33,32 @@ jobs: with: artifact_id: "test_trudag_extensions-${{ github.sha }}" - cifuzz: - name: Run Test Trudag Extensions Workflow - uses: ./.github/workflows/cifuzz.yml - with: - artifact_id: "cifuzz-${{ github.sha }}" + # cifuzz: + # name: Run CIFuzz Workflow + # uses: ./.github/workflows/cifuzz.yml + #with: + # artifact_id: "cifuzz-${{ github.sha }}" codeql: - name: Run Test Trudag Extensions Workflow + name: Run Codeql analysis Workflow uses: ./.github/workflows/codeql-analysis.yml with: artifact_id: "codeql-${{ github.sha }}" + ubuntu: + name: Run Ubuntu Workflow + uses: ./.github/workflows/ubuntu.yml + with: + artifact_id: "ubuntu-${{ github.sha }}" collect-and-deploy: name: "Collect Results & Deploy" - needs: [labeler, check_amalgamation, test_trudag_extensions, cifuzz, codeql] + needs: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu ] runs-on: ubuntu-latest if: always() # Run even if some jobs fail strategy: matrix: - target: [labeler, check_amalgamation, test_trudag_extensions, cifuzz, codeql] + target: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu ] steps: - name: Checkout code diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a2e401510b..6b5d7b33b2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -258,3 +258,15 @@ jobs: run: cmake -S . -B build -DJSON_CI=On - name: Build run: cmake --build build --target ${{ matrix.target }} + + - name: Generate ubuntu artifact + run: | + echo "Generating ubuntu artifact..." + mkdir -p ubuntu + echo "ubuntu processed for ${{ inputs.artifact_id }}" > ubuntu/ubuntu.txt + + - name: Upload ubuntu artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact_id }} + path: ubuntu/ From 839cfc2add4215a3996f62bbd5a916d98c072a1d Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 11:27:21 +0000 Subject: [PATCH 81/85] fix error --- .github/workflows/dependency-review.yml | 20 +++++++++++++++++++- .github/workflows/parent-workflow.yml | 11 +++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 4e45826acb..d81f4eb91b 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -8,7 +8,12 @@ # Source repository: https://github.com/actions/dependency-review-action name: 'Dependency Review' on: - pull_request: + workflow_call: + inputs: + artifact_id: + description: 'Unique identifier for artifacts' + required: true + type: string permissions: @@ -27,3 +32,16 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: 'Dependency Review' uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0 + + + - name: Generate dependency_review artifact + run: | + echo "Generating Dependency Review artifact..." + mkdir -p dependency_review + echo "dependency review processed for ${{ inputs.artifact_id }}" > dependency_review/dependency_review.txt + + - name: Upload dependency_review artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact_id }} + path: dependency_review/ diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 86e0300c28..2b8e6718b7 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -51,14 +51,21 @@ jobs: with: artifact_id: "ubuntu-${{ github.sha }}" + dependency_review: + name: Run dependency_review Workflow + uses: ./.github/workflows/dependency_review.yml + with: + artifact_id: "dependency_review-${{ github.sha }}" + + collect-and-deploy: name: "Collect Results & Deploy" - needs: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu ] + needs: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu, dependency_review] runs-on: ubuntu-latest if: always() # Run even if some jobs fail strategy: matrix: - target: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu ] + target: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu, dependency_review ] steps: - name: Checkout code From d9c57063abc9c67a6b405467092c08b859dbdcdb Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 11:32:23 +0000 Subject: [PATCH 82/85] fix error --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 2b8e6718b7..7ad7ee6d11 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -53,7 +53,7 @@ jobs: dependency_review: name: Run dependency_review Workflow - uses: ./.github/workflows/dependency_review.yml + uses: ./.github/workflows/dependency-review.yml with: artifact_id: "dependency_review-${{ github.sha }}" From 405f211863b88f4a85417fdcf67cdf13bc5ae7e0 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 11:42:26 +0000 Subject: [PATCH 83/85] fix cifuzz --- .github/workflows/parent-workflow.yml | 24 ++++++++++++------------ TSF/docs/index.rst | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 7ad7ee6d11..3e292f111a 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -33,11 +33,11 @@ jobs: with: artifact_id: "test_trudag_extensions-${{ github.sha }}" - # cifuzz: - # name: Run CIFuzz Workflow - # uses: ./.github/workflows/cifuzz.yml - #with: - # artifact_id: "cifuzz-${{ github.sha }}" + cifuzz: + name: Run CIFuzz Workflow + uses: ./.github/workflows/cifuzz.yml + with: + artifact_id: "cifuzz-${{ github.sha }}" codeql: name: Run Codeql analysis Workflow @@ -45,11 +45,11 @@ jobs: with: artifact_id: "codeql-${{ github.sha }}" - ubuntu: - name: Run Ubuntu Workflow - uses: ./.github/workflows/ubuntu.yml - with: - artifact_id: "ubuntu-${{ github.sha }}" + #ubuntu: + #name: Run Ubuntu Workflow + #uses: ./.github/workflows/ubuntu.yml + #with: + # artifact_id: "ubuntu-${{ github.sha }}" dependency_review: name: Run dependency_review Workflow @@ -60,12 +60,12 @@ jobs: collect-and-deploy: name: "Collect Results & Deploy" - needs: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu, dependency_review] + needs: [labeler, check_amalgamation, test_trudag_extensions, codeql, cifuzz, dependency_review] runs-on: ubuntu-latest if: always() # Run even if some jobs fail strategy: matrix: - target: [labeler, check_amalgamation, test_trudag_extensions, codeql, ubuntu, dependency_review ] + target: [labeler, check_amalgamation, test_trudag_extensions, codeql, cifuzz, dependency_review ] steps: - name: Checkout code diff --git a/TSF/docs/index.rst b/TSF/docs/index.rst index 199bf9900a..adc8d74288 100644 --- a/TSF/docs/index.rst +++ b/TSF/docs/index.rst @@ -15,7 +15,7 @@ .. _library_description: S-CORE NLOHMANN JSON LIBRARY FORK -================================= +=================================== This module is dedicated to implementing the Trustable Software Framework for the Niels Lohmann JSON Library. Initially, it emphasizes ensuring the reliability and correctness of the library's parsing functionality. The Niels Lohmann JSON Library is recognized for its efficient and straightforward approach to JSON parsing, manipulation, and serialization within modern C++ applications, aiming to provide developers with a flexible and robust tool for managing JSON data structures. The framework seeks to enhance these capabilities, aligning them with rigorous software quality standards to ensure dependable JSON processing across diverse applications. From 16d7b43302958372f50cbb210f91e3bc5fa41f64 Mon Sep 17 00:00:00 2001 From: Erik Hu Date: Tue, 5 Aug 2025 11:46:07 +0000 Subject: [PATCH 84/85] test --- .github/workflows/parent-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parent-workflow.yml b/.github/workflows/parent-workflow.yml index 3e292f111a..5ce6323681 100644 --- a/.github/workflows/parent-workflow.yml +++ b/.github/workflows/parent-workflow.yml @@ -6,7 +6,7 @@ on: # branches: # - develop # - main -#test + permissions: contents: write pages: write From 22eaf8346dc352c8ffbc11de8ea3bf311ad97bdf Mon Sep 17 00:00:00 2001 From: Erik Hu <135733975+Erikhu1@users.noreply.github.com> Date: Tue, 5 Aug 2025 14:18:26 +0200 Subject: [PATCH 85/85] Fix title underline length Signed-off-by: Erik Hu <135733975+Erikhu1@users.noreply.github.com> --- TSF/docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TSF/docs/index.rst b/TSF/docs/index.rst index 0d79ec02ac..e8b988cc23 100644 --- a/TSF/docs/index.rst +++ b/TSF/docs/index.rst @@ -15,7 +15,7 @@ .. _library_description: S-CORE NLOHMANN JSON LIBRARY FORK -============================= +=================================== This module is dedicated to implementing the Trustable Software Framework for the Niels Lohmann JSON Library. Initially, it emphasizes ensuring the reliability and correctness of the library's parsing functionality. The Niels Lohmann JSON Library is recognized for its efficient and straightforward approach to JSON parsing, manipulation, and serialization within modern C++ applications, aiming to provide developers with a flexible and robust tool for managing JSON data structures. The framework seeks to enhance these capabilities, aligning them with rigorous software quality standards to ensure dependable JSON processing across diverse applications. @@ -35,4 +35,4 @@ This repository provides the aspired setup for projects using **C++** and **Baze introduction/index.rst concept.rst report.rst - Eclipse \ No newline at end of file + Eclipse