Skip to content

Commit 583bab1

Browse files
committed
Merge branch 'main' into hwnd-param
2 parents daf8265 + 956a0b6 commit 583bab1

File tree

291 files changed

+39893
-34964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+39893
-34964
lines changed

.circleci/config.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
11
# Use the latest 2.1 version of CircleCI pipeline process engine.
22
# See: https://circleci.com/docs/2.0/configuration-reference
33
version: 2.1
4+
parameters:
5+
GHA_Actor:
6+
type: string
7+
default: ""
8+
GHA_Action:
9+
type: string
10+
default: ""
11+
GHA_Event:
12+
type: string
13+
default: ""
14+
GHA_Meta:
15+
type: string
16+
default: ""
417

518
# Define a job to be invoked later in a workflow.
619
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
720
jobs:
821
linux-arm-wheels:
922
working_directory: ~/linux-wheels
1023
machine:
11-
image: ubuntu-2004:current
24+
image: ubuntu-2204:current
25+
docker_layer_caching: true
26+
1227
resource_class: arm.medium
1328

1429
environment:
1530
# these environment variables will be passed to the docker container
1631
- CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini PORTMIDI_INC_PORTTIME=1 SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
32+
- CIBW_PRERELEASE_PYTHONS: True # for 3.12 testing
33+
- CIBW_BUILD: "cp3{[7-9],10,11,12}-* pp3{[8-9],10}-*"
1734
- CIBW_ARCHS: aarch64
1835
- CIBW_SKIP: '*-musllinux_*'
19-
- CIBW_MANYLINUX_AARCH64_IMAGE: pygame/manylinux2014_base_aarch64
20-
- CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: pygame/manylinux2014_base_aarch64
36+
- CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014_base_aarch64
37+
- CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: manylinux2014_base_aarch64
2138
- CIBW_BEFORE_BUILD: pip install Sphinx && python setup.py docs
2239
- CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,music,timing --time_out 300
2340
- CIBW_BUILD_VERBOSITY: 2
2441

2542
steps:
2643
- checkout
44+
- run:
45+
name: Build the aarch64 base image (and cache it)
46+
working_directory: buildconfig/manylinux-build/docker_base
47+
command: docker build -t manylinux2014_base_aarch64 -f Dockerfile-aarch64 .
48+
2749
- run:
2850
name: Build the Linux wheels.
2951
command: |
30-
pip3 install --user cibuildwheel==2.12.0
52+
pip3 install --user cibuildwheel==2.14.1
3153
PATH="$HOME/.local/bin:$PATH" cibuildwheel --output-dir wheelhouse
3254
3355
- store_artifacts:

.github/workflows/build-debian-multiarch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
arch: [s390x, ppc64le]
4848

4949
steps:
50-
- uses: actions/checkout@v3.3.0
50+
- uses: actions/checkout@v3.5.3
5151

5252
- name: Build sources and run tests
5353
uses: uraimo/[email protected]

.github/workflows/build-emsdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ jobs:
4747
WHEELHOUSE_CYTHON: /tmp/wheelhouse/cython
4848

4949
steps:
50-
- uses: actions/checkout@v3.3.0
50+
- uses: actions/checkout@v3.5.3
5151

5252
- name: Cache Cython
5353
id: cache-cython
54-
uses: actions/cache@v3
54+
uses: actions/cache@v3.3.1
5555
with:
5656
path: ${{ env.WHEELHOUSE_CYTHON }}
5757
key: wasm-ubuntu-cython-${{ env.LATEST_CYTHON_COMMIT }}-path-${{ env.WHEELHOUSE_CYTHON }}

.github/workflows/build-macos.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ jobs:
4545
macarch: [arm64, x86_64]
4646

4747
steps:
48-
- uses: actions/checkout@v3.3.0
48+
- uses: actions/checkout@v3.5.3
4949

5050
- name: Test for Mac Deps cache hit
5151
id: macdep-cache
52-
uses: actions/cache@v3.0.2
52+
uses: actions/cache@v3.3.1
5353
with:
5454
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5555
# The hash of all files in buildconfig manylinux-build and macdependencies is
5656
# the key to the cache. If anything changes here, the deps are built again
5757
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
58+
lookup-only: true
5859

5960
# build mac deps on cache miss
6061
- name: Build Mac Deps
@@ -84,52 +85,64 @@ jobs:
8485
# of these builds take roughly the same time
8586
include:
8687
- {
87-
name: "x86_64 (CPython 3.10 and above)",
88+
name: "x86_64 (CPython 3.9 - 3.12)",
8889
macarch: x86_64,
89-
# pattern matches any 2 digit number
90-
pyversions: "cp3[1-9][0-9]-*"
90+
pyversions: "cp3{9,10,11,12}-*",
9191
}
9292

9393
- {
94-
name: "x86_64 (Python 3.7)",
94+
name: "x86_64 (CPython 3.7 and Python 3.8)",
9595
macarch: x86_64,
96-
pyversions: "?p37-*"
96+
# CPython 3.7, CPython/PyPy 3.8
97+
pyversions: "cp37-* ?p38-*",
9798
}
9899

99100
- {
100-
name: "x86_64 (Python 3.8)",
101+
name: "x86_64 (PyPy 3.9 and 3.10)",
101102
macarch: x86_64,
102-
pyversions: "?p38-*"
103+
pyversions: "pp39-* pp310-*",
103104
}
104105

105106
- {
106-
name: "x86_64 (Python 3.9)",
107-
macarch: x86_64,
108-
pyversions: "?p39-*"
107+
name: "arm64 (CPython 3.8 - 3.10)",
108+
macarch: arm64,
109+
pyversions: "cp3{8,9,10}-*",
109110
}
110111

111112
- {
112-
name: "arm64 (CPython 3.8 and above)",
113+
name: "arm64 (CPython 3.11 - 3.12)",
113114
macarch: arm64,
114-
# pattern matches any number from 8 to 99
115-
pyversions: "cp3{8,9,[1-9][0-9]}-*"
115+
pyversions: "cp3{11,12}-*",
116116
}
117117

118118
env:
119+
MAC_ARCH: ${{ matrix.macarch }}
119120
# load pip config from this file. Define this in 'CIBW_ENVIRONMENT'
120121
# because this should not affect cibuildwheel machinery
121122
# also define environment variables needed for testing
122123
CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
123124

125+
# Explicitly tell CIBW what the wheel arch deployment target should be
126+
# There seems to be no better way to set this than this env
127+
# We need this because our minimum is 10.11, different from default
128+
# of 10.9 on x86s
129+
# Related issue: https://github.com/pypa/cibuildwheel/issues/952
130+
_PYTHON_HOST_PLATFORM: ${{ matrix.macarch == 'x86_64' && 'macosx-10.11-x86_64' || 'macosx-11.0-arm64'}}
131+
132+
# Similarly, we need to tell CIBW that the wheel's linking steps
133+
# should be for 10.11 on x86
134+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macarch == 'x86_64' && '10.11' || '11.0' }}
135+
124136
CIBW_BUILD: ${{ matrix.pyversions }}
125137

138+
CIBW_PRERELEASE_PYTHONS: True # for 3.12 testing
139+
126140
# Build arm64 and x86_64 wheels too on an Intel runner.
127141
# Note that the arm64 wheels cannot be tested on CI in this configuration
128142
CIBW_ARCHS: ${{ matrix.macarch }}
129143

130144
# Setup MacOS dependencies
131145
CIBW_BEFORE_ALL: |
132-
export MAC_ARCH="${{ matrix.macarch }}"
133146
brew install pkg-config
134147
cd buildconfig/macdependencies
135148
cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps
@@ -149,23 +162,24 @@ jobs:
149162
CIBW_BUILD_VERBOSITY: 2
150163

151164
steps:
152-
- uses: actions/checkout@v3.3.0
165+
- uses: actions/checkout@v3.5.3
153166

154167
- name: pip cache
155-
uses: actions/cache@v3.0.2
168+
uses: actions/cache@v3.3.1
156169
with:
157170
path: ~/Library/Caches/pip # This cache path is only right on mac
158171
key: pip-cache-${{ matrix.name }}
159172

160173
- name: Fetch Mac deps
161174
id: macdep-cache
162-
uses: actions/cache@v3.0.2
175+
uses: actions/cache@v3.3.1
163176
with:
164177
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
165178
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
179+
fail-on-cache-miss: true
166180

167181
- name: Build and test wheels
168-
uses: pypa/cibuildwheel@v2.12.1
182+
uses: pypa/cibuildwheel@v2.14.1
169183

170184
- uses: actions/upload-artifact@v3
171185
with:

.github/workflows/build-manylinux.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
# also define environment variables needed for testing
5555
CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini PORTMIDI_INC_PORTTIME=1 SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
5656

57-
CIBW_BUILD: "cp3{[7-9],10,11}-* pp3[7-9]-*"
57+
CIBW_PRERELEASE_PYTHONS: True # for 3.12 testing
58+
59+
CIBW_BUILD: "cp3{[7-9],10,11,12}-* pp3{[8-9],10}-*"
5860
CIBW_ARCHS: ${{ matrix.arch }}
5961

6062
# skip musllinux for now
@@ -79,10 +81,10 @@ jobs:
7981
CIBW_BUILD_VERBOSITY: 2
8082

8183
steps:
82-
- uses: actions/checkout@v3.3.0
84+
- uses: actions/checkout@v3.5.3
8385

8486
- name: Log in to the Container registry
85-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
87+
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
8688
with:
8789
registry: ghcr.io
8890
username: ${{ github.actor }}
@@ -95,14 +97,14 @@ jobs:
9597

9698
- name: Extract metadata (tags, labels) for Docker
9799
id: meta
98-
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
100+
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
99101
with:
100102
images: ghcr.io/${{ github.repository }}_${{ matrix.arch }}
101103
tags: type=raw,value=${{ hashFiles('buildconfig/manylinux-build/**') }}
102104

103105
- name: Build and push Docker image
104106
if: steps.inspect.outcome == 'failure'
105-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
107+
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
106108
with:
107109
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base
108110
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }}
@@ -118,7 +120,7 @@ jobs:
118120
CIBW_MANYLINUX_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }}
119121
CIBW_MANYLINUX_PYPY_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }}
120122

121-
uses: pypa/cibuildwheel@v2.12.1
123+
uses: pypa/cibuildwheel@v2.14.1
122124

123125
# We upload the generated files under github actions assets
124126
- name: Upload dist

.github/workflows/build-ubuntu-sdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
os: [ubuntu-20.04, ubuntu-22.04]
5252

5353
steps:
54-
- uses: actions/checkout@v3.3.0
54+
- uses: actions/checkout@v3.5.3
5555

5656
- name: Install deps
5757
# install numpy from pip and not apt because the one from pip is newer,

.github/workflows/build-windows.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ jobs:
4343
fail-fast: false # if a particular matrix build fails, don't skip the rest
4444
matrix:
4545
include:
46+
- {
47+
name: "CPython 3.12 (64 bit)",
48+
winarch: AMD64,
49+
msvc-dev-arch: x86_amd64,
50+
pyversions: "cp312-*"
51+
}
4652
- {
4753
name: "CPython 3.11 (64 bit)",
4854
winarch: AMD64,
@@ -73,6 +79,12 @@ jobs:
7379
msvc-dev-arch: x86_amd64,
7480
pyversions: "cp37-*"
7581
}
82+
- {
83+
name: "CPython 3.12 (32 bit)",
84+
winarch: x86,
85+
msvc-dev-arch: x86,
86+
pyversions: "cp312-win32*"
87+
}
7688
- {
7789
name: "CPython 3.11 (32 bit)",
7890
winarch: x86,
@@ -103,12 +115,6 @@ jobs:
103115
msvc-dev-arch: x86,
104116
pyversions: "cp37-win32"
105117
}
106-
- {
107-
name: "Pypy 3.7",
108-
winarch: AMD64,
109-
msvc-dev-arch: x86_amd64,
110-
pyversions: "pp37-*"
111-
}
112118
- {
113119
name: "Pypy 3.8",
114120
winarch: AMD64,
@@ -121,6 +127,12 @@ jobs:
121127
msvc-dev-arch: x86_amd64,
122128
pyversions: "pp39-*"
123129
}
130+
- {
131+
name: "Pypy 3.10",
132+
winarch: AMD64,
133+
msvc-dev-arch: x86_amd64,
134+
pyversions: "pp310-*"
135+
}
124136

125137

126138
env:
@@ -129,6 +141,8 @@ jobs:
129141
# also define environment variables needed for testing
130142
CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk
131143

144+
CIBW_PRERELEASE_PYTHONS: True # for 3.12 testing
145+
132146
CIBW_BUILD: ${{ matrix.pyversions }}
133147
CIBW_ARCHS: ${{ matrix.winarch }}
134148

@@ -146,7 +160,7 @@ jobs:
146160
CIBW_BUILD_VERBOSITY: 2
147161

148162
steps:
149-
- uses: actions/checkout@v3.3.0
163+
- uses: actions/checkout@v3.5.3
150164

151165
- uses: TheMrMilchmann/setup-msvc-dev@v2 # this lets us use the developer command prompt on windows
152166
with:
@@ -158,7 +172,7 @@ jobs:
158172
set MSSdk=1
159173
python -m pip install setuptools wheel requests numpy Sphinx
160174
python setup.py docs
161-
python -m pip --disable-pip-version-check install cibuildwheel==2.12.0
175+
python -m pip --disable-pip-version-check install cibuildwheel==2.14.1
162176
python -m cibuildwheel --output-dir wheelhouse
163177
164178
- uses: actions/upload-artifact@v3

.github/workflows/cppcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-20.04
2323

2424
steps:
25-
- uses: actions/checkout@v3.3.0
25+
- uses: actions/checkout@v3.5.3
2626

2727
- name: Install deps
2828
run: |

.github/workflows/format-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-22.04
3030

3131
steps:
32-
- uses: actions/checkout@v3.3.0
32+
- uses: actions/checkout@v3.5.3
3333

3434
- name: Install deps
3535
run: python3 -m pip install pylint black clang-format sphinx

0 commit comments

Comments
 (0)