-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (174 loc) · 5.68 KB
/
windows_wheels.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Windows wheels
on:
push:
pull_request:
create:
schedule:
- cron: '23 1 * * *'
env:
KIVY_SPLIT_EXAMPLES: 1
SERVER_IP: '159.203.106.198'
GST_REGISTRY: '~/registry.bin'
KIVY_GL_BACKEND: 'angle_sdl2'
SETUPTOOLS_USE_DISTUTILS: local
jobs:
windows_wheels_create:
runs-on: windows-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
arch: ['x64']
if: github.event_name == 'schedule' || (github.event_name == 'create' && github.event.ref_type == 'tag') || contains(github.event.head_commit.message, '[build wheel]') || contains(github.event.head_commit.message, '[build wheel win]') || contains(github.event.pull_request.title, '[build wheel]') || contains(github.event.pull_request.title, '[build wheel win]')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
- name: Generate version metadata
run: |
. .\.ci\windows_ci.ps1
Update-version-metadata
- name: Generate sdist/kivy-examples
if: matrix.arch == 'x64' && matrix.python == '3.8'
# only windows kivy-examples is uploaded
run: |
. .\.ci\windows_ci.ps1
Generate-sdist
- name: Install Kivy
run: |
. .\.ci\windows_ci.ps1
Install-kivy
- name: Make wheels
run: |
. .\.ci\windows_ci.ps1
Generate-windows-wheels
- name: Upload wheels as artifact
uses: actions/upload-artifact@v4
with:
name: windows_wheels-${{ matrix.python }}-${{ matrix.arch }}
path: dist
windows_wheel_upload:
runs-on: windows-latest
needs: windows_wheels_create
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- run: |
python -m pip install -r .ci/cicd-requirements.txt
- uses: actions/download-artifact@v4
with:
pattern: windows_wheels-*-*
merge-multiple: true
path: dist
- name: Fix wheel names
if: github.event.ref_type != 'tag'
run: |
. .\.ci\windows_ci.ps1
Rename-windows-wheels
- name: Install MSYS2
run: choco install msys2
- name: Upload wheels to server
env:
UBUNTU_UPLOAD_KEY: ${{ secrets.UBUNTU_UPLOAD_KEY }}
MSYSTEM: MINGW64
CHERE_INVOKING: 1
run: |
. .\.ci\windows_ci.ps1
Upload-windows-wheels-to-server -ip "$env:SERVER_IP"
- name: Upload to GitHub Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
draft: true
- name: Publish to PyPI
if: github.event_name == 'create' && github.event.ref_type == 'tag'
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload dist/*
windows_wheel_test:
runs-on: windows-latest
needs: windows_wheels_create
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
arch: [ 'x64' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }} on ${{ matrix.arch }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
- uses: actions/download-artifact@v4
with:
# Only one windows_wheels-*-* artifact contains the kivy-examples
# However, all artifacts are downloaded ATM, to avoid using
# a specific name.
pattern: windows_wheels-*-*
merge-multiple: true
path: dist
- name: Install Kivy Wheel
run: |
. .\.ci\windows_ci.ps1
Install-kivy-wheel
- name: Test Kivy Wheel
run: |
. .\.ci\windows_ci.ps1
Test-kivy-installed
- name: Test Kivy benchmarks
run: |
. .\.ci\windows_ci.ps1
Test-kivy-benchmark
- name: Upload benchmarks as artifact
uses: actions/upload-artifact@v4
with:
name: benchmarks-windows-wheels-python-${{ matrix.python }}-${{ matrix.arch }}
path: .benchmarks-kivy
windows_sdist_test:
runs-on: windows-latest
needs: windows_wheels_create
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/download-artifact@v4
with:
# Only one windows_wheels-*-* artifact contains the sdist
# However, all artifacts are downloaded ATM, to avoid using
# a specific name.
pattern: windows_wheels-*-*
merge-multiple: true
path: dist
- name: Install Kivy sdist
env:
KIVY_SPLIT_EXAMPLES: 0
run: |
. .\.ci\windows_ci.ps1
Install-kivy-sdist
- name: Test Kivy sdist
run: |
. .\.ci\windows_ci.ps1
Test-kivy-installed
always_job:
name: Always run job
runs-on: windows-latest
steps:
- name: Always run
run: |
echo "This is run to prevent the workflow from showing an error if the wheels job is not run and no jobs run is an error."
echo "See https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38085"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"