@@ -34,10 +34,10 @@ jobs:
3434 runs-on : ubuntu-latest
3535 outputs :
3636 ver2 : ${{ steps.cfg.outputs.ver2 }}
37+ build_location : ${{ steps.cfg.outputs.build_location }}
38+ destwheelhouse : ${{ steps.cfg.outputs.destwheelhouse }}
3739 src : ${{ steps.cfg.outputs.src }}
3840 sha : ${{ steps.cfg.outputs.sha }}
39- cycle_dir : ${{ steps.cfg.outputs.cycle_dir }}
40- release_level : ${{ steps.cfg.outputs.release_level }}
4141 pandoc_source : ${{ steps.cfg.outputs.pandoc_source }}
4242 pandoc_sha256 : ${{ steps.cfg.outputs.pandoc_sha256 }}
4343 matrix : ${{ steps.cfg.outputs.matrix }}
@@ -58,120 +58,40 @@ jobs:
5858 matrix : ${{ fromJSON(needs.config.outputs.matrix) }}
5959
6060 env :
61- PYTHON_VERSIONF : ${{ inputs.python_versionf }}
6261 WINPYFLAVOR : ${{ matrix.flavor.name }}
63- PANDOC : ${{ matrix.flavor.PANDOC }}
64- WINPYARCHDET : ${{ matrix.flavor.WINPYARCHDET }}
65- my_cycle : ${{ needs.config.outputs.cycle_dir }}
66- my_release_level : ${{ needs.config.outputs.release_level }}
62+ WINPYVER : ${{ matrix.flavor.winpyver }}
63+ WINPYVER2 : ${{ needs.config.outputs.ver2 }}
64+ build_location : ${{ needs.config.outputs.build_location }}
65+ destwheelhouse : ${{ needs.config.outputs.destwheelhouse }}
66+ WINPYLOCKFILE : ${{ matrix.flavor.lockfile }}
67+ WINPYLOCKFILEwhl : ${{ matrix.flavor.lockfile_wheels }}
6768
6869 steps :
6970 - name : Checkout repository
7071 uses : actions/checkout@v6
7172
72- - name : Set static and matrix variables based on selected Python version
73- shell : pwsh
74- env :
75- PYTHON_VERSIONF : ${{ env.PYTHON_VERSIONF }}
76- WINPYARCHDET : ${{ env.WINPYARCHDET }}
77- WINPYVER2 : ${{ needs.config.outputs.ver2 }}
78- my_cycle : ${{ env.my_cycle }}
79- my_release_level : ${{ env.my_release_level }}
80- FLAVOR_NAME : ${{ matrix.flavor.name }}
81- run : |
82- # Normalize PYTHON_VERSION by removing trailing 'F' if present
83- $PYTHON_VERSION = $env:PYTHON_VERSIONF -replace 'F$',''
84- Add-Content -Path $env:GITHUB_ENV -Value "PYTHON_VERSION=$PYTHON_VERSION"
85-
86- # Detect architecture (64 or 64F)
87- $detected_arch = if ($env:PYTHON_VERSIONF -like '*F') { '64F' } else { '64' }
88-
89- $WINPYVER2 = $env:WINPYVER2
90- $BUILD_LOCATION = "WPy64-" + ($WINPYVER2 -replace '[.]', "")
91- Add-Content -Path $env:GITHUB_ENV -Value "build_location=$BUILD_LOCATION"
92-
93- # ver2-vs-source consistency is checked in cycle_config.py
94-
95- $WINPYREQUIREMENTS = ''
96- $WINPYREQUIREMENTSwhl = ''
97-
98- # Generate requirement files expected names dynamically
99- $V_TAG = $env:WINPYVER2 -replace '\.', '_'
100- $testreq = "$($env:my_cycle)/requir.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level).txt"
101- $testwhl = "$($env:my_cycle)/requir.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level)_wheels.txt"
102-
103- Write-Host "Checking for requirements files: $testreq and $testwhl (expected arch $detected_arch)"
104-
105- if ($env:WINPYARCHDET -eq $detected_arch -and (Test-Path $testreq)) {
106- $WINPYREQUIREMENTS = $testreq
107- Write-Host "Found $WINPYREQUIREMENTS"
108- if (Test-Path $testwhl) {
109- $WINPYREQUIREMENTSwhl = $testwhl
110- Write-Host "Found also $WINPYREQUIREMENTSwhl"
111- }
112- }
113-
114- Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTS=$WINPYREQUIREMENTS"
115- Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTSwhl=$WINPYREQUIREMENTSwhl"
116-
117- $WINPYLOCKFILE = ''
118- $WINPYLOCKFILEwhl = ''
119-
120- # Generate pylock files expected names dynamically
121- $testreq = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level).toml"
122- $testwhl = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level)_wheels.toml"
123-
124- Write-Host "Checking for pylock files: $testreq and $testwhl (expected arch $detected_arch)"
125-
126- if ($env:WINPYARCHDET -eq $detected_arch -and (Test-Path $testreq)) {
127- $WINPYLOCKFILE = $testreq
128- Write-Host "Found $WINPYLOCKFILE"
129- if (Test-Path $testwhl) {
130- $WINPYLOCKFILEwhl = $testwhl
131- Write-Host "Found also $WINPYLOCKFILEwhl"
132- }
133- }
134-
135- Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILE=$WINPYLOCKFILE"
136- Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILEwhl=$WINPYLOCKFILEwhl"
137-
138- $ARTIFACT_NAME = "publish_${PYTHON_VERSION}$($env:FLAVOR_NAME)"
139- Add-Content -Path $env:GITHUB_ENV -Value "ARTIFACT_NAME=$ARTIFACT_NAME"
140-
141- $destwheelhouse = "$BUILD_LOCATION\wheelhouse\included.wheels"
142- Add-Content -Path $env:GITHUB_ENV -Value "destwheelhouse=$destwheelhouse"
143-
144- $WINPYVER = "${WINPYVER2}$($env:FLAVOR_NAME)$($env:my_release_level)"
145- Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER=$WINPYVER"
146-
147- # Store WINPYVER2 in env for later steps
148- Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER2=$WINPYVER2"
149-
15073 - name : Download, verify and extract python standalone
151- if : env.WINPYLOCKFILE != ''
15274 uses : ./.github/actions/python-setup
15375 with :
15476 python_source : ${{ needs.config.outputs.src }}
15577 python_sha256 : ${{ needs.config.outputs.sha }}
15678 build_location : ${{ env.build_location }}
15779
15880 - name : Download, checking hash and integrating pandoc binary
159- if : env.WINPYLOCKFILE != '' && env .PANDOC == '1'
81+ if : matrix.flavor .PANDOC == '1'
16082 uses : ./.github/actions/pandoc-setup
16183 with :
16284 pandoc_source : ${{ needs.config.outputs.pandoc_source }}
16385 pandoc_sha256 : ${{ needs.config.outputs.pandoc_sha256 }}
16486 build_location : ${{ env.build_location }}
16587
16688 - name : Upgrade pip and patch launchers
167- if : env.WINPYLOCKFILE != ''
16889 shell : pwsh
16990 run : |
17091 & "$env:build_location\python\python.exe" -m pip install --upgrade --force-reinstall pip --no-warn-script-location
17192 & "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)"
17293
17394 - name : Download all requirements
174- if : ${{ env.WINPYLOCKFILE != '' }}
17595 shell : pwsh
17696 run : |
17797 $py = "$env:build_location\python\python.exe"
@@ -181,13 +101,11 @@ jobs:
181101 }
182102
183103 - name : Install lockfile
184- if : env.WINPYLOCKFILE != ''
185104 shell : pwsh
186105 run : |
187106 & "$env:build_location\python\python.exe" -m pip install --no-deps --require-hashes -r $env:WINPYLOCKFILE --no-warn-script-location
188107
189108 - name : Generate Assets and Hashes
190- if : env.WINPYLOCKFILE != ''
191109 uses : ./.github/actions/publish-winpython
192110 with :
193111 build_location : ${{ env.build_location }}
@@ -196,15 +114,14 @@ jobs:
196114 winpy_ver : ${{ env.WINPYVER }}
197115 winpy_ver2 : ${{ env.WINPYVER2 }}
198116 dotwheelhouse : ${{ env.dotwheelhouse }}
199- winpy_requirements_whl : ${{ env.WINPYREQUIREMENTSwhl }}
117+ winpy_requirements_whl : ${{ matrix.flavor.requirements_wheels }}
200118 format_zip : ${{ matrix.flavor.formats.zip }}
201119 format_7z : ${{ matrix.flavor.formats['7z'] }}
202120 format_exe : ${{ matrix.flavor.formats.exe }}
203121
204122 - name : Upload artifacts
205- if : env.WINPYLOCKFILE != ''
206123 uses : actions/upload-artifact@v6
207124 with :
208- name : ${{ env.ARTIFACT_NAME }}
125+ name : ${{ matrix.flavor.artifact_name }}
209126 path : publish_output
210127 retention-days : 66 # keeps artifact for 66 days
0 commit comments