v0.4.3 #731
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pipeline | |
| on: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| # Every Friday at 22:00 - rerun pipeline to check for dependency-based issues | |
| - cron: '0 22 * * 5' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| Prepare: | |
| uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@r7 | |
| ConfigParams: | |
| uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@r7 | |
| UnitTestingParams: | |
| uses: pyTooling/Actions/.github/workflows/Parameters.yml@r7 | |
| with: | |
| package_namespace: 'pyEDAA' | |
| package_name: 'CLITool' | |
| python_version_list: '3.11 3.12 3.13 3.14 pypy-3.11' | |
| exclude_list: 'ubuntu-arm:* windows-arm:*' | |
| disable_list: 'macos:*' # GHDL 7.0.0-dev not yet build for macos-15 intel | |
| UnitTesting: | |
| uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r7 | |
| needs: | |
| - ConfigParams | |
| - UnitTestingParams | |
| with: | |
| jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} | |
| ubuntu_before_script: | | |
| ( | |
| mkdir -p install-ghdl | |
| cd install-ghdl | |
| curl -L "https://github.com/ghdl/ghdl/releases/download/nightly/ghdl-mcode-7.0.0-dev-ubuntu26.04-x86_64.tar.gz" | tar -xz --strip-components 1 | |
| ( | |
| cd bin | |
| pwd | |
| ls -lAh . | |
| ) | |
| # tree . | |
| sudo xargs --no-run-if-empty -a ./ubuntu.requirements -- apt-get install -y --no-install-recommends | |
| ) | |
| tee --append "${GITHUB_ENV}" <<EOF | |
| GHDL_PREFIX=$(pwd)/install-ghdl/lib/ghdl | |
| EOF | |
| ( | |
| mkdir -p install-nvc | |
| cd install-nvc | |
| curl -L --output "nvc.deb" "https://github.com/nickg/nvc/releases/download/r1.21.1/nvc_1.21.1-1_amd64_ubuntu-26.04.deb" | |
| sudo dpkg -i nvc.deb | |
| sudo apt-get install -f | |
| ) | |
| macos_before_script: | | |
| ( | |
| mkdir -p install-ghdl | |
| cd install-ghdl | |
| curl -L "https://github.com/ghdl/ghdl/releases/download/nightly/ghdl-mcode-7.0.0-dev-macos15-x86_64.tar.gz" | tar -xz --strip-components 1 | |
| ( | |
| cd bin | |
| pwd | |
| ls -lAh . | |
| ) | |
| ) | |
| # WORKAROUND: tee does not support --append on macos | |
| echo "GHDL_PREFIX=$(pwd)/install-ghdl/lib/ghdl >> $GITHUB_ENV" | |
| echo "GHDL_PREFIX=$(pwd)/install-ghdl/lib/ghdl" >> $GITHUB_ENV | |
| macos_arm_before_script: | | |
| ( | |
| mkdir -p install-ghdl | |
| cd install-ghdl | |
| curl -L "https://github.com/ghdl/ghdl/releases/download/nightly/ghdl-llvm-7.0.0-dev-macos14-aarch64.tar.gz" | tar -xz --strip-components 1 | |
| ( | |
| cd bin | |
| pwd | |
| ls -lAh . | |
| ) | |
| ) | |
| # WORKAROUND: tee does not support --append on macos | |
| echo "GHDL_PREFIX=$(pwd)/install-ghdl/lib/ghdl >> $GITHUB_ENV" | |
| echo "GHDL_PREFIX=$(pwd)/install-ghdl/lib/ghdl" >> $GITHUB_ENV | |
| windows_before_script: | | |
| curl -L --output "ghdl.zip" "https://github.com/ghdl/ghdl/releases/download/nightly/ghdl-mcode-7.0.0-dev-ucrt64.zip" | |
| mkdir install-ghdl | |
| cd install-ghdl | |
| unzip -q ../ghdl.zip | |
| #echo "Content of $((pwd).Path):" | |
| #dir | |
| cd .. | |
| echo "------------------------------------------------------" | |
| ./install-ghdl/bin/ghdl.exe --version | |
| echo "------------------------------------------------------" | |
| echo "GHDL_PREFIX=$((pwd).Path)\install-ghdl\lib\ghdl >> $env:GITHUB_ENV" | |
| echo "GHDL_PREFIX=$((pwd).Path)\install-ghdl\lib\ghdl" >> $env:GITHUB_ENV | |
| winget install --accept-source-agreements --silent NickGasson.NVC | |
| mingw64_before_script: | | |
| curl -L "https://github.com/ghdl/ghdl/releases/download/nightly/mingw-w64-x86_64-ghdl-mcode-7.0.0.dev-1-any.pkg.tar.zst" -o ghdl.pkg.tar.zst | |
| pacman -U --noconfirm ghdl.pkg.tar.zst | |
| which ghdl | |
| ghdl version | |
| tee --append "${GITHUB_ENV}" <<EOF | |
| GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) | |
| EOF | |
| ucrt64_before_script: | | |
| curl -L "https://github.com/ghdl/ghdl/releases/download/nightly/mingw-w64-ucrt-x86_64-ghdl-mcode-7.0.0.dev-1-any.pkg.tar.zst" -o ghdl.pkg.tar.zst | |
| pacman -U --noconfirm ghdl.pkg.tar.zst | |
| which ghdl | |
| ghdl version | |
| tee --append "${GITHUB_ENV}" <<EOF | |
| GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) | |
| EOF | |
| requirements: '-r tests/unit/requirements.txt' | |
| unittest_report_xml: ${{ needs.ConfigParams.outputs.unittest_report_xml }} | |
| coverage_report_html: ${{ needs.ConfigParams.outputs.coverage_report_html }} | |
| unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} | |
| coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} | |
| StaticTypeCheck: | |
| uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r7 | |
| needs: | |
| - ConfigParams | |
| - UnitTestingParams | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| html_report: ${{ needs.ConfigParams.outputs.typing_report_html }} | |
| html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} | |
| CodeQuality: | |
| uses: pyTooling/Actions/.github/workflows/CheckCodeQuality.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| package_directory: ${{ needs.UnitTestingParams.outputs.package_directory }} | |
| bandit: 'true' | |
| pylint: 'false' | |
| artifact: CodeQuality | |
| DocCoverage: | |
| uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| directory: ${{ needs.UnitTestingParams.outputs.package_directors }} | |
| Package: | |
| uses: pyTooling/Actions/.github/workflows/Package.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} | |
| # AppTesting? | |
| PublishCoverageResults: | |
| uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@r7 | |
| needs: | |
| - ConfigParams | |
| - UnitTestingParams | |
| - UnitTesting | |
| if: success() || failure() | |
| with: | |
| coverage_report_json: ${{ needs.ConfigParams.outputs.coverage_report_json }} | |
| coverage_report_html: ${{ needs.ConfigParams.outputs.coverage_report_html }} | |
| coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} | |
| coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} | |
| codecov: 'true' | |
| codacy: 'true' | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| CODACY_TOKEN: ${{ secrets.CODACY_TOKEN }} | |
| PublishTestResults: | |
| uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r7 | |
| needs: | |
| - ConfigParams | |
| - UnitTestingParams | |
| - UnitTesting | |
| if: success() || failure() | |
| with: | |
| testsuite-summary-name: ${{ needs.UnitTestingParams.outputs.package_fullname }} | |
| merged_junit_filename: ${{ fromJson(needs.ConfigParams.outputs.unittest_merged_report_xml).filename }} | |
| merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} | |
| dorny: 'true' | |
| codecov: 'true' | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| Documentation: | |
| uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r7 | |
| needs: | |
| - ConfigParams | |
| - UnitTestingParams | |
| - PublishTestResults | |
| - PublishCoverageResults | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| coverage_report_json: ${{ needs.ConfigParams.outputs.coverage_report_json }} | |
| unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} | |
| coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} | |
| html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} | |
| latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} | |
| IntermediateCleanUp: | |
| uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| - PublishCoverageResults | |
| - PublishTestResults | |
| with: | |
| sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}- | |
| xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}- | |
| PDFDocumentation: | |
| uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| - Documentation | |
| with: | |
| document: ${{ needs.UnitTestingParams.outputs.package_fullname }} | |
| latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} | |
| pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} | |
| can-fail: 'true' | |
| PublishToGitHubPages: | |
| uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| - Documentation | |
| # - PDFDocumentation | |
| - PublishCoverageResults | |
| - StaticTypeCheck | |
| with: | |
| doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} | |
| coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} | |
| typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} | |
| TriggerTaggedRelease: | |
| uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@r7 | |
| needs: | |
| - Prepare | |
| - UnitTesting | |
| # - AppTesting | |
| # - StaticTypeCheck | |
| - Package | |
| - PublishToGitHubPages | |
| if: needs.Prepare.outputs.is_release_commit == 'true' && github.event_name != 'schedule' | |
| permissions: | |
| contents: write # required for create tag | |
| actions: write # required for trigger workflow | |
| with: | |
| version: ${{ needs.Prepare.outputs.version }} | |
| auto_tag: ${{ needs.Prepare.outputs.is_release_commit }} | |
| secrets: inherit | |
| ReleasePage: | |
| uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@r7 | |
| needs: | |
| - Prepare | |
| - UnitTesting | |
| # - AppTesting | |
| # - StaticTypeCheck | |
| - Package | |
| - PublishToGitHubPages | |
| if: needs.Prepare.outputs.is_release_tag == 'true' | |
| permissions: | |
| contents: write | |
| actions: write | |
| with: | |
| tag: ${{ needs.Prepare.outputs.version }} | |
| secrets: inherit | |
| PublishOnPyPI: | |
| uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| - ReleasePage | |
| if: needs.Prepare.outputs.is_release_tag == 'true' | |
| with: | |
| python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
| requirements: '-r dist/requirements.txt' | |
| artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} | |
| secrets: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| ArtifactCleanUp: | |
| uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r7 | |
| needs: | |
| - UnitTestingParams | |
| - UnitTesting | |
| - StaticTypeCheck | |
| - Documentation | |
| - PDFDocumentation | |
| - PublishTestResults | |
| - PublishCoverageResults | |
| - PublishToGitHubPages | |
| - IntermediateCleanUp | |
| with: | |
| package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} | |
| remaining: | | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-* | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} | |
| ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} |