Python packages Windows #255
Workflow file for this run
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: Python packages Windows | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| jobs: | |
| build: | |
| runs-on: windows-2019 | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11'] | |
| name: Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Clang | |
| uses: egor-tensin/setup-clang@v1 | |
| with: | |
| version: latest | |
| platform: x64 | |
| - name: add qt dir to path | |
| run: | | |
| echo "C:\Program Files\LLVM\bin;${{github.workspace}}\Qt\6.4.3\mingw_64\bin;C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Set python interpreter | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Install deps and build package | |
| env: | |
| CLANG_INSTALL_DIR: C:\Program Files\LLVM\ | |
| run: | | |
| pip install --upgrade "meson" "ninja" "numpy" "meson-python" "build" "wheel" "twine" "auditwheel" "aqtinstall" | |
| pip install "PySide6==6.4.3" | |
| pip install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io "shiboken6_generator==6.4.3" | |
| aqt install-qt -O $env:GITHUB_WORKSPACE\Qt windows desktop 6.4.3 win64_mingw | |
| python3 -m build --no-isolation . | |
| - name: Save packages as artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: sciqlopplots-windows-${{ matrix.python-version }} | |
| path: dist/* | |
| - name: Publish on PyPi | |
| if: github.event.release | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
| run: twine upload --skip-existing dist/* | |
| - name: Publish on PyPi (test) | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }} | |
| run: twine upload --repository testpypi --skip-existing dist/*.whl |