|
| 1 | +name: Build_wppm # 2025-08-16: from TornadoWeb simple example |
| 2 | +# object: |
| 3 | +# - learn the matrix method |
| 4 | +# - be compatible with cibuilds later |
| 5 | +# |
| 6 | +# using a predefined hashed wheel environnment: pylock.wppmbuild.toml |
| 7 | +# pip freeze>test.txt |
| 8 | +# python -m pip lock --no-deps --find-links=C:\WinP\packages.srcreq -r test.txt -o pylock.wppmbuild.toml |
| 9 | +# python -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req('pylock.wppmbuild.toml', r'requir.wppmbuild.txt')" |
| 10 | +# |
| 11 | +on: |
| 12 | + push: |
| 13 | + #branches: |
| 14 | + # # Run on release branches. This gives us a chance to detect rot in this |
| 15 | + # # configuration before pushing a tag (which we'd rather not have to undo). |
| 16 | + # - "branch[0-9]*" |
| 17 | + #tags: |
| 18 | + # # The main purpose of this workflow is to build wheels for release tags. |
| 19 | + # # It runs automatically on tags matching this pattern and pushes to pypi. |
| 20 | + # - "v*" |
| 21 | + workflow_dispatch: |
| 22 | + # Allow this workflow to be run manually (pushing to testpypi instead of pypi) |
| 23 | +permissions: {} |
| 24 | + |
| 25 | +env: |
| 26 | + python-version: '3.13' |
| 27 | + WINPYrequirements=winpython/portable/cycle_2025_04/requir.wppmbuild.toml |
| 28 | + |
| 29 | +jobs: |
| 30 | + build_wheels: |
| 31 | + name: Build wheels on ${{ matrix.os }} |
| 32 | + runs-on: ${{ matrix.os }} |
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + matrix: |
| 36 | + os: [windows-latest] |
| 37 | + |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + with: |
| 41 | + persist-credentials: false |
| 42 | + |
| 43 | + - uses: actions/setup-python@v5 |
| 44 | + name: Install Python |
| 45 | + with: |
| 46 | + python-version: ${{ env.python-version }} |
| 47 | + |
| 48 | + - name: Install dependencies to build |
| 49 | + shell: pwsh |
| 50 | + run: | |
| 51 | + python -m pip install --no-deps --no-index --require-hashes -r $env:WINPYrequirements |
| 52 | +
|
| 53 | + - name: Build sdist |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + python -m flit build && ls -l dist |
| 57 | +
|
| 58 | +
|
| 59 | + - name: prepare result |
| 60 | + shell: bash |
| 61 | + run: | |
| 62 | + mkdir wheelhouse |
| 63 | + cp dist/*.whl wheelhouse |
| 64 | +
|
| 65 | + - name: generate hashes wppm style |
| 66 | + shell: pwsh |
| 67 | + run: | |
| 68 | + $destfile = "wheelhouse\hashes.md" |
| 69 | + python -c "import sys;from winpython import hash; hash.print_hashes(sys.argv[1:])" wheelhouse\*.whl | | Out-File -FilePath $destfile -Encoding utf8 |
| 70 | + |
| 71 | +
|
| 72 | + - name: List wheelhouse contents (for debugging) |
| 73 | + shell: pwsh |
| 74 | + run: | |
| 75 | + Get-ChildItem wheelhouse |
| 76 | + |
| 77 | + - uses: actions/upload-artifact@v4 |
| 78 | + with: |
| 79 | + name: artifacts-${{ matrix.os }} |
| 80 | + path: ./wheelhouse/*.* |
| 81 | + #retention-days: 30 # keeps artifact for 30 days |
0 commit comments