improve naming #1
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: build_wppm | ||
| # 2025-08-16: from TornadoWeb simple example | ||
| # object: | ||
| # - learn the matrix method | ||
| # - be compatible with cibuilds later | ||
| # | ||
| # using a predefined hashed wheel environnment: pylock.wppmbuild.toml | ||
| # pip freeze>test.txt | ||
| # python -m pip lock --no-deps --find-links=C:\WinP\packages.srcreq -r test.txt -o pylock.wppmbuild.toml | ||
| # python -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req('pylock.wppmbuild.toml', r'requir.wppmbuild.txt')" | ||
| # | ||
| on: | ||
| push: | ||
| #branches: | ||
| # # Run on release branches. This gives us a chance to detect rot in this | ||
| # # configuration before pushing a tag (which we'd rather not have to undo). | ||
| # - "branch[0-9]*" | ||
| #tags: | ||
| # # The main purpose of this workflow is to build wheels for release tags. | ||
| # # It runs automatically on tags matching this pattern and pushes to pypi. | ||
| # - "v*" | ||
| workflow_dispatch: | ||
| # Allow this workflow to be run manually (pushing to testpypi instead of pypi) | ||
| permissions: {} | ||
| env: | ||
| python-version: '3.13' | ||
| WINPYrequirements=winpython/portable/cycle_2025_04/requir.wppmbuild.toml | ||
| jobs: | ||
| build_wheels: | ||
| name: Build wheels on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [windows-latest] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v5 | ||
| name: Install Python | ||
| with: | ||
| python-version: ${{ env.python-version }} | ||
| - name: Install dependencies to build | ||
| shell: pwsh | ||
| run: | | ||
| python -m pip install --no-deps --no-index --require-hashes -r $env:WINPYrequirements | ||
| - name: Build sdist | ||
| shell: bash | ||
| run: | | ||
| python -m flit build && ls -l dist | ||
| - name: prepare result | ||
| shell: bash | ||
| run: | | ||
| mkdir wheelhouse | ||
| cp dist/*.whl wheelhouse | ||
| - name: generate hashes wppm style | ||
| shell: pwsh | ||
| run: | | ||
| $destfile = "wheelhouse\hashes.md" | ||
| python -c "import sys;from winpython import hash; hash.print_hashes(sys.argv[1:])" wheelhouse\*.whl | | Out-File -FilePath $destfile -Encoding utf8 | ||
| - name: List wheelhouse contents (for debugging) | ||
| shell: pwsh | ||
| run: | | ||
| Get-ChildItem wheelhouse | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: artifacts-${{ matrix.os }} | ||
| path: ./wheelhouse/*.* | ||
| #retention-days: 30 # keeps artifact for 30 days | ||