-
-
Notifications
You must be signed in to change notification settings - Fork 158
156 lines (141 loc) · 4.28 KB
/
build-windows.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
name: Windows
# Run CI only when a release is created, on changes to main branch, or any PR
# to main. Do not run CI on any other branch. Also, skip any non-source changes
# from running on CI
on:
push:
branches: main
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.gitignore'
- '*.rst'
- '*.md'
- '.github/workflows/*.yml'
# re-include current file to not be excluded
- '!.github/workflows/build-windows.yml'
pull_request:
branches: main
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.gitignore'
- '*.rst'
- '*.md'
- '.github/workflows/*.yml'
# re-include current file to not be excluded
- '!.github/workflows/build-windows.yml'
# the github release drafter can call this workflow
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-windows
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }}
runs-on: windows-latest
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
include:
- {
name: "CPython 3.12 (64 bit)",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "cp312-*"
}
- {
name: "CPython 3.11 (64 bit)",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "cp311-*"
}
- {
name: "CPython 3.10 (64 bit)",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "cp310-*"
}
- {
name: "CPython 3.9 (64 bit)",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "cp39-*"
}
- {
name: "CPython 3.8 (64 bit)",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "cp38-*"
}
- {
name: "CPython 3.12 (32 bit)",
winarch: x86,
msvc-dev-arch: x86,
pyversions: "cp312-win32*"
}
- {
name: "CPython 3.11 (32 bit)",
winarch: x86,
msvc-dev-arch: x86,
pyversions: "cp311-win32"
}
- {
name: "CPython 3.10 (32 bit)",
winarch: x86,
msvc-dev-arch: x86,
pyversions: "cp310-win32"
}
- {
name: "CPython 3.9 (32 bit)",
winarch: x86,
msvc-dev-arch: x86,
pyversions: "cp39-win32"
}
- {
name: "CPython 3.8 (32 bit)",
winarch: x86,
msvc-dev-arch: x86,
pyversions: "cp38-win32"
}
- {
name: "Pypy 3.8",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "pp38-*"
}
- {
name: "Pypy 3.9",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "pp39-*"
}
- {
name: "Pypy 3.10",
winarch: AMD64,
msvc-dev-arch: x86_amd64,
pyversions: "pp310-*"
}
env:
# load pip config from this file. Define this in 'CIBW_ENVIRONMENT'
# because this should not affect cibuildwheel machinery
# also define environment variables needed for testing
CIBW_ENVIRONMENT: SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
CIBW_BUILD: ${{ matrix.pyversions }}
CIBW_ARCHS: ${{ matrix.winarch }}
CIBW_BEFORE_BUILD: pip install numpy Sphinx"<7.2.0" && python setup.py docs
CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,timing --time_out 300
# Increase pip debugging output
CIBW_BUILD_VERBOSITY: 2
steps:
- uses: actions/[email protected]
- uses: TheMrMilchmann/setup-msvc-dev@v3 # this lets us use the developer command prompt on windows
with:
arch: ${{ matrix.msvc-dev-arch }}
- name: Build and test wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: pygame-wheels-windows-${{ matrix.name }}
path: ./wheelhouse/*.whl
compression-level: 0 # wheels are already zip files, no need for more compression