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