Improved MSYS2 and installation paths. #367
Workflow file for this run
This file contains 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' | |
jobs: | |
UnitTestingParams: | |
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev | |
with: | |
name: pyEDAA.CLITool | |
CompileUbuntu: | |
name: Compile GHDL on Ubuntu 2024.04 (LTS) | |
runs-on: "ubuntu-24.04" | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [mcode, llvm] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ghdl/ghdl | |
- name: 🔧 Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends gcc g++ gnat | |
- name: "llvm - 🔧 Install dependencies for LLVM backend" | |
if: matrix.backend == 'llvm' | |
run: sudo apt-get install -y --no-install-recommends llvm clang | |
- name: Prepare build environemnt | |
run: mkdir -p build/${{ matrix.backend }} | |
- name: mcode - Configure | |
if: matrix.backend == 'mcode' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} | |
- name: llvm - Configure | |
if: matrix.backend == 'llvm' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} --with-llvm-config | |
- name: Make | |
run: | | |
cd build/${{ matrix.backend }} | |
make | |
- name: Install | |
run: | | |
cd build/${{ matrix.backend }} | |
sudo make install | |
CompileMacOS: | |
name: Compile GHDL on macOS 14 (arm64) | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [mcode, llvm] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ghdl/ghdl | |
- name: Prepare build environemnt | |
run: mkdir -p build/${{ matrix.backend }} | |
- name: mcode - Configure | |
if: matrix.backend == 'mcode' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} | |
- name: llvm - Configure | |
if: matrix.backend == 'llvm' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} --with-llvm-config | |
- name: Make | |
run: | | |
cd build/${{ matrix.backend }} | |
make | |
- name: Install | |
run: | | |
cd build/${{ matrix.backend }} | |
sudo make install | |
CompileWindows: | |
name: Compile GHDL on Windows Server | |
runs-on: windows-latest | |
env: | |
common_packages: gcc | |
mcode_packages: "" | |
llvm_packages: llvm clang | |
strategy: | |
fail-fast: false | |
matrix: | |
runtime: [mingw64, ucrt64] | |
backend: [mcode, llvm] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.runtime }} | |
update: true | |
pacboy: "${{ env.common_packages }} ${{ env.mcode_packages }} ${{ env.llvm_packages }}" | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ghdl/ghdl | |
- name: Prepare build environemnt | |
run: mkdir -p build/${{ matrix.backend }} | |
- name: mcode - Configure | |
if: matrix.backend == 'mcode' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.runtime }}-${{ matrix.backend }} | |
- name: llvm - Configure | |
if: matrix.backend == 'llvm' | |
run: | | |
cd build/${{ matrix.backend }} | |
../../configure --prefix=/opt/ghdl-${{ matrix.runtime }}-${{ matrix.backend }} --with-llvm-config | |
- name: Make | |
run: | | |
cd build/${{ matrix.backend }} | |
make | |
- name: Install | |
run: | | |
cd build/${{ matrix.backend }} | |
sudo make install | |
UnitTesting: | |
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev | |
needs: | |
- UnitTestingParams | |
- CompileUbuntu | |
- CompileMacOS | |
- CompileWindows | |
with: | |
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} | |
apt: ghdl-mcode | |
brew: --cask ghdl | |
pacboy: ghdl | |
ubuntu_before_script: | | |
which ghdl | |
ghdl version | |
echo "GHDL_PREFIX=/usr/lib/x86_64-linux-gnu/ >> $GITHUB_ENV" | |
echo "GHDL_PREFIX=/usr/lib/x86_64-linux-gnu/" >> $GITHUB_ENV | |
macos_arm_before_script: | | |
which ghdl | |
ghdl version | |
echo $(brew --prefix llvm@15) | |
export DYLD_LIBRARY_PATH=$(brew --prefix llvm@15)/lib | |
echo -$DYLD_LIBRARY_PATH- | |
echo "DYLD_LIBRARY_PATH=$(brew --prefix llvm@15)/lib" >> $GITHUB_ENV | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV | |
ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" | |
echo "----" | |
ls $(brew --prefix llvm@15)/lib | |
mingw64_before_script: | | |
which ghdl | |
ghdl version | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV | |
# ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" | |
ucrt64_before_script: | | |
which ghdl | |
ghdl version | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" | |
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV | |
# ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" | |
# ubuntu_before_script: sudo install -m 755 tests/mock/ghdl /usr/local/bin | |
requirements: "-r tests/unit/requirements.txt" | |
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@dev | |
needs: | |
- UnitTestingParams | |
with: | |
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
commands: | | |
touch pyEDAA/__init__.py | |
mypy --html-report htmlmypy -p pyEDAA.CLITool | |
html_report: 'htmlmypy' | |
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} | |
DocCoverage: | |
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev | |
needs: | |
- UnitTestingParams | |
with: | |
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
directory: pyEDAA/CLITool | |
fail_under: 75 | |
Package: | |
uses: pyTooling/Actions/.github/workflows/Package.yml@dev | |
needs: | |
- UnitTestingParams | |
- UnitTesting | |
with: | |
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} | |
PublishCoverageResults: | |
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev | |
needs: | |
- UnitTestingParams | |
- UnitTesting | |
with: | |
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} | |
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} | |
secrets: | |
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
PublishTestResults: | |
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev | |
needs: | |
- UnitTestingParams | |
- UnitTesting | |
with: | |
additional_merge_args: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit" --render=tree' | |
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} | |
IntermediateCleanUp: | |
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@dev | |
needs: | |
- UnitTestingParams | |
- PublishCoverageResults | |
- PublishTestResults | |
- HTMLDocumentation | |
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 }}- | |
# VerifyDocs: | |
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev | |
# needs: | |
# - UnitTestingParams | |
# with: | |
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
HTMLDocumentation: | |
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev | |
needs: | |
- UnitTestingParams | |
- PublishTestResults | |
- PublishCoverageResults | |
# - VerifyDocs | |
with: | |
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} | |
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 }} | |
PDFDocumentation: | |
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev | |
needs: | |
- UnitTestingParams | |
- HTMLDocumentation | |
with: | |
document: pyEDAA.CLITool | |
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} | |
pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} | |
PublishToGitHubPages: | |
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev | |
needs: | |
- UnitTestingParams | |
- HTMLDocumentation | |
# - 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 }} | |
ReleasePage: | |
uses: pyTooling/Actions/.github/workflows/Release.yml@dev | |
if: startsWith(github.ref, 'refs/tags') | |
needs: | |
- PublishToGitHubPages | |
PublishOnPyPI: | |
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev | |
if: startsWith(github.ref, 'refs/tags') | |
needs: | |
- UnitTestingParams | |
- ReleasePage | |
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@dev | |
needs: | |
- UnitTestingParams | |
- UnitTesting | |
- StaticTypeCheck | |
- HTMLDocumentation | |
# - PDFDocumentation | |
- PublishTestResults | |
- PublishCoverageResults | |
- PublishToGitHubPages | |
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 }} | |
# ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }} |