aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/Windows-pyGHDL.yml
diff options
context:
space:
mode:
authorUnai Martinez-Corral <38422348+umarcor@users.noreply.github.com>2023-03-03 12:18:07 +0000
committerGitHub <noreply@github.com>2023-03-03 13:18:07 +0100
commita0f99db3b3557bb996b5511f3fad6832995eb69f (patch)
treef3e7ab0232be950285e24d1c523215affcb376f7 /.github/workflows/Windows-pyGHDL.yml
parent0c080e2d4a141d0c8fb447891f6520fb2712e4ae (diff)
downloadghdl-a0f99db3b3557bb996b5511f3fad6832995eb69f.tar.gz
ghdl-a0f99db3b3557bb996b5511f3fad6832995eb69f.tar.bz2
ghdl-a0f99db3b3557bb996b5511f3fad6832995eb69f.zip
ci: reusable workflows (#2367)
Diffstat (limited to '.github/workflows/Windows-pyGHDL.yml')
-rw-r--r--.github/workflows/Windows-pyGHDL.yml122
1 files changed, 122 insertions, 0 deletions
diff --git a/.github/workflows/Windows-pyGHDL.yml b/.github/workflows/Windows-pyGHDL.yml
new file mode 100644
index 000000000..f0f479763
--- /dev/null
+++ b/.github/workflows/Windows-pyGHDL.yml
@@ -0,0 +1,122 @@
+name: Windows pyGHDL
+
+on:
+ workflow_call:
+
+jobs:
+
+
+#
+# Pure Windows CPython pyGHDL platform wheel (from the pre-wheel zip)
+#
+ Build-wheel:
+ name: '🚦🐍${{ matrix.icon }} ${{ matrix.sys }} (pyGHDL-wheel)'
+ runs-on: windows-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - {icon: '🟪', sys: 'MINGW32', pyarch: x86 }
+# - {icon: '🟦', sys: 'MINGW64', pyarch: x64 }
+ - {icon: '🟨', sys: 'UCRT64', pyarch: x64 }
+
+ defaults:
+ run:
+ shell: pwsh
+
+ steps:
+ - name: '🐍 Setup Python'
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+ architecture: ${{ matrix.pyarch }}
+
+ - name: '📥 Download artifact: package'
+ uses: actions/download-artifact@v3
+ with:
+ path: artifact
+ name: ${{ matrix.sys }}-pre-wheel
+
+ - name: '🐍 Build python wheel'
+ run: |
+ pip3 install wheel
+ pip3 install pyTooling
+ unzip artifact/pre-wheel-${{ matrix.sys }}.zip
+ python3 ./setup-standalone.py bdist_wheel
+ dir dist
+
+ - name: '🐍 Sanity check of the python wheel'
+ run: |
+ pip3 install -v (get-item dist\pyGHDL-*.whl)
+ dir -r ${env:Python3_ROOT_DIR}\Lib\site-packages\pyGHDL
+ python3 -m pyGHDL.cli.lsp --version
+ python3 -m pyGHDL.cli.dom version
+
+ - name: '📤 Upload artifact: wheel'
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.sys }}-wheel
+ path: |
+ dist/pyGHDL-*.whl
+
+ - name: '${{ matrix.icon }} Setup MSYS2'
+ uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ matrix.sys }}
+ update: true
+
+
+ Test-wheel:
+ name: '🚦🐍🥡${{ matrix.icon }} ${{ matrix.sys }} (test sa py)'
+ runs-on: windows-latest
+
+ needs:
+ - Build-wheel
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - {icon: '🟪', sys: 'MINGW32', pyarch: x86 }
+# - {icon: '🟦', sys: 'MINGW64', pyarch: x64 }
+ - {icon: '🟨', sys: 'UCRT64', pyarch: x64 }
+
+ defaults:
+ run:
+ shell: pwsh
+
+ steps:
+ - name: '🐍 Setup Python'
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+ architecture: ${{ matrix.pyarch }}
+
+ - name: '📥 Download artifact: package'
+ uses: actions/download-artifact@v3
+ with:
+ path: artifact
+ name: ${{ matrix.sys }}-wheel
+
+ - name: '🐍 Sanity check of the python wheel'
+ run: |
+ pip3 install -v (get-item artifact\pyGHDL-*.whl)
+
+ - name: '⚙ git config'
+ run: |
+ dir
+ dir ${env:GHDL}
+ git config --global core.autocrlf input
+
+ - name: '🧰 Checkout'
+ uses: actions/checkout@v3
+ with:
+ path: checkout
+
+ - name: '🚦 pyunit tests'
+ run: |
+ pip3 install pytest
+ dir checkout
+ cd checkout/testsuite
+ python3 -m pytest pyunit