From 21c2f48dad5ab613db736a344ac4bc6e31ddef94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:35:36 +0000 Subject: [PATCH 01/11] [Dependabot]: Bump codecov/codecov-action from 3 to 5 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/CoverageCollection.yml | 2 +- .github/workflows/PublishCoverageResults.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index f7dab10..9d7a06e 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -169,7 +169,7 @@ jobs: - name: 📊 Publish coverage at CodeCov continue-on-error: true - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: files: ${{ steps.getVariables.outputs.coverage_report_xml }} flags: unittests diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index 5365e46..d096a3d 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -210,7 +210,7 @@ jobs: - name: 📊 Publish code coverage at CodeCov if: inputs.CodeCov == true continue-on-error: true - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: ${{ steps.getVariables.outputs.coverage_report_xml }} flags: unittests From edca070047bb1d001f13a609d99d96b5c41c575e Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 16 Nov 2024 23:57:48 +0100 Subject: [PATCH 02/11] Also checkout submodules. --- .github/workflows/CompletePipeline.yml | 3 ++- .github/workflows/CoverageCollection.yml | 3 +++ .github/workflows/Package.yml | 3 +++ .github/workflows/PublishCoverageResults.yml | 3 +++ .github/workflows/SphinxDocumentation.yml | 6 ++++++ .github/workflows/UnitTesting.yml | 3 +++ .github/workflows/_Checking_JobTemplates.yml | 5 +++-- .gitignore | 2 +- doc/requirements.txt | 8 -------- pyproject.toml | 2 +- 10 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CompletePipeline.yml b/.github/workflows/CompletePipeline.yml index 675ebeb..1b0184a 100644 --- a/.github/workflows/CompletePipeline.yml +++ b/.github/workflows/CompletePipeline.yml @@ -138,6 +138,7 @@ jobs: DocCoverage: uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev needs: + - ConfigParams - UnitTestingParams with: python_version: ${{ needs.UnitTestingParams.outputs.python_version }} @@ -195,8 +196,8 @@ jobs: Documentation: uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev needs: - - UnitTestingParams - ConfigParams + - UnitTestingParams - PublishTestResults - PublishCoverageResults # - VerifyDocs diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index f7dab10..1cbcfbf 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -76,6 +76,9 @@ jobs: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v5 diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index 9a60d1a..2228a0f 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -54,6 +54,9 @@ jobs: steps: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v5 diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index 5365e46..a3d66d7 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -68,6 +68,9 @@ jobs: steps: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true - name: Download Artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/SphinxDocumentation.yml b/.github/workflows/SphinxDocumentation.yml index ed10ac2..ce64092 100644 --- a/.github/workflows/SphinxDocumentation.yml +++ b/.github/workflows/SphinxDocumentation.yml @@ -82,6 +82,9 @@ jobs: steps: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true - name: 🔧 Install graphviz run: sudo apt-get install -y --no-install-recommends graphviz @@ -135,6 +138,9 @@ jobs: steps: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true - name: 🔧 Install graphviz run: sudo apt-get install -y --no-install-recommends graphviz diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 8133259..3a36cdb 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -147,6 +147,9 @@ jobs: steps: - name: ⏬ Checkout repository uses: actions/checkout@v4 + with: + lfs: true + submodules: true # Package Manager steps - name: 🔧 Install homebrew dependencies on macOS diff --git a/.github/workflows/_Checking_JobTemplates.yml b/.github/workflows/_Checking_JobTemplates.yml index a6b4089..1cf5fff 100644 --- a/.github/workflows/_Checking_JobTemplates.yml +++ b/.github/workflows/_Checking_JobTemplates.yml @@ -80,10 +80,11 @@ jobs: DocCoverage: uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r1 needs: + - ConfigParams - UnitTestingParams with: python_version: ${{ needs.UnitTestingParams.outputs.python_version }} - directory: sphinx_reports + directory: ${{ needs.ConfigParams.outputs.package_directors }} # fail_below: 70 Package: @@ -130,8 +131,8 @@ jobs: Documentation: uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev needs: - - UnitTestingParams - ConfigParams + - UnitTestingParams - PublishTestResults - PublishCoverageResults # - VerifyDocs diff --git a/.gitignore b/.gitignore index aa068cd..09fadda 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ doc/pyDummy/**/*.* # BuildTheDocs doc/_theme/**/*.* -# IntelliJ project files +# PyCharm project files /.idea/workspace.xml # Git files diff --git a/doc/requirements.txt b/doc/requirements.txt index 51a65c9..35b7576 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -11,17 +11,9 @@ docutils_stubs ~= 0.0.22 sphinx_rtd_theme ~= 3.0 # Sphinx Extenstions -#sphinx.ext.coverage -#sphinxcontrib-actdiag>=0.8.5 sphinxcontrib-mermaid>=0.9.2 -#sphinxcontrib-seqdiag>=0.8.5 -#sphinxcontrib-textstyle>=0.2.1 -#sphinxcontrib-spelling>=2.2.0 autoapi >= 2.0.1 sphinx_design ~= 0.6.1 sphinx-copybutton >= 0.5.2 sphinx_autodoc_typehints ~= 2.5 -# changelog>=0.3.5 sphinx_reports ~= 0.7 - -# BuildTheDocs Extensions (mostly patched Sphinx extensions) diff --git a/pyproject.toml b/pyproject.toml index 1132ea2..f76c66f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools ~= 75.3", + "setuptools ~= 75.5", "wheel ~= 0.45", "pyTooling ~= 8.0" ] From bc876f7171eea9c3a004e1404ddc96f81fa948a5 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 22 Nov 2024 22:11:19 +0100 Subject: [PATCH 03/11] Allow disabling the publishing of test reports via Dorny Test Reporter. --- .github/workflows/Parameters.yml | 4 ++-- .github/workflows/PublishTestResults.yml | 6 ++++++ tests/pacman_packages.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Parameters.yml b/.github/workflows/Parameters.yml index ca02b74..82cb950 100644 --- a/.github/workflows/Parameters.yml +++ b/.github/workflows/Parameters.yml @@ -83,7 +83,7 @@ on: windows_image: description: 'The used GitHub Action image for Windows based jobs.' required: false - default: 'windows-latest' + default: 'windows-2022' type: string macos_intel_image: description: 'The used GitHub Action image for macOS (Intel x86-64) based jobs.' @@ -93,7 +93,7 @@ on: macos_arm_image: description: 'The used GitHub Action image for macOS (ARM aarch64) based jobs.' required: false - default: 'macos-latest' + default: 'macos-14' type: string outputs: diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index e7447d9..071ce4b 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -40,6 +40,11 @@ on: required: false default: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"' type: string + publish: + description: 'Publish test report summary via Dorny Test-Reporter' + required: false + default: true + type: boolean report_title: description: 'Title of the summary report in the pipeline''s sidebar' required: false @@ -80,6 +85,7 @@ jobs: - name: 📊 Publish Unit Test Results uses: dorny/test-reporter@v1 + if: inputs.publish && inputs.report_title != '' with: name: ${{ inputs.report_title }} path: Unittesting.xml diff --git a/tests/pacman_packages.py b/tests/pacman_packages.py index c570554..bb329ef 100644 --- a/tests/pacman_packages.py +++ b/tests/pacman_packages.py @@ -8,7 +8,7 @@ print(f"Python: {version}") def loadRequirementsFile(requirementsFile: Path): requirements = [] - with requirementsFile.open("r") as file: + with requirementsFile.open("r", encoding="utf-8") as file: for line in file.readlines(): line = line.strip() if line.startswith("#") or line.startswith("https") or line == "": @@ -84,7 +84,7 @@ for dependency in dependencies: # Write jobs to special file github_output = Path(getenv("GITHUB_OUTPUT")) print(f"GITHUB_OUTPUT: {github_output}") -with github_output.open("a+") as f: +with github_output.open("a+", encoding="utf-8") as f: f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n") print(f"GITHUB_OUTPUT:") From 7a0ee75fd55f6a4d0bc9ff105ae61113083adf2b Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 27 Nov 2024 00:00:52 +0100 Subject: [PATCH 04/11] Added nightly release job template. --- .github/workflows/CompletePipeline.yml | 21 ++ .github/workflows/NightlyRelease.yml | 257 +++++++++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 .github/workflows/NightlyRelease.yml diff --git a/.github/workflows/CompletePipeline.yml b/.github/workflows/CompletePipeline.yml index 1b0184a..94ffd4f 100644 --- a/.github/workflows/CompletePipeline.yml +++ b/.github/workflows/CompletePipeline.yml @@ -1,3 +1,24 @@ +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# ==================================================================================================================== # +# Copyright 2020-2024 The pyTooling Authors # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # name: Namespace Package on: diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml new file mode 100644 index 0000000..697c5b7 --- /dev/null +++ b/.github/workflows/NightlyRelease.yml @@ -0,0 +1,257 @@ +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# ==================================================================================================================== # +# Copyright 2020-2024 The pyTooling Authors # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +name: Nightly + +on: + workflow_call: + inputs: + ubuntu_image: + description: 'Name of the Ubuntu image.' + required: false + default: 'ubuntu-24.04' + type: string + nightly_name: + description: 'Name of the nightly release.' + required: false + default: 'nightly' + type: string + nightly_title: + description: 'Title of the nightly release.' + required: false + default: '' + type: string + nightly_description: + description: 'Description of the nightly release.' + required: false + default: 'Release of artifacts from latest CI pipeline.' + type: string + draft: + description: 'Specify if this is a draft.' + required: false + default: false + type: boolean + prerelease: + description: 'Specify if this is a pre-release.' + required: false + default: false + type: boolean + latest: + description: 'Specify if this is the latest release.' + required: false + default: false + type: boolean + assets: + description: 'Multi-line string containing artifact:file:title asset descriptions.' + required: true + type: string + +jobs: + Release: + name: 📝 Update 'Nightly Page' on GitHub + runs-on: ${{ inputs.ubuntu_image }} + permissions: + contents: write + actions: write + attestations: write + + steps: + - name: ⏬ Checkout repository + uses: actions/checkout@v4 + with: + # The command 'git describe' (used for version) needs the history. + fetch-depth: 0 + + - name: 📑 Delete (old) Release Page + id: deleteReleasePage + run: | + set +e + + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_LIGHT_YELLOW="\e[93m" + ANSI_NOCOLOR="\e[0m" + + export GH_TOKEN=${{ github.token }} + + echo -n "Deleting release '${{ inputs.nightly_name }}' ... " + message="$(gh release delete ${{ inputs.nightly_name }} --yes 2>&1)" + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + elif [[ "${message}" == "release not found" ]]; then + echo -e "${ANSI_LIGHT_YELLOW}[NOT FOUND]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" + echo "Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'." + echo "::error title=InternalError::Couldn't delete release '${{ inputs.nightly_name }}'." + exit 1 + fi + + - name: 📑 (Re)create (new) Release Page + id: createReleasePage + run: | + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_NOCOLOR="\e[0m" + + export GH_TOKEN=${{ github.token }} + + if ${{ inputs.draft }}; then + addDraft="--draft" + fi + + if ${{ inputs.prerelease }}; then + addPreRelease="--prerelease" + fi + + if ! ${{ inputs.latest }}; then + addLatest="--latest=false" + fi + + if [[ "${{ inputs.nightly_title }}" != "" ]]; then + addTitle=("--title" "${{ inputs.nightly_title }}") + fi + + cat <<'EOF' > __NoTeS__.md + ${{ inputs.nightly_description }} + EOF + if [[ -s __NoTeS__.md ]]; then + addNotes=("--notes-file" "__NoTeS__.md") + fi + 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'). + EOF + + echo "Creating release '${{ inputs.nightly_name }}' ... " + gh release create "${{ inputs.nightly_name }}" --verify-tag $addDraft $addPreRelease $addLatest "${addTitle[@]}" "${addNotes[@]}" + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" + echo "Couldn't create release '${{ inputs.nightly_name }}'." + echo "::error title=InternalError::Couldn't create release '${{ inputs.nightly_name }}'." + exit 1 + fi + + - name: 📥 Download artifacts and upload as assets + id: uploadAssets + run: | + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_LIGHT_YELLOW="\e[93m" + ANSI_NOCOLOR="\e[0m" + + export GH_TOKEN=${{ github.token }} + + ERRORS=0 + declare -A downloadedArtifacts + declare -A assetFilenames + while IFS=$'\r\n' read -r AssetLine; do + if [[ "${AssetLine}" == "" ]]; then + continue + fi + + artifact="${AssetLine%%:*}" + remaining="${AssetLine#*:}" + asset="${remaining%%:*}" + title="${remaining##*:}" + + echo "Publish asset '${asset}' from artifact '${artifact}' with title '${title}'" + echo -n " Checked asset for duplicates ... " + if [[ -n "${assetFilenames[$asset]}" ]]; then + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "::error title=DuplicateAsset::Asset '${asset}' from artifact '${artifact}' was already uploaded to release '${{ inputs.nightly_name }}'." + ERRORS=1 + continue + else + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + assetFilenames[$asset]=1 + fi + + if [[ -n "${downloadedArtifacts[$artifact]}" ]]; then + echo -e " downloading '${artifact}' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" + else + echo " downloading '${artifact}' ... " + echo -n " gh run download $GITHUB_RUN_ID --dir \"${artifact}\" --name \"${artifact}\" " + gh run download $GITHUB_RUN_ID --dir "${artifact}" --name "${artifact}" + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "Couldn't download artifact '${artifact}'." + echo "::error title=ArtifactNotFound::Couldn't download artifact '${artifact}'." + ERRORS=1 + continue + fi + downloadedArtifacts[$artifact]=1 + fi + + echo -n " checking asset '${artifact}/${asset}' ... " + if [[ "${asset}" == !*zip ]]; then + echo -e "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}" + asset="${asset##*!}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + cd "${artifact}" + zip -v -r "../${asset}" * + cd - + if [[ $? -eq 0 ]]; then + echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + uploadFile="${asset}" + else + echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "Couldn't compress '${artifact}' to zip file '${asset}'." + echo "::error title=ZipError::Couldn't compress '${artifact}' to zip file '${asset}'." + ERRORS=1 + continue + fi + elif [[ -e "${artifact}/${asset}" ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + uploadFile="${artifact}/${asset}" + else + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "Couldn't find asset '${asset}' in artifact '${artifact}'." + echo "::error title=FileNotFound::Couldn't find asset '${asset}' in artifact '${artifact}'." + ERRORS=1 + continue + fi + + echo -n " uploading asset '${asset}' from '${uploadFile}' with title '${title}' ... " + gh release upload ${{ inputs.nightly_name }} "${uploadFile}#${title}" --clobber + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'." + echo "::error title=UploadError::Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'." + ERRORS=1 + continue + fi + done <<<"${{ inputs.assets }}" + + echo "Inspecting downlaoded artifacts ..." + tree . + + if [[ $ERROR -ne 0 ]]; then + echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}" + exit 1 + fi From 9ca7b04f3750578be42dd597f5f6eb06ccd54c36 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 27 Nov 2024 18:40:39 +0100 Subject: [PATCH 05/11] Added tar/gz compression as tgz files. --- .github/workflows/NightlyRelease.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 697c5b7..27fb4b7 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -108,6 +108,8 @@ jobs: - name: 📑 (Re)create (new) Release Page id: createReleasePage run: | + set +e + ANSI_LIGHT_RED="\e[91m" ANSI_LIGHT_GREEN="\e[92m" ANSI_NOCOLOR="\e[0m" @@ -156,6 +158,8 @@ jobs: - name: 📥 Download artifacts and upload as assets id: uploadAssets run: | + set +e + ANSI_LIGHT_RED="\e[91m" ANSI_LIGHT_GREEN="\e[92m" ANSI_LIGHT_YELLOW="\e[93m" @@ -212,7 +216,7 @@ jobs: asset="${asset##*!}" echo " Compressing artifact '${artifact}' to '${asset}' ..." cd "${artifact}" - zip -v -r "../${asset}" * + zip -r "../${asset}" * cd - if [[ $? -eq 0 ]]; then echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" @@ -224,6 +228,23 @@ jobs: ERRORS=1 continue fi + elif [[ "${asset}" == !*tgz ]]; then + echo -e "${ANSI_LIGHT_GREEN}[TAR/GZ]${ANSI_NOCOLOR}" + asset="${asset##*!}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + cd "${artifact}" + tar -czf "../${asset}" * + cd - + if [[ $? -eq 0 ]]; then + echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + uploadFile="${asset}" + else + echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo "Couldn't compress '${artifact}' to tgz file '${asset}'." + echo "::error title=ZipError::Couldn't compress '${artifact}' to tgz file '${asset}'." + ERRORS=1 + continue + fi elif [[ -e "${artifact}/${asset}" ]]; then echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" uploadFile="${artifact}/${asset}" @@ -248,7 +269,7 @@ jobs: fi done <<<"${{ inputs.assets }}" - echo "Inspecting downlaoded artifacts ..." + echo "Inspecting downloaded artifacts ..." tree . if [[ $ERROR -ne 0 ]]; then From bafea7d0826a7127f347bac8f616315319f67422 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 27 Nov 2024 19:45:24 +0100 Subject: [PATCH 06/11] Trim leading whitespace. --- .github/workflows/NightlyRelease.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 27fb4b7..d5f81b4 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -168,18 +168,25 @@ jobs: export GH_TOKEN=${{ github.token }} ERRORS=0 + # A dictionary of 0/1 to avoid duplicate downloads declare -A downloadedArtifacts + # A dictionary to check for duplicate asset files in release declare -A assetFilenames - while IFS=$'\r\n' read -r AssetLine; do - if [[ "${AssetLine}" == "" ]]; then + while IFS=$'\r\n' read -r assetLine; do + if [[ "${assetLine}" == "" ]]; then continue fi - artifact="${AssetLine%%:*}" - remaining="${AssetLine#*:}" + # split assetLine colon separated triple: artifact:asset:title + artifact="${assetLine%%:*}" + remaining="${assetLine#*:}" asset="${remaining%%:*}" title="${remaining##*:}" + # remove leading whitespace + asset="${asset#"${asset%%[![:space:]]*}"}" + title="${title#"${title%%[![:space:]]*}"}" + echo "Publish asset '${asset}' from artifact '${artifact}' with title '${title}'" echo -n " Checked asset for duplicates ... " if [[ -n "${assetFilenames[$asset]}" ]]; then @@ -192,6 +199,7 @@ jobs: assetFilenames[$asset]=1 fi + # Download artifact by artifact name if [[ -n "${downloadedArtifacts[$artifact]}" ]]; then echo -e " downloading '${artifact}' ... ${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" else @@ -210,6 +218,7 @@ jobs: downloadedArtifacts[$artifact]=1 fi + # Check if artifact should be compressed (zip, tgz) or if asset was part of the downloaded artifact. echo -n " checking asset '${artifact}/${asset}' ... " if [[ "${asset}" == !*zip ]]; then echo -e "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}" @@ -256,6 +265,7 @@ jobs: continue fi + # Upload asset to existing release page echo -n " uploading asset '${asset}' from '${uploadFile}' with title '${title}' ... " gh release upload ${{ inputs.nightly_name }} "${uploadFile}#${title}" --clobber if [[ $? -eq 0 ]]; then @@ -270,7 +280,7 @@ jobs: done <<<"${{ inputs.assets }}" echo "Inspecting downloaded artifacts ..." - tree . + tree -L 3 . if [[ $ERROR -ne 0 ]]; then echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}" From 4c28b9d003412cbf45258b03b9d7397c7a75093c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 28 Nov 2024 08:01:02 +0100 Subject: [PATCH 07/11] Added support for ZStandard. [skip ci] --- .github/workflows/NightlyRelease.yml | 95 +++++++++++++----- .../_Checking_NamespacePackage_Pipeline.yml | 2 +- .github/workflows/_Checking_Nightly.yml | 97 +++++++++++++++++++ .../_Checking_SimplePackage_Pipeline.yml | 2 +- 4 files changed, 169 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/_Checking_Nightly.yml diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index d5f81b4..80b339d 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -71,7 +71,7 @@ jobs: permissions: contents: write actions: write - attestations: write +# attestations: write steps: - name: ⏬ Checkout repository @@ -80,6 +80,9 @@ jobs: # The command 'git describe' (used for version) needs the history. fetch-depth: 0 + - name: 🔧 Install zstd + run: sudo apt-get install -y --no-install-recommends zstd + - name: 📑 Delete (old) Release Page id: deleteReleasePage run: | @@ -100,8 +103,8 @@ jobs: echo -e "${ANSI_LIGHT_YELLOW}[NOT FOUND]${ANSI_NOCOLOR}" else echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" - echo "Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'." - echo "::error title=InternalError::Couldn't delete release '${{ inputs.nightly_name }}'." + echo -e "${ANSI_LIGHT_RED}Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}" + echo "::error title=InternalError::Couldn't delete release '${{ inputs.nightly_name }}' -> Error: '${message}'." exit 1 fi @@ -145,13 +148,13 @@ jobs: EOF echo "Creating release '${{ inputs.nightly_name }}' ... " - gh release create "${{ inputs.nightly_name }}" --verify-tag $addDraft $addPreRelease $addLatest "${addTitle[@]}" "${addNotes[@]}" + message="$(gh release create "${{ inputs.nightly_name }}" --verify-tag $addDraft $addPreRelease $addLatest "${addTitle[@]}" "${addNotes[@]}" 2>&1)" if [[ $? -eq 0 ]]; then echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" else echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" - echo "Couldn't create release '${{ inputs.nightly_name }}'." - echo "::error title=InternalError::Couldn't create release '${{ inputs.nightly_name }}'." + echo -e "${ANSI_LIGHT_RED}Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'.${ANSI_NOCOLOR}" + echo "::error title=InternalError::Couldn't create release '${{ inputs.nightly_name }}' -> Error: '${message}'." exit 1 fi @@ -210,7 +213,7 @@ jobs: echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" else echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" - echo "Couldn't download artifact '${artifact}'." + echo -e "${ANSI_LIGHT_RED}Couldn't download artifact '${artifact}'.${ANSI_NOCOLOR}" echo "::error title=ArtifactNotFound::Couldn't download artifact '${artifact}'." ERRORS=1 continue @@ -220,37 +223,79 @@ jobs: # Check if artifact should be compressed (zip, tgz) or if asset was part of the downloaded artifact. echo -n " checking asset '${artifact}/${asset}' ... " - if [[ "${asset}" == !*zip ]]; then + if [[ "${asset}" == !*.zip ]]; then echo -e "${ANSI_LIGHT_GREEN}[ZIP]${ANSI_NOCOLOR}" asset="${asset##*!}" echo " Compressing artifact '${artifact}' to '${asset}' ..." - cd "${artifact}" - zip -r "../${asset}" * - cd - + ( + cd "${artifact}" && \ + zip -r "../${asset}" * + ) if [[ $? -eq 0 ]]; then echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" uploadFile="${asset}" else echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" - echo "Couldn't compress '${artifact}' to zip file '${asset}'." - echo "::error title=ZipError::Couldn't compress '${artifact}' to zip file '${asset}'." + echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zip file '${asset}'.${ANSI_NOCOLOR}" + echo "::error title=CompressionError::Couldn't compress '${artifact}' to zip file '${asset}'." ERRORS=1 continue fi - elif [[ "${asset}" == !*tgz ]]; then + elif [[ "${asset}" == !*.tgz || "${asset}" == !*.tar.gz || "${asset}" == \$*.tgz || "${asset}" == \$*.tar.gz ]]; then echo -e "${ANSI_LIGHT_GREEN}[TAR/GZ]${ANSI_NOCOLOR}" - asset="${asset##*!}" - echo " Compressing artifact '${artifact}' to '${asset}' ..." - cd "${artifact}" - tar -czf "../${asset}" * - cd - - if [[ $? -eq 0 ]]; then + + if [[ "${asset:0:1}" == "\$" ]]; then + asset="${asset##*$}" + dirName="${asset%.*}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + tar -c --gzip --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" . + retCode=$? + else + asset="${asset##*!}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + ( + cd "${artifact}" && \ + tar -c --gzip --file="../${asset}" * + ) + retCode=$? + fi + + if [[ $retCode -eq 0 ]]; then echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" uploadFile="${asset}" else echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" - echo "Couldn't compress '${artifact}' to tgz file '${asset}'." - echo "::error title=ZipError::Couldn't compress '${artifact}' to tgz file '${asset}'." + echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to tgz file '${asset}'.${ANSI_NOCOLOR}" + echo "::error title=CompressionError::Couldn't compress '${artifact}' to tgz file '${asset}'." + ERRORS=1 + continue + fi + elif [[ "${asset}" == !*.tzst || "${asset}" == !*.tar.zst || "${asset}" == \$*.tzst || "${asset}" == \$*.tar.zst ]]; then + echo -e "${ANSI_LIGHT_GREEN}[ZST]${ANSI_NOCOLOR}" + + if [[ "${asset:0:1}" == "\$" ]]; then + asset="${asset##*$}" + dirName="${asset%.*}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + tar -c --zstd --file="${asset}" --directory="${artifact}" --transform "s|^\.|${dirName%.tar}|" . + retCode=$? + else + asset="${asset##*!}" + echo " Compressing artifact '${artifact}' to '${asset}' ..." + ( + cd "${artifact}" && \ + tar -c --zstd --file="../${asset}" * + ) + retCode=$? + fi + + if [[ $retCode -eq 0 ]]; then + echo -e " Compression ${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + uploadFile="${asset}" + else + echo -e " Compression ${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo -e "${ANSI_LIGHT_RED}Couldn't compress '${artifact}' to zst file '${asset}'.${ANSI_NOCOLOR}" + echo "::error title=CompressionError::Couldn't compress '${artifact}' to zst file '${asset}'." ERRORS=1 continue fi @@ -259,7 +304,7 @@ jobs: uploadFile="${artifact}/${asset}" else echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" - echo "Couldn't find asset '${asset}' in artifact '${artifact}'." + echo -e "${ANSI_LIGHT_RED}Couldn't find asset '${asset}' in artifact '${artifact}'.${ANSI_NOCOLOR}" echo "::error title=FileNotFound::Couldn't find asset '${asset}' in artifact '${artifact}'." ERRORS=1 continue @@ -272,12 +317,12 @@ jobs: echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" else echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" - echo "Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'." + echo -e "${ANSI_LIGHT_RED}Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}" echo "::error title=UploadError::Couldn't upload asset '${asset}' from '${uploadFile}' to release '${{ inputs.nightly_name }}'." ERRORS=1 continue fi - done <<<"${{ inputs.assets }}" + done <<<'${{ inputs.assets }}' echo "Inspecting downloaded artifacts ..." tree -L 3 . diff --git a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml index 0389b9a..11e9035 100644 --- a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml +++ b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml @@ -1,4 +1,4 @@ -name: Verification of Pipeline Templates +name: Verification of Pipeline Templates (Namespace Package) on: push: diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml new file mode 100644 index 0000000..6df4383 --- /dev/null +++ b/.github/workflows/_Checking_Nightly.yml @@ -0,0 +1,97 @@ +name: Verification of Nightly Releases + +on: + push: + workflow_dispatch: + +jobs: + Build: + name: Build something + runs-on: ubuntu-24.04 + + steps: + - name: 🖉 Build 1 + run: | + echo "Document 1 $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt + echo "Analysis log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > analysis.log + echo "Build log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > build.log + + - name: 📤 Upload artifact + uses: actions/upload-artifact@v4 + with: + name: document + path: | + document1.txt + *.log + if-no-files-found: error + retention-days: 1 + + - name: 🖉 Program + run: | + echo "Document other $(date --utc '+%d.%m.%Y - %H:%M:%S')" > document1.txt + echo "Program $(date --utc '+%d.%m.%Y - %H:%M:%S')" > program.py + + - name: 📤 Upload artifact + uses: actions/upload-artifact@v4 + with: + name: other + path: | + *.txt + *.py + if-no-files-found: error + retention-days: 1 + + NightlyPage: + uses: ./.github/workflows/NightlyRelease.yml + needs: + - Build + secrets: inherit + permissions: + contents: write + actions: write +# attestations: write + with: + prerelease: true + nightly_title: "Nightly Release" + nightly_description: | + This *nightly* release contains all latest and important artifacts created by GHDL's CI pipeline. + + # GHDL 5.0.0-dev + + GHDL offers the simulator and synthesis tool for VHDL. GHDL can be build for various backends: + * `gcc` - using the GCC compiler framework + * `mcode` - in memory code generation + * `llvm` - using the LLVM compiler framework + * `llvm-jit` - using the LLVM compiler framework, but in memory + + The following asset categories are provided for GHDL: + * macOS x64-64 builds as TAR/GZ file + * macOS aarch64 builds as TAR/GZ file + * Ubuntu 24.04 LTS builds as TAR/GZ file + * Windows builds for standalone usage (without MSYS2) as ZIP file + * MSYS2 packages as TAR/ZST file + + # pyGHDL 5.0.0-dev + + The Python package `pyGHDL` offers Python binding (`pyGHDL.libghdl`) to a `libghdl` shared library (`*.so`/`*.dll`). + In addition to the low-level binding layer, pyGHDL offers: + * a Language Server Protocol (LSP) instance for e.g. live code checking by editors + * a Code Document Object Model (CodeDOM) based on [pyVHDLModel](https://github.com/VHDL/pyVHDLModel) + + The following asset categories are provided for pyGHDL: + * Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so` + * Platform specific Python wheel package for Windows incl. `pyGHDL...dll` + assets: | + document: document1.txt: Documentation + document: build.log: Logfile + other: document1.txt: SBOM + other: program.py: Application + document:!archive1.zip: Archive 1 - zip + document:!archive2.tgz: Archive 2 - tgz + document:!archive3.tar.gz: Archive 3 - tar.gz + document:!archive4.tzst: Archive 4 - tzst + document:!archive5.tar.zst:Archive 5 - tar.zst + document:$archive6.tgz: Archive 6 - tgz + dir + document:$archive7.tar.gz: Archive 7 - tar.gz + dir + document:$archive8.tzst: Archive 8 - tzst + dir + document:$archive9.tar.zst:Archive 9 - tar.zst + dir diff --git a/.github/workflows/_Checking_SimplePackage_Pipeline.yml b/.github/workflows/_Checking_SimplePackage_Pipeline.yml index a56af1b..3331c72 100644 --- a/.github/workflows/_Checking_SimplePackage_Pipeline.yml +++ b/.github/workflows/_Checking_SimplePackage_Pipeline.yml @@ -1,4 +1,4 @@ -name: Verification of Pipeline Templates +name: Verification of Pipeline Templates (Simple Package) on: push: From 7733e8998ffa5d777a3f60b434cf1cddb9ea84d8 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 1 Dec 2024 21:20:26 +0100 Subject: [PATCH 08/11] Supporting replacements in NightlyReleases. --- .github/workflows/NightlyRelease.yml | 22 ++++++++++++++++++++ .github/workflows/_Checking_JobTemplates.yml | 2 -- .github/workflows/_Checking_Nightly.yml | 10 ++++++--- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 80b339d..74296ae 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -59,6 +59,11 @@ on: required: false default: false type: boolean + replacements: + description: 'Multi-line string containing search=replace patterns.' + required: false + default: '' + type: string assets: description: 'Multi-line string containing artifact:file:title asset descriptions.' required: true @@ -170,6 +175,19 @@ jobs: export GH_TOKEN=${{ github.token }} + Replace() { + line="$1" + while IFS=$'\r\n' read -r patternLine; do + # skipp empty lines + [[ "$patternLine" == "" ]] && continue + + pattern="${patternLine%%=*}" + replacement="${patternLine#*=}" + line="${line//"%$pattern%"/"$replacement"}" + done <<<'${{ inputs.replacements }}' + echo "$line" + } + ERRORS=0 # A dictionary of 0/1 to avoid duplicate downloads declare -A downloadedArtifacts @@ -190,6 +208,10 @@ jobs: asset="${asset#"${asset%%[![:space:]]*}"}" title="${title#"${title%%[![:space:]]*}"}" + # apply replacements + asset="$(Replace "${asset}")" + title="$(Replace "${title}")" + echo "Publish asset '${asset}' from artifact '${artifact}' with title '${title}'" echo -n " Checked asset for duplicates ... " if [[ -n "${assetFilenames[$asset]}" ]]; then diff --git a/.github/workflows/_Checking_JobTemplates.yml b/.github/workflows/_Checking_JobTemplates.yml index 1cf5fff..53ec96b 100644 --- a/.github/workflows/_Checking_JobTemplates.yml +++ b/.github/workflows/_Checking_JobTemplates.yml @@ -7,8 +7,6 @@ on: jobs: ConfigParams: uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev - needs: - - DocCoverage with: package_name: pyDummy diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml index 6df4383..8862278 100644 --- a/.github/workflows/_Checking_Nightly.yml +++ b/.github/workflows/_Checking_Nightly.yml @@ -81,11 +81,15 @@ jobs: The following asset categories are provided for pyGHDL: * Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so` * Platform specific Python wheel package for Windows incl. `pyGHDL...dll` + replacements: | + version=2.0 + tool=myTool + prog=program assets: | document: document1.txt: Documentation - document: build.log: Logfile - other: document1.txt: SBOM - other: program.py: Application + document: build.log: Logfile - %tool% - %tool% + other: document1.txt: SBOM - %version% + other: %prog%.py: Application - %tool% - %version% document:!archive1.zip: Archive 1 - zip document:!archive2.tgz: Archive 2 - tgz document:!archive3.tar.gz: Archive 3 - tar.gz From 50d32d19503493f7885555d2ba89d5d3791a5f93 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Dec 2024 08:01:26 +0100 Subject: [PATCH 09/11] Replace also in description text. --- .github/workflows/NightlyRelease.yml | 38 +++++++++++++++++++++++-- .github/workflows/_Checking_Nightly.yml | 12 ++++---- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 74296ae..7d90876 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -124,9 +124,7 @@ jobs: export GH_TOKEN=${{ github.token }} - if ${{ inputs.draft }}; then - addDraft="--draft" - fi + addDraft="--draft" if ${{ inputs.prerelease }}; then addPreRelease="--prerelease" @@ -146,6 +144,18 @@ jobs: if [[ -s __NoTeS__.md ]]; then addNotes=("--notes-file" "__NoTeS__.md") fi + + # Apply replacements + while IFS=$'\r\n' read -r patternLine; do + # skipp empty lines + [[ "$patternLine" == "" ]] && continue + + pattern="${patternLine%%=*}" + replacement="${patternLine#*=}" + sed -i -e "s/%$pattern%/$replacement/g" "__NoTeS__.md" + done <<<'${{ inputs.replacements }}' + + # Add footer line cat <> __NoTeS__.md -------- @@ -353,3 +363,25 @@ jobs: echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}" exit 1 fi + + - name: 📑 Remove draft state from Release Page + if: ${{ ! inputs.draft }} + run: | + set +e + + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_NOCOLOR="\e[0m" + + export GH_TOKEN=${{ github.token }} + + # Remove draft-state from release page + echo -n "Remove draft-state from release '${title}' ... " + gh release edit --draft=false "${{ inputs.nightly_name }}" + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo -e "${ANSI_LIGHT_RED}Couldn't remove draft-state from release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}" + echo "::error title=ReleasePage::Couldn't remove draft-state from release '${{ inputs.nightly_name }}'." + fi diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml index 8862278..cfb4b45 100644 --- a/.github/workflows/_Checking_Nightly.yml +++ b/.github/workflows/_Checking_Nightly.yml @@ -52,11 +52,15 @@ jobs: # attestations: write with: prerelease: true + replacements: | + version=4.2.0 + tool=myTool + prog=program nightly_title: "Nightly Release" nightly_description: | This *nightly* release contains all latest and important artifacts created by GHDL's CI pipeline. - # GHDL 5.0.0-dev + # GHDL %version% GHDL offers the simulator and synthesis tool for VHDL. GHDL can be build for various backends: * `gcc` - using the GCC compiler framework @@ -71,7 +75,7 @@ jobs: * Windows builds for standalone usage (without MSYS2) as ZIP file * MSYS2 packages as TAR/ZST file - # pyGHDL 5.0.0-dev + # pyGHDL %version% The Python package `pyGHDL` offers Python binding (`pyGHDL.libghdl`) to a `libghdl` shared library (`*.so`/`*.dll`). In addition to the low-level binding layer, pyGHDL offers: @@ -81,10 +85,6 @@ jobs: The following asset categories are provided for pyGHDL: * Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so` * Platform specific Python wheel package for Windows incl. `pyGHDL...dll` - replacements: | - version=2.0 - tool=myTool - prog=program assets: | document: document1.txt: Documentation document: build.log: Logfile - %tool% - %tool% From 6d04009bd60eea4033256dba9d7d9206f4acbc86 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 7 Dec 2024 10:20:00 +0100 Subject: [PATCH 10/11] Use new pyTooling/upload-artifact pyTooling/download-artifact composite actions. --- .github/workflows/ApplicationTesting.yml | 4 ++-- .github/workflows/BuildTheDocs.yml | 2 +- .github/workflows/CoverageCollection.yml | 2 +- .github/workflows/LaTeXDocumentation.yml | 4 ++-- .github/workflows/NightlyRelease.yml | 4 ++-- .github/workflows/Package.yml | 2 +- .github/workflows/PublishCoverageResults.yml | 10 +++++----- .github/workflows/PublishOnPyPI.yml | 2 +- .github/workflows/PublishTestResults.yml | 4 ++-- .github/workflows/PublishToGitHubPages.yml | 6 +++--- .github/workflows/SphinxDocumentation.yml | 12 ++++++------ .github/workflows/StaticTypeCheck.yml | 4 ++-- .github/workflows/UnitTesting.yml | 12 ++++++------ .github/workflows/_Checking_ArtifactCleanup.yml | 4 ++-- .github/workflows/_Checking_Nightly.yml | 4 ++-- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ApplicationTesting.yml b/.github/workflows/ApplicationTesting.yml index 3f91d6a..f2f5b70 100644 --- a/.github/workflows/ApplicationTesting.yml +++ b/.github/workflows/ApplicationTesting.yml @@ -89,7 +89,7 @@ jobs: uses: actions/checkout@v4 - name: 📥 Download artifacts '${{ inputs.wheel }}' from 'Package' job - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.wheel }} path: install @@ -255,7 +255,7 @@ jobs: - name: 📤 Upload 'TestReportSummary.xml' artifact if: inputs.apptest_xml_artifact != '' - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.apptest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: report/unit/TestReportSummary.xml diff --git a/.github/workflows/BuildTheDocs.yml b/.github/workflows/BuildTheDocs.yml index 44152e1..3c635d8 100644 --- a/.github/workflows/BuildTheDocs.yml +++ b/.github/workflows/BuildTheDocs.yml @@ -50,7 +50,7 @@ jobs: - name: 📤 Upload 'documentation' artifacts if: inputs.artifact != '' - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} path: doc/_build/html diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index 1cbcfbf..8ae5de0 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -163,7 +163,7 @@ jobs: - name: 📤 Upload 'Coverage Report' artifact continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} diff --git a/.github/workflows/LaTeXDocumentation.yml b/.github/workflows/LaTeXDocumentation.yml index a12bc0a..47d3933 100644 --- a/.github/workflows/LaTeXDocumentation.yml +++ b/.github/workflows/LaTeXDocumentation.yml @@ -50,7 +50,7 @@ jobs: runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}" steps: - name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.latex_artifact }} path: latex @@ -62,7 +62,7 @@ jobs: root_file: ${{ inputs.document }}.tex - name: 📤 Upload 'PDF Documentation' artifact - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 if: inputs.pdf_artifact != '' with: name: ${{ inputs.pdf_artifact }} diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 7d90876..079b60b 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -147,7 +147,7 @@ jobs: # Apply replacements while IFS=$'\r\n' read -r patternLine; do - # skipp empty lines + # skip empty lines [[ "$patternLine" == "" ]] && continue pattern="${patternLine%%=*}" @@ -188,7 +188,7 @@ jobs: Replace() { line="$1" while IFS=$'\r\n' read -r patternLine; do - # skipp empty lines + # skip empty lines [[ "$patternLine" == "" ]] && continue pattern="${patternLine%%=*}" diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index 2228a0f..dc851a5 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -106,7 +106,7 @@ jobs: run: python setup.py bdist_wheel - name: 📤 Upload wheel artifact - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} path: dist/ diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index a3d66d7..8f5ac53 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -73,7 +73,7 @@ jobs: submodules: true - name: Download Artifacts - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: path: artifacts @@ -173,7 +173,7 @@ jobs: - name: 📤 Upload 'Coverage SQLite Database' artifact if: inputs.coverage_sqlite_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_sqlite_artifact }} path: .coverage @@ -183,7 +183,7 @@ jobs: - name: 📤 Upload 'Coverage XML Report' artifact if: inputs.coverage_xml_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_xml_artifact }} path: ${{ steps.getVariables.outputs.coverage_report_xml }} @@ -193,7 +193,7 @@ jobs: - name: 📤 Upload 'Coverage JSON Report' artifact if: inputs.coverage_json_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_json_artifact }} path: ${{ steps.getVariables.outputs.coverage_report_json }} @@ -203,7 +203,7 @@ jobs: - name: 📤 Upload 'Coverage HTML Report' artifact if: inputs.coverage_html_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_html_artifact }} path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} diff --git a/.github/workflows/PublishOnPyPI.yml b/.github/workflows/PublishOnPyPI.yml index 637fe00..49dee29 100644 --- a/.github/workflows/PublishOnPyPI.yml +++ b/.github/workflows/PublishOnPyPI.yml @@ -57,7 +57,7 @@ jobs: steps: - name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.artifact }} path: dist/ diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index 071ce4b..dfdd142 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -62,7 +62,7 @@ jobs: uses: actions/checkout@v4 - name: Download Artifacts - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: path: artifacts @@ -93,7 +93,7 @@ jobs: - name: 📤 Upload merged 'JUnit Test Summary' artifact if: inputs.merged_junit_artifact != '' - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.merged_junit_artifact }} path: Unittesting.xml diff --git a/.github/workflows/PublishToGitHubPages.yml b/.github/workflows/PublishToGitHubPages.yml index 6fbf320..ef53cf2 100644 --- a/.github/workflows/PublishToGitHubPages.yml +++ b/.github/workflows/PublishToGitHubPages.yml @@ -56,21 +56,21 @@ jobs: uses: actions/checkout@v4 - name: 📥 Download artifacts '${{ inputs.doc }}' from 'BuildTheDocs' job - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.doc }} path: public - name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job if: ${{ inputs.coverage != '' }} - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.coverage }} path: public/coverage - name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job if: ${{ inputs.typing != '' }} - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.typing }} path: public/typing diff --git a/.github/workflows/SphinxDocumentation.yml b/.github/workflows/SphinxDocumentation.yml index ce64092..37fe991 100644 --- a/.github/workflows/SphinxDocumentation.yml +++ b/.github/workflows/SphinxDocumentation.yml @@ -101,14 +101,14 @@ jobs: - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job if: inputs.unittest_xml_artifact != '' - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 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: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.coverage_json_artifact }} path: ${{ inputs.coverage_report_json_directory }} @@ -124,7 +124,7 @@ jobs: - name: 📤 Upload 'HTML Documentation' artifact if: inputs.html_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} path: ${{ inputs.doc_directory }}/_build/html @@ -157,14 +157,14 @@ jobs: - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job if: inputs.unittest_xml_artifact != '' - uses: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 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: actions/download-artifact@v4 + uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.coverage_json_artifact }} path: ${{ inputs.coverage_report_json_directory }} @@ -182,7 +182,7 @@ jobs: - name: 📤 Upload 'LaTeX Documentation' artifact if: inputs.latex_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.latex_artifact }} path: ${{ inputs.doc_directory }}/_build/latex diff --git a/.github/workflows/StaticTypeCheck.yml b/.github/workflows/StaticTypeCheck.yml index feb8c69..f750a11 100644 --- a/.github/workflows/StaticTypeCheck.yml +++ b/.github/workflows/StaticTypeCheck.yml @@ -89,7 +89,7 @@ jobs: - name: 📤 Upload 'Static Typing Report' HTML artifact if: ${{ inputs.html_artifact != '' }} continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} path: ${{ inputs.html_report }} @@ -99,7 +99,7 @@ jobs: - name: 📤 Upload 'Static Typing Report' JUnit artifact if: ${{ inputs.junit_artifact != '' }} continue-on-error: true - uses: actions/upload-artifact@v4 + 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 3a36cdb..4b32c39 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -442,7 +442,7 @@ jobs: - name: 📤 Upload 'TestReportSummary.xml' artifact if: inputs.unittest_xml_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.unittest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: report/unit/TestReportSummary.xml @@ -452,7 +452,7 @@ jobs: # - name: 📤 Upload 'Unit Tests HTML Report' artifact # if: inputs.unittest_html_artifact != '' # continue-on-error: true -# uses: actions/upload-artifact@v4 +# uses: pyTooling/upload-artifact@v4 # with: # name: ${{ inputs.unittest_html_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} # path: ${{ steps.getVariables.outputs.unittest_report_html_directory }} @@ -462,7 +462,7 @@ jobs: - name: 📤 Upload 'Coverage SQLite Database' artifact if: inputs.coverage_sqlite_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_sqlite_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: .coverage @@ -473,7 +473,7 @@ jobs: - name: 📤 Upload 'Coverage XML Report' artifact if: inputs.coverage_xml_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: ${{ steps.getVariables.outputs.coverage_report_xml }} @@ -483,7 +483,7 @@ jobs: - name: 📤 Upload 'Coverage JSON Report' artifact if: inputs.coverage_json_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_json_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: ${{ steps.getVariables.outputs.coverage_report_json }} @@ -493,7 +493,7 @@ jobs: - name: 📤 Upload 'Coverage HTML Report' artifact if: inputs.coverage_html_artifact != '' continue-on-error: true - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_html_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} diff --git a/.github/workflows/_Checking_ArtifactCleanup.yml b/.github/workflows/_Checking_ArtifactCleanup.yml index c8cba7a..f2133ff 100644 --- a/.github/workflows/_Checking_ArtifactCleanup.yml +++ b/.github/workflows/_Checking_ArtifactCleanup.yml @@ -25,7 +25,7 @@ jobs: run: echo "${{ matrix.runs-on }}-${{ matrix.python }}" >> artifact.txt - name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }} - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-${{ matrix.system }}-${{ matrix.python }} path: artifact.txt @@ -42,7 +42,7 @@ jobs: run: echo "Package" >> package.txt - name: 📤 Upload artifact for ${{ matrix.system }}-${{ matrix.python }} - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} path: package.txt diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml index cfb4b45..fcc6f5f 100644 --- a/.github/workflows/_Checking_Nightly.yml +++ b/.github/workflows/_Checking_Nightly.yml @@ -17,7 +17,7 @@ jobs: echo "Build log $(date --utc '+%d.%m.%Y - %H:%M:%S')" > build.log - name: 📤 Upload artifact - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: document path: | @@ -32,7 +32,7 @@ jobs: echo "Program $(date --utc '+%d.%m.%Y - %H:%M:%S')" > program.py - name: 📤 Upload artifact - uses: actions/upload-artifact@v4 + uses: pyTooling/upload-artifact@v4 with: name: other path: | From f084e02f01fdf3e4873f445f0f9ee3063925170f Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 7 Dec 2024 19:11:33 +0100 Subject: [PATCH 11/11] Use pattern to reduce the number of downloaded artifacts. --- .github/workflows/ApplicationTesting.yml | 3 ++- .github/workflows/BuildTheDocs.yml | 3 ++- .github/workflows/CoverageCollection.yml | 3 ++- .github/workflows/Package.yml | 3 ++- .github/workflows/PublishCoverageResults.yml | 12 +++++++++++- .github/workflows/PublishOnPyPI.yml | 2 +- .github/workflows/PublishTestResults.yml | 9 +++++++++ .github/workflows/SphinxDocumentation.yml | 6 ++++-- .github/workflows/StaticTypeCheck.yml | 3 ++- .github/workflows/UnitTesting.yml | 6 ++++-- 10 files changed, 39 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ApplicationTesting.yml b/.github/workflows/ApplicationTesting.yml index f2f5b70..5196901 100644 --- a/.github/workflows/ApplicationTesting.yml +++ b/.github/workflows/ApplicationTesting.yml @@ -258,6 +258,7 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.apptest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} - path: report/unit/TestReportSummary.xml + working-directory: report/unit + path: TestReportSummary.xml if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/BuildTheDocs.yml b/.github/workflows/BuildTheDocs.yml index 3c635d8..330cd3c 100644 --- a/.github/workflows/BuildTheDocs.yml +++ b/.github/workflows/BuildTheDocs.yml @@ -53,7 +53,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} - path: doc/_build/html + working-directory: doc/_build/html + path: '*' retention-days: 1 - name: '📓 Publish site to GitHub Pages' diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index e5df5df..3bdf272 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -166,7 +166,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} - path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + path: '*' if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index dc851a5..d16e9f7 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -109,6 +109,7 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.artifact }} - path: dist/ + working-directory: dist + path: '*' if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index 8a01fc1..03b0cc3 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -29,6 +29,10 @@ on: required: false default: '24.04' type: string + coverage_artifacts_pattern: + required: false + default: '*-CodeCoverage-*' + type: string coverage_config: description: 'Path to the .coveragerc file. Use pyproject.toml by default.' required: false @@ -75,8 +79,13 @@ jobs: - name: Download Artifacts uses: pyTooling/download-artifact@v4 with: + pattern: ${{ inputs.coverage_artifacts_pattern }} path: artifacts + - name: 🔎 Inspect extracted artifact (tarball) + run: | + tree -psh artifacts + - name: 🔧 Install coverage and tomli run: | python -m pip install -U --disable-pip-version-check --break-system-packages coverage[toml] tomli @@ -206,7 +215,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_html_artifact }} - path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + path: '*' if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/PublishOnPyPI.yml b/.github/workflows/PublishOnPyPI.yml index 49dee29..030cf31 100644 --- a/.github/workflows/PublishOnPyPI.yml +++ b/.github/workflows/PublishOnPyPI.yml @@ -60,7 +60,7 @@ jobs: uses: pyTooling/download-artifact@v4 with: name: ${{ inputs.artifact }} - path: dist/ + path: dist - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v5 diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index dfdd142..91fca35 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -30,6 +30,10 @@ on: required: false default: '24.04' type: string + unittest_artifacts_pattern: + required: false + default: '*-UnitTestReportSummary-*' + type: string merged_junit_artifact: description: 'Name of the merged JUnit Test Summary artifact.' required: false @@ -64,8 +68,13 @@ jobs: - name: Download Artifacts uses: pyTooling/download-artifact@v4 with: + pattern: ${{ inputs.unittest_artifacts_pattern }} path: artifacts + - name: 🔎 Inspect extracted artifact (tarball) + run: | + tree -psh artifacts + - name: 🔧 Install pyEDAA.Reports (JUunit Parser and Merger) run: | python -m pip install --disable-pip-version-check --break-system-packages -U pyEDAA.Reports diff --git a/.github/workflows/SphinxDocumentation.yml b/.github/workflows/SphinxDocumentation.yml index 37fe991..8a6e730 100644 --- a/.github/workflows/SphinxDocumentation.yml +++ b/.github/workflows/SphinxDocumentation.yml @@ -127,7 +127,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} - path: ${{ inputs.doc_directory }}/_build/html + working-directory: ${{ inputs.doc_directory }}/_build/html + path: '*' if-no-files-found: error retention-days: 1 @@ -185,6 +186,7 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.latex_artifact }} - path: ${{ inputs.doc_directory }}/_build/latex + working-directory: ${{ inputs.doc_directory }}/_build/latex + path: '*' if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/StaticTypeCheck.yml b/.github/workflows/StaticTypeCheck.yml index f750a11..7554a10 100644 --- a/.github/workflows/StaticTypeCheck.yml +++ b/.github/workflows/StaticTypeCheck.yml @@ -92,7 +92,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.html_artifact }} - path: ${{ inputs.html_report }} + working-directory: ${{ inputs.html_report }} + path: '*' if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 4b32c39..7b32f23 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -445,7 +445,8 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.unittest_xml_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} - path: report/unit/TestReportSummary.xml + working-directory: report/unit + path: TestReportSummary.xml if-no-files-found: error retention-days: 1 @@ -496,6 +497,7 @@ jobs: uses: pyTooling/upload-artifact@v4 with: name: ${{ inputs.coverage_html_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }} - path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + working-directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }} + path: '*' if-no-files-found: error retention-days: 1