From bd3f2afaf37c1ad487a82e2a503829521f0cfb62 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 15 Jan 2025 13:08:08 +0100 Subject: [PATCH 1/5] Group output from zip. --- .github/workflows/NightlyRelease.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 3331eb2..38e501b 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -343,12 +343,14 @@ jobs: if [[ "${asset}" == !*.zip ]]; then printf "%s\n" "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}" asset="${asset##*!}" - printf " %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." + printf "::group:: %s\n" "Compressing artifact '${artifact}' to '${asset}' ..." ( cd "${artifact}" && \ zip -r "../${asset}" * ) - if [[ $? -eq 0 ]]; then + retCode=$? + printf "::endgroup::\n" + if [[ $retCode -eq 0 ]]; then printf " %s\n" "Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" uploadFile="${asset}" else From 530ad7a4a11189b7b59ba8dddd31fd0a2fd9a55d Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 15 Jan 2025 16:09:04 +0100 Subject: [PATCH 2/5] Added timezone. --- .github/workflows/NightlyRelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 38e501b..116dd43 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -175,7 +175,7 @@ jobs: cat <> __NoTeS__.md -------- - Published from [${{ github.workflow }}](https://github.com/Paebbels/ghdl/actions/runs/${{ github.run_id }}) workflow triggered by @${{ github.actor }} on $(date '+%Y-%m-%d %H:%M:%S'). + Published from [${{ github.workflow }}](https://github.com/Paebbels/ghdl/actions/runs/${{ github.run_id }}) workflow triggered by @${{ github.actor }} on $(date '+%Y-%m-%d %H:%M:%S %Z'). EOF printf "%s\n" "Creating release '${{ inputs.nightly_name }}' ... " From 7523c4adca1ce958c27d652f6680e300b52f556f Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 15 Jan 2025 16:09:19 +0100 Subject: [PATCH 3/5] Search only for xml files. --- .github/workflows/PublishTestResults.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index cf97de0..77bd474 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -82,7 +82,7 @@ jobs: - name: Rename JUnit files and move them all into 'junit/' run: | mkdir -p junit - find artifacts/ -type f -path "*TestReportSummary*.xml" -exec sh -c 'cp -v $0 "junit/$(basename $(dirname $0)).$(basename $0)"' {} ';' + find artifacts/ -type f -path "*.xml" -exec sh -c 'cp -v $0 "junit/$(basename $(dirname $0)).$(basename $0)"' {} ';' tree -pash junit - name: 🔁 Merge JUnit Unit Test Summaries From 34fb9c98696d388a564376858715abf96e352d49 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 15 Jan 2025 23:25:32 +0100 Subject: [PATCH 4/5] Coding style fixes. --- .github/workflows/ApplicationTesting.yml | 4 ++-- .github/workflows/ArtifactCleanUp.yml | 4 ++-- .github/workflows/BuildTheDocs.yml | 2 +- .github/workflows/PublishCoverageResults.yml | 14 +++++++------- .github/workflows/PublishTestResults.yml | 4 ++-- .github/workflows/PublishToGitHubPages.yml | 4 ++-- .github/workflows/Release.yml | 2 +- .github/workflows/SphinxDocumentation.yml | 12 ++++++------ .github/workflows/StaticTypeCheck.yml | 4 ++-- .github/workflows/UnitTesting.yml | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ApplicationTesting.yml b/.github/workflows/ApplicationTesting.yml index 266c412..b8b15b0 100644 --- a/.github/workflows/ApplicationTesting.yml +++ b/.github/workflows/ApplicationTesting.yml @@ -188,8 +188,8 @@ jobs: f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n") - name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}' - if: matrix.system == 'msys2' uses: msys2/setup-msys2@v2 + if: matrix.system == 'msys2' with: msystem: ${{ matrix.runtime }} update: true @@ -198,8 +198,8 @@ jobs: ${{ inputs.pacboy }} - name: 🐍 Setup Python ${{ matrix.python }} - if: matrix.system != 'msys2' uses: actions/setup-python@v5 + if: matrix.system != 'msys2' with: python-version: ${{ matrix.python }} diff --git a/.github/workflows/ArtifactCleanUp.yml b/.github/workflows/ArtifactCleanUp.yml index 23f0a9e..b19e833 100644 --- a/.github/workflows/ArtifactCleanUp.yml +++ b/.github/workflows/ArtifactCleanUp.yml @@ -47,13 +47,13 @@ jobs: steps: - name: 🗑️ Delete package Artifacts - if: ${{ ! startsWith(github.ref, 'refs/tags') }} uses: geekyeggo/delete-artifact@v5 + if: ${{ ! startsWith(github.ref, 'refs/tags') }} with: name: ${{ inputs.package }} - name: 🗑️ Delete remaining Artifacts - if: ${{ inputs.remaining != '' }} uses: geekyeggo/delete-artifact@v5 + if: ${{ inputs.remaining != '' }} with: name: ${{ inputs.remaining }} diff --git a/.github/workflows/BuildTheDocs.yml b/.github/workflows/BuildTheDocs.yml index 1507b48..dcf8782 100644 --- a/.github/workflows/BuildTheDocs.yml +++ b/.github/workflows/BuildTheDocs.yml @@ -49,8 +49,8 @@ jobs: skip-deploy: true - name: 📤 Upload 'documentation' artifacts - if: inputs.artifact != '' uses: pyTooling/upload-artifact@v4 + if: inputs.artifact != '' with: name: ${{ inputs.artifact }} working-directory: doc/_build/html diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index efb2042..c833832 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -76,7 +76,7 @@ jobs: lfs: true submodules: true - - name: Download Artifacts + - name: 📥 Download Artifacts uses: pyTooling/download-artifact@v4 with: pattern: ${{ inputs.coverage_artifacts_pattern }} @@ -178,9 +178,9 @@ jobs: tree -pash report/coverage/html - name: 📤 Upload 'Coverage SQLite Database' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.coverage_sqlite_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_sqlite_artifact }} path: .coverage @@ -188,9 +188,9 @@ jobs: retention-days: 1 - name: 📤 Upload 'Coverage XML Report' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.coverage_xml_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_xml_artifact }} path: ${{ steps.getVariables.outputs.coverage_report_xml }} @@ -198,9 +198,9 @@ jobs: retention-days: 1 - name: 📤 Upload 'Coverage JSON Report' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.coverage_json_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_json_artifact }} path: ${{ steps.getVariables.outputs.coverage_report_json }} @@ -208,9 +208,9 @@ jobs: retention-days: 1 - name: 📤 Upload 'Coverage HTML Report' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.coverage_html_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_html_artifact }} working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} @@ -219,18 +219,18 @@ jobs: retention-days: 1 - name: 📊 Publish code coverage at CodeCov + uses: codecov/codecov-action@v5 if: inputs.CodeCov == true continue-on-error: true - uses: codecov/codecov-action@v5 with: files: ${{ steps.getVariables.outputs.coverage_report_xml }} flags: unittests env_vars: PYTHON - name: 📉 Publish code coverage at Codacy + uses: codacy/codacy-coverage-reporter-action@v1 if: inputs.Codacy == true continue-on-error: true - uses: codacy/codacy-coverage-reporter-action@v1 with: project-token: ${{ secrets.codacy_token }} coverage-reports: ${{ steps.getVariables.outputs.coverage_report_xml }} diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index 77bd474..1545601 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -65,7 +65,7 @@ jobs: - name: ⏬ Checkout repository uses: actions/checkout@v4 - - name: Download Artifacts + - name: 📥 Download Artifacts uses: pyTooling/download-artifact@v4 with: pattern: ${{ inputs.unittest_artifacts_pattern }} @@ -100,8 +100,8 @@ jobs: reporter: java-junit - name: 📤 Upload merged 'JUnit Test Summary' artifact - if: inputs.merged_junit_artifact != '' uses: pyTooling/upload-artifact@v4 + if: inputs.merged_junit_artifact != '' with: name: ${{ inputs.merged_junit_artifact }} path: Unittesting.xml diff --git a/.github/workflows/PublishToGitHubPages.yml b/.github/workflows/PublishToGitHubPages.yml index fec7b73..020aefa 100644 --- a/.github/workflows/PublishToGitHubPages.yml +++ b/.github/workflows/PublishToGitHubPages.yml @@ -62,15 +62,15 @@ jobs: path: public - name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job - if: ${{ inputs.coverage != '' }} uses: pyTooling/download-artifact@v4 + if: ${{ inputs.coverage != '' }} with: name: ${{ inputs.coverage }} path: public/coverage - name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job - if: ${{ inputs.typing != '' }} uses: pyTooling/download-artifact@v4 + if: ${{ inputs.typing != '' }} with: name: ${{ inputs.typing }} path: public/typing diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 96f7c67..74cc1e6 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,8 +49,8 @@ jobs: echo "datetime=${RELEASE_DATETIME}" >> $GITHUB_OUTPUT - name: 📑 Create Release Page - id: createReleasePage uses: actions/create-release@v1 + id: createReleasePage env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/SphinxDocumentation.yml b/.github/workflows/SphinxDocumentation.yml index d6fe396..d0e333e 100644 --- a/.github/workflows/SphinxDocumentation.yml +++ b/.github/workflows/SphinxDocumentation.yml @@ -100,15 +100,15 @@ jobs: python -m pip install --disable-pip-version-check ${{ inputs.requirements }} - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job - if: inputs.unittest_xml_artifact != '' uses: pyTooling/download-artifact@v4 + if: inputs.unittest_xml_artifact != '' with: name: ${{ inputs.unittest_xml_artifact }} path: ${{ inputs.unittest_xml_directory }} - name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job - if: inputs.coverage_json_artifact != '' uses: pyTooling/download-artifact@v4 + if: inputs.coverage_json_artifact != '' with: name: ${{ inputs.coverage_json_artifact }} path: ${{ inputs.coverage_report_json_directory }} @@ -122,9 +122,9 @@ jobs: sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html - name: 📤 Upload 'HTML Documentation' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.html_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} working-directory: ${{ inputs.doc_directory }}/_build/html @@ -157,15 +157,15 @@ jobs: python -m pip install --disable-pip-version-check ${{ inputs.requirements }} - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job - if: inputs.unittest_xml_artifact != '' uses: pyTooling/download-artifact@v4 + if: inputs.unittest_xml_artifact != '' with: name: ${{ inputs.unittest_xml_artifact }} path: ${{ inputs.unittest_xml_directory }} - name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job - if: inputs.coverage_json_artifact != '' uses: pyTooling/download-artifact@v4 + if: inputs.coverage_json_artifact != '' with: name: ${{ inputs.coverage_json_artifact }} path: ${{ inputs.coverage_report_json_directory }} @@ -263,9 +263,9 @@ jobs: done - name: 📤 Upload 'LaTeX Documentation' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.latex_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.latex_artifact }} working-directory: ${{ inputs.doc_directory }}/_build/latex diff --git a/.github/workflows/StaticTypeCheck.yml b/.github/workflows/StaticTypeCheck.yml index 7554a10..0b15d63 100644 --- a/.github/workflows/StaticTypeCheck.yml +++ b/.github/workflows/StaticTypeCheck.yml @@ -87,9 +87,9 @@ jobs: run: ${{ inputs.commands }} - name: 📤 Upload 'Static Typing Report' HTML artifact + uses: pyTooling/upload-artifact@v4 if: ${{ inputs.html_artifact != '' }} continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} working-directory: ${{ inputs.html_report }} @@ -98,9 +98,9 @@ jobs: retention-days: 1 - name: 📤 Upload 'Static Typing Report' JUnit artifact + uses: pyTooling/upload-artifact@v4 if: ${{ inputs.junit_artifact != '' }} continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.junit_artifact }} path: ${{ inputs.junit_report }} diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index c05c6f5..5b547b9 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -282,8 +282,8 @@ jobs: # Python setup - name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}' - if: matrix.system == 'msys2' uses: msys2/setup-msys2@v2 + if: matrix.system == 'msys2' with: msystem: ${{ matrix.runtime }} update: true @@ -292,8 +292,8 @@ jobs: ${{ inputs.pacboy }} - name: 🐍 Setup Python ${{ matrix.python }} - if: matrix.system != 'msys2' uses: actions/setup-python@v5 + if: matrix.system != 'msys2' with: python-version: ${{ matrix.python }} @@ -392,9 +392,9 @@ jobs: # Upload artifacts - name: 📤 Upload '${{ inputs.unittest_report_xml_filename }}' artifact + uses: pyTooling/upload-artifact@v4 if: inputs.unittest_xml_artifact != '' continue-on-error: true - uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.unittest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} working-directory: ${{ inputs.unittest_report_xml_directory }} From 3a13486ea6dd15cef4682fc885d942e70f1ce691 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 16 Jan 2025 19:04:47 +0100 Subject: [PATCH 5/5] Add only filename to the inventory. --- .github/workflows/NightlyRelease.yml | 6 +++--- doc/requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 116dd43..d982f85 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -432,11 +432,11 @@ jobs: # Add asset to JSON inventory if [[ "${{ inputs.inventory-json }}" != "" ]]; then if [[ "${categories}" != "${title}" ]]; then - printf " %s\n" "adding file '${uploadFile}' with '${categories//;/ → }' to JSON inventory ..." + printf " %s\n" "adding file '${uploadFile#*/}' with '${categories//;/ → }' to JSON inventory ..." category="" jsonEntry=$(jq -c -n \ --arg title "${title}" \ - --arg file "${uploadFile}" \ + --arg file "${uploadFile#*/}" \ '{"file": $file, "title": $title}' \ ) @@ -452,7 +452,7 @@ jobs: '$inventory * {"files": $file}' \ ) else - printf " %s\n" "adding file '${uploadFile}' to JSON inventory ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" + printf " %s\n" "adding file '${uploadFile#*/}' to JSON inventory ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" fi fi diff --git a/doc/requirements.txt b/doc/requirements.txt index ede9f77..e34a515 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -15,5 +15,5 @@ sphinxcontrib-mermaid ~= 1.0 autoapi >= 2.0.1 sphinx_design ~= 0.6.1 sphinx-copybutton >= 0.5.2 -sphinx_autodoc_typehints ~= 2.5 +sphinx_autodoc_typehints ~= 3.0 sphinx_reports ~= 0.7