forked from winpython/winpython
-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (113 loc) · 4.64 KB
/
Copy pathbuild_winpython_cycle.yml
File metadata and controls
127 lines (113 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Build WinPython (cycle file)
# Draft, sitting beside github_workflows_build-YYYY_NN.yml for comparison.
#
# Same build as those, but everything cycle-specific comes from cycles/<cycle>.toml
# instead of being copied into a new workflow each time. A new cycle is a new TOML.
on:
workflow_dispatch:
inputs:
cycle:
description: 'Build cycle (file name in cycles/, without .toml)'
required: true
default: '2026_04'
type: string
python_versionf:
description: 'Python version to build; must exist in that cycle file'
required: true
default: '3.14'
type: choice
options:
- '3.13'
- '3.14'
- '3.14F'
- '3.15'
- '3.15F'
env:
WINPYARCH: "64"
dotwheelhouse: "dotpython\\wheelhouse\\included.wheels"
jobs:
config:
# reads the cycle file once, instead of once per matrix leg
runs-on: ubuntu-latest
outputs:
ver2: ${{ steps.cfg.outputs.ver2 }}
build_location: ${{ steps.cfg.outputs.build_location }}
destwheelhouse: ${{ steps.cfg.outputs.destwheelhouse }}
src: ${{ steps.cfg.outputs.src }}
sha: ${{ steps.cfg.outputs.sha }}
pandoc_source: ${{ steps.cfg.outputs.pandoc_source }}
pandoc_sha256: ${{ steps.cfg.outputs.pandoc_sha256 }}
matrix: ${{ steps.cfg.outputs.matrix }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Read cycle configuration
id: cfg
run: python .github/scripts/cycle_config.py "cycles/${{ inputs.cycle }}.toml" "${{ inputs.python_versionf }}"
build-winpython:
needs: config
runs-on: windows-latest
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.config.outputs.matrix) }}
env:
WINPYFLAVOR: ${{ matrix.flavor.name }}
WINPYVER: ${{ matrix.flavor.winpyver }}
WINPYVER2: ${{ needs.config.outputs.ver2 }}
build_location: ${{ needs.config.outputs.build_location }}
destwheelhouse: ${{ needs.config.outputs.destwheelhouse }}
WINPYLOCKFILE: ${{ matrix.flavor.lockfile }}
WINPYLOCKFILEwhl: ${{ matrix.flavor.lockfile_wheels }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download, verify and extract python standalone
uses: ./.github/actions/python-setup
with:
python_source: ${{ needs.config.outputs.src }}
python_sha256: ${{ needs.config.outputs.sha }}
build_location: ${{ env.build_location }}
- name: Download, checking hash and integrating pandoc binary
if: matrix.flavor.PANDOC == '1'
uses: ./.github/actions/pandoc-setup
with:
pandoc_source: ${{ needs.config.outputs.pandoc_source }}
pandoc_sha256: ${{ needs.config.outputs.pandoc_sha256 }}
build_location: ${{ env.build_location }}
- name: Upgrade pip and patch launchers
shell: pwsh
run: |
& "$env:build_location\python\python.exe" -m pip install --upgrade --force-reinstall pip --no-warn-script-location
& "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)"
- name: Download all requirements
shell: pwsh
run: |
$py = "$env:build_location\python\python.exe"
& $py -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILE
if ($env:WINPYLOCKFILEwhl -ne '') {
& $py -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILEwhl
}
- name: Install lockfile
shell: pwsh
run: |
& "$env:build_location\python\python.exe" -m pip install --no-deps --require-hashes -r $env:WINPYLOCKFILE --no-warn-script-location
- name: Generate Assets and Hashes
uses: ./.github/actions/publish-winpython
with:
build_location: ${{ env.build_location }}
winpy_flavor: ${{ env.WINPYFLAVOR }}
winpy_arch: ${{ env.WINPYARCH }}
winpy_ver: ${{ env.WINPYVER }}
winpy_ver2: ${{ env.WINPYVER2 }}
dotwheelhouse: ${{ env.dotwheelhouse }}
winpy_requirements_whl: ${{ matrix.flavor.requirements_wheels }}
format_zip: ${{ matrix.flavor.formats.zip }}
format_7z: ${{ matrix.flavor.formats['7z'] }}
format_exe: ${{ matrix.flavor.formats.exe }}
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.flavor.artifact_name }}
path: publish_output
retention-days: 66 # keeps artifact for 66 days