Skip to content

Commit 48e1fb4

Browse files
authored
Merge branch 'pygame-community:main' into lazy-numpy
2 parents c88107d + 12141bf commit 48e1fb4

File tree

212 files changed

+7013
-4621
lines changed

Some content is hidden

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

212 files changed

+7013
-4621
lines changed

.circleci/config.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# define files/directories that won't be exported in an sdist
22
# Keep in sync with MANIFEST.in
3-
.circleci/ export-ignore
43
.github/ export-ignore
5-
buildconfig/ci/ export-ignore
64
buildconfig/macdependencies/ export-ignore
75
buildconfig/manylinux-build/ export-ignore
86

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ env:
4949
jobs:
5050
build-multiarch:
5151
name: Debian (Bookworm - 12) [${{ matrix.arch }}]
52-
runs-on: ubuntu-24.04
52+
runs-on: ubuntu-22.04
5353

5454
strategy:
5555
fail-fast: false # if a particular matrix build fails, don't skip the rest
@@ -68,7 +68,7 @@ jobs:
6868
- uses: actions/checkout@v4.2.2
6969

7070
- name: Build sources and run tests
71-
uses: uraimo/run-on-arch-action@v2.8.1
71+
uses: uraimo/run-on-arch-action@v3.0.0
7272
id: build
7373
with:
7474
arch: ${{ matrix.base_image && 'none' || matrix.arch }}
@@ -118,7 +118,7 @@ jobs:
118118
test-armv7-on-armv6:
119119
needs: build-multiarch
120120
name: Debian (Bookworm - 12) [build - armv7, test - armv6]
121-
runs-on: ubuntu-24.04
121+
runs-on: ubuntu-22.04
122122
steps:
123123
- name: Download all multiarch artifacts
124124
uses: actions/download-artifact@v4
@@ -134,7 +134,7 @@ jobs:
134134
done
135135
136136
- name: Test armv7 wheel on armv6
137-
uses: uraimo/run-on-arch-action@v2.8.1
137+
uses: uraimo/run-on-arch-action@v3.0.0
138138
with:
139139
arch: armv6
140140
distro: bookworm

.github/workflows/build-macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
- name: Test for Mac Deps cache hit
5353
id: macdep-cache
54-
uses: actions/cache@v4.2.0
54+
uses: actions/cache@v4.2.2
5555
with:
5656
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5757
# The hash of all files in buildconfig manylinux-build and macdependencies is
@@ -118,26 +118,26 @@ jobs:
118118
- uses: actions/checkout@v4.2.2
119119

120120
- name: pip cache
121-
uses: actions/cache@v4.2.0
121+
uses: actions/cache@v4.2.2
122122
with:
123123
path: ~/Library/Caches/pip # This cache path is only right on mac
124124
key: pip-cache-${{ matrix.macarch }}-${{ matrix.os }}
125125

126126
- name: Fetch Mac deps
127127
id: macdep-cache
128-
uses: actions/cache@v4.2.0
128+
uses: actions/cache@v4.2.2
129129
with:
130130
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
131131
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
132132
fail-on-cache-miss: true
133133

134134
- name: Install uv for speed
135-
uses: yezz123/setup-uv@v4
135+
uses: astral-sh/setup-uv@v5
136136
with:
137-
uv-version: "0.5.4"
137+
version: "0.5.26"
138138

139139
- name: Build and test wheels
140-
uses: pypa/cibuildwheel@v2.22.0
140+
uses: pypa/cibuildwheel@v2.23.0
141141

142142
- uses: actions/upload-artifact@v4
143143
with:

.github/workflows/build-manylinux.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ concurrency:
3838
jobs:
3939
build:
4040
name: ${{ matrix.arch }}
41-
runs-on: ubuntu-24.04
41+
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
4242
permissions:
4343
contents: read
4444
packages: write
4545

4646
strategy:
4747
fail-fast: false # if a particular matrix build fails, don't skip the rest
4848
matrix:
49-
arch: [x86_64, i686]
49+
arch: [x86_64, i686, aarch64]
5050

5151
env:
5252
CIBW_ARCHS: ${{ matrix.arch }}
@@ -68,14 +68,14 @@ jobs:
6868

6969
- name: Extract metadata (tags, labels) for Docker
7070
id: meta
71-
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
71+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
7272
with:
7373
images: ghcr.io/${{ github.repository }}_${{ matrix.arch }}
7474
tags: type=raw,value=${{ hashFiles('buildconfig/manylinux-build/**') }}
7575

7676
- name: Build and push Docker image
7777
if: steps.inspect.outcome == 'failure'
78-
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc
78+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
7979
with:
8080
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base
8181
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }}
@@ -90,8 +90,10 @@ jobs:
9090
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ghcr.io/${{ github.repository }}_x86_64:${{ steps.meta.outputs.version }}
9191
CIBW_MANYLINUX_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }}
9292
CIBW_MANYLINUX_PYPY_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }}
93+
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
94+
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
9395

94-
uses: pypa/cibuildwheel@v2.22.0
96+
uses: pypa/cibuildwheel@v2.23.0
9597

9698
# We upload the generated files under github actions assets
9799
- name: Upload dist

.github/workflows/build-sdl3.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ jobs:
9797
cmake --build . --config Release --parallel
9898
sudo cmake --install . --config Release
9999
100+
- name: Install SDL3_ttf
101+
if: matrix.os != 'windows-latest'
102+
run: |
103+
git clone https://github.com/libsdl-org/SDL_ttf
104+
cd SDL_ttf
105+
mkdir build
106+
cd build
107+
cmake -DCMAKE_BUILD_TYPE=Release ..
108+
cmake --build . --config Release --parallel
109+
sudo cmake --install . --config Release
110+
100111
- name: Build with SDL3
101112
run: python3 dev.py build --sdl3
102113

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# this workflow generates C code coverage information from the unit test
1+
# This workflow generates C code coverage information from the unit test
22
# suite. Note that for intrinsics, it only runs what gets compiled
33
# and would naturally run. It also is limited to what can run in
44
# a CI environment
55
# IMPORTANT: binaries are not to be uploaded from this workflow!
66

77
name: Ubuntu coverage
88

9-
# Run CI only when a release is created, on changes to main branch, or any PR
10-
# to main. Do not run CI on any other branch. Also, skip any non-source changes
9+
# Run CI only on changes to main branch, or any PR to main.
10+
# Do not run CI on any other branch. Also, skip any non-source changes
1111
# from running on CI
1212
on:
1313
push:
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# This workflow runs a build with a python version that has debug symbols
2+
# Update this workflow when our min/max python minor versions update
3+
# This workflow is necessary to ensure that we can build and run with
4+
# a debug python build without too much worrying about SIGABRT being thrown
5+
# IMPORTANT: binaries are not to be uploaded from this workflow!
6+
7+
name: Ubuntu debug python
8+
defaults:
9+
run:
10+
shell: bash -leo pipefail {0}
11+
12+
# Run CI only on changes to main branch, or any PR to main.
13+
# Do not run CI on any other branch. Also, skip any non-source changes
14+
# from running on CI
15+
on:
16+
push:
17+
branches: main
18+
paths-ignore:
19+
- 'docs/**'
20+
- 'examples/**'
21+
- '.gitignore'
22+
- '*.rst'
23+
- '*.md'
24+
- '.github/workflows/*.yml'
25+
# re-include current file to not be excluded
26+
- '!.github/workflows/build-ubuntu-debug-python.yml'
27+
28+
pull_request:
29+
branches: main
30+
paths-ignore:
31+
- 'docs/**'
32+
- 'examples/**'
33+
- '.gitignore'
34+
- '*.rst'
35+
- '*.md'
36+
- '.github/workflows/*.yml'
37+
# re-include current file to not be excluded
38+
- '!.github/workflows/build-ubuntu-debug-python.yml'
39+
40+
concurrency:
41+
group: ${{ github.workflow }}-${{ github.ref }}-ubuntu-debug-python
42+
cancel-in-progress: true
43+
44+
jobs:
45+
debug_python:
46+
runs-on: ${{ matrix.os }}
47+
strategy:
48+
fail-fast: false # if a particular matrix build fails, don't skip the rest
49+
matrix:
50+
os: [ ubuntu-24.04 ]
51+
# check our min python (minor) version and our max python (minor) version
52+
python: [
53+
3.9.21,
54+
3.13.1
55+
]
56+
57+
env:
58+
# Pip now forces us to either make a venv or set this flag, so we will do
59+
# this
60+
PIP_BREAK_SYSTEM_PACKAGES: 1
61+
# We are using dependencies installed from apt
62+
PG_DEPS_FROM_SYSTEM: 1
63+
64+
steps:
65+
- uses: actions/checkout@v4.2.2
66+
67+
- name: Install pygame-ce deps
68+
# https://github.com/actions/runner-images/issues/7192
69+
# https://github.com/orgs/community/discussions/47863
70+
run: |
71+
sudo apt-get update --fix-missing
72+
73+
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev -y
74+
75+
- name: Install pyenv
76+
run: |
77+
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
78+
curl https://pyenv.run | bash
79+
80+
echo -e 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
81+
echo -e 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
82+
echo -e 'eval "$(pyenv init --path)"' >> ~/.bash_profile
83+
echo -e 'eval "$(pyenv init -)"' >> ~/.bash_profile
84+
85+
- name: Cache debug python build
86+
id: cache-python
87+
uses: actions/cache@v4.2.2
88+
with:
89+
key: ${{ matrix.python }}
90+
path: ~/.pyenv/versions/${{ matrix.python }}-debug/**
91+
92+
- name: Build debug python
93+
id: build
94+
if: steps.cache-python.outputs.cache-hit != 'true'
95+
run: pyenv install ${{ matrix.python }} --debug -v
96+
97+
- name: Build pygame-ce
98+
id: build-pygame-ce
99+
run: |
100+
pyenv global ${{ matrix.python }}-debug
101+
python dev.py build --lax
102+
103+
- name: Run tests
104+
env:
105+
SDL_VIDEODRIVER: "dummy"
106+
SDL_AUDIODRIVER: "disk"
107+
run: |
108+
pyenv global ${{ matrix.python }}-debug
109+
python -m pygame.tests -v --exclude opengl,music,timing --time_out 300

.github/workflows/build-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ jobs:
5757
arch: ${{ matrix.msvc-dev-arch }}
5858

5959
- name: Install uv for speed
60-
uses: yezz123/setup-uv@v4
60+
uses: astral-sh/setup-uv@v5
6161
with:
62-
uv-version: "0.5.4"
62+
version: "0.5.26"
6363

6464
- name: Build and test wheels
65-
uses: pypa/cibuildwheel@v2.22.0
65+
uses: pypa/cibuildwheel@v2.23.0
6666

6767
- uses: actions/upload-artifact@v4
6868
with:

0 commit comments

Comments
 (0)