-
-
Notifications
You must be signed in to change notification settings - Fork 158
71 lines (60 loc) · 1.88 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
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.winarch }}
runs-on: windows-latest
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
include:
- { winarch: AMD64, msvc-dev-arch: x86_amd64 }
- { winarch: x86, msvc-dev-arch: x86 }
env:
CIBW_ARCHS: ${{ matrix.winarch }}
steps:
- uses: actions/checkout@v4.2.2
- uses: TheMrMilchmann/setup-msvc-dev@v3 # this lets us use the developer command prompt on windows
with:
arch: ${{ matrix.msvc-dev-arch }}
- name: Install uv for speed
uses: yezz123/setup-uv@v4
with:
uv-version: "0.5.4"
- name: Build and test wheels
uses: pypa/cibuildwheel@v2.22.0
- uses: actions/upload-artifact@v4
with:
name: pygame-wheels-windows-${{ matrix.winarch }}
path: ./wheelhouse/*.whl
compression-level: 0 # wheels are already zip files, no need for more compression