-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sprite-group-collide-tweaks
- Loading branch information
Showing
141 changed files
with
2,693 additions
and
962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,10 +65,10 @@ jobs: | |
- { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' } | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Build sources and run tests | ||
uses: uraimo/run-on-arch-action@v2.7.2 | ||
uses: uraimo/run-on-arch-action@v2.8.1 | ||
id: build | ||
with: | ||
arch: ${{ matrix.base_image && 'none' || matrix.arch }} | ||
|
@@ -96,13 +96,11 @@ jobs: | |
install: ${{ env.INSTALL_CMD }} | ||
|
||
# Build a wheel, install it for running unit tests. | ||
# --no-build-isolation is passed so that preinstalled meson-python can be used | ||
# (done for optimization reasons) | ||
# pip does not know that ninja is installed, and tries to install it again. | ||
# so pass --ignore-dep ninja explicitly | ||
run: | | ||
echo "\nBuilding pygame wheel\n" | ||
pip3 wheel . --no-build-isolation --wheel-dir /artifacts -vvv | ||
echo "\nInstalling wheel\n" | ||
pip3 install --no-index --pre --break-system-packages --find-links /artifacts pygame-ce | ||
echo "\nBuilding and installing pygame wheel\n" | ||
PIP_BREAK_SYSTEM_PACKAGES=1 python3 dev.py --ignore-dep ninja build --wheel /artifacts --lax | ||
echo "\nRunning tests\n" | ||
export SDL_VIDEODRIVER=dummy | ||
export SDL_AUDIODRIVER=disk | ||
|
@@ -136,7 +134,7 @@ jobs: | |
done | ||
- name: Test armv7 wheel on armv6 | ||
uses: uraimo/run-on-arch-action@v2.7.2 | ||
uses: uraimo/run-on-arch-action@v2.8.1 | ||
with: | ||
arch: armv6 | ||
distro: bookworm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
SDKROOT: /opt/python-wasm-sdk | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Regen with latest cython (using system python3) | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,11 +47,11 @@ jobs: | |
- { macarch: x86_64, os: macos-13 } | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Test for Mac Deps cache hit | ||
id: macdep-cache | ||
uses: actions/cache@v4.1.1 | ||
uses: actions/cache@v4.2.0 | ||
with: | ||
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} | ||
# The hash of all files in buildconfig manylinux-build and macdependencies is | ||
|
@@ -64,7 +64,7 @@ jobs: | |
if: steps.macdep-cache.outputs.cache-hit != 'true' | ||
run: | | ||
export MAC_ARCH="${{ matrix.macarch }}" | ||
brew install coreutils pkg-config | ||
brew install coreutils | ||
cd buildconfig/macdependencies | ||
bash ./build_mac_deps.sh | ||
|
@@ -104,7 +104,6 @@ jobs: | |
|
||
# Setup macOS dependencies | ||
CIBW_BEFORE_ALL: | | ||
brew install pkg-config | ||
cd buildconfig/macdependencies | ||
cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps | ||
bash ./install_mac_deps.sh | ||
|
@@ -116,17 +115,17 @@ jobs: | |
CIBW_BEFORE_TEST: rm -rf ${{ github.workspace }}/pygame_mac_deps | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: pip cache | ||
uses: actions/cache@v4.1.1 | ||
uses: actions/cache@v4.2.0 | ||
with: | ||
path: ~/Library/Caches/pip # This cache path is only right on mac | ||
key: pip-cache-${{ matrix.macarch }}-${{ matrix.os }} | ||
|
||
- name: Fetch Mac deps | ||
id: macdep-cache | ||
uses: actions/cache@v4.1.1 | ||
uses: actions/cache@v4.2.0 | ||
with: | ||
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} | ||
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }} | ||
|
@@ -135,10 +134,10 @@ jobs: | |
- name: Install uv for speed | ||
uses: yezz123/setup-uv@v4 | ||
with: | ||
uv-version: "0.4.10" | ||
uv-version: "0.5.4" | ||
|
||
- name: Build and test wheels | ||
uses: pypa/cibuildwheel@v2.21.3 | ||
uses: pypa/cibuildwheel@v2.22.0 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ jobs: | |
CIBW_ARCHS: ${{ matrix.arch }} | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | ||
|
@@ -68,14 +68,14 @@ jobs: | |
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 | ||
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 | ||
with: | ||
images: ghcr.io/${{ github.repository }}_${{ matrix.arch }} | ||
tags: type=raw,value=${{ hashFiles('buildconfig/manylinux-build/**') }} | ||
|
||
- name: Build and push Docker image | ||
if: steps.inspect.outcome == 'failure' | ||
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 | ||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 | ||
with: | ||
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base | ||
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }} | ||
|
@@ -91,7 +91,7 @@ jobs: | |
CIBW_MANYLINUX_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }} | ||
CIBW_MANYLINUX_PYPY_I686_IMAGE: ghcr.io/${{ github.repository }}_i686:${{ steps.meta.outputs.version }} | ||
|
||
uses: pypa/cibuildwheel@v2.21.3 | ||
uses: pypa/cibuildwheel@v2.22.0 | ||
|
||
# We upload the generated files under github actions assets | ||
- name: Upload dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,12 @@ jobs: | |
matrix: | ||
include: | ||
- { sys: mingw64, env: x86_64 } | ||
- { sys: mingw32, env: i686 } | ||
- { sys: ucrt64, env: ucrt-x86_64 } | ||
- { sys: clang64, env: clang-x86_64 } | ||
# - { sys: clangarm64, env: clang-aarch64 } | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.sys }} | ||
|
@@ -69,12 +68,10 @@ jobs: | |
# mingw-w64-${{ matrix.env }}-freetype | ||
# mingw-w64-${{ matrix.env }}-portmidi | ||
|
||
- name: Building pygame wheel | ||
run: | | ||
pip3 wheel . --wheel-dir /artifacts -vvv --no-build-isolation | ||
- name: Installing wheel | ||
run: pip3 install --no-index --pre --find-links /artifacts pygame-ce | ||
# pip does not know that ninja is installed, and tries to install it again. | ||
# so pass --ignore-dep ninja explicitly | ||
- name: Build and install pygame wheel | ||
run: python3 dev.py --ignore-dep ninja build --wheel /artifacts --lax | ||
|
||
- name: Run tests | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,16 +52,28 @@ jobs: | |
PG_DEPS_FROM_SYSTEM: 1 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Install deps (linux) | ||
- name: Install pygame deps (linux) | ||
if: matrix.os == 'ubuntu-24.04' | ||
run: sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev | ||
run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev | ||
- name: Install deps (mac) | ||
- name: Install pygame deps (mac) | ||
if: matrix.os == 'macos-14' | ||
run: brew install freetype portmidi | ||
|
||
# taken from dependencies of the 'libsdl2-dev' package | ||
- name: Install SDL deps (linux) | ||
if: matrix.os == 'ubuntu-24.04' | ||
run: > | ||
sudo apt-get install libasound2-dev libdbus-1-dev libdecor-0-dev libdrm-dev | ||
libegl-dev libgbm-dev libgl-dev libgles-dev libibus-1.0-dev libpulse-dev | ||
libsamplerate0-dev libsndio-dev libudev-dev libwayland-dev libx11-dev | ||
libxcursor-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev | ||
libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev | ||
# taken from https://wiki.libsdl.org/SDL3/Installation | ||
- name: Install SDL3 | ||
if: matrix.os != 'windows-latest' | ||
|
@@ -74,12 +86,24 @@ jobs: | |
cmake --build . --config Release --parallel | ||
sudo cmake --install . --config Release | ||
- name: Make sdist and install it | ||
run: > | ||
python3 -m pip install . -v -Csetup-args=-Dsdl_api=3 | ||
-Csetup-args=-Dimage=disabled | ||
-Csetup-args=-Dmixer=disabled | ||
-Csetup-args=-Dfont=disabled | ||
- name: Install SDL3_image | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
git clone https://github.com/libsdl-org/SDL_image | ||
cd SDL_image | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
cmake --build . --config Release --parallel | ||
sudo cmake --install . --config Release | ||
- name: Build with SDL3 | ||
run: python3 dev.py build --sdl3 | ||
|
||
# eventually we need to run all tests, but for now test that importing pygame | ||
# works | ||
- name: Test import works | ||
run: python3 -c 'import pygame' | ||
|
||
# - name: Run tests | ||
# env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,25 +58,20 @@ jobs: | |
PG_DEPS_FROM_SYSTEM: 1 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Install deps | ||
# install numpy from pip and not apt because the one from pip is newer, | ||
# and has typestubs | ||
# https://github.com/actions/runner-images/issues/7192 | ||
# https://github.com/orgs/community/discussions/47863 | ||
run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install lcov -y | ||
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev python3-dev -y | ||
pip3 install --upgrade pip | ||
pip3 install meson-python ninja cython "sphinx<=7.2.6" # because we are doing --no-build-isolation | ||
pip3 install numpy>=1.21.0 | ||
- name: Build with coverage hooks and install | ||
id: build | ||
run: | | ||
pip3 install -e . --no-build-isolation -Cbuild-dir=./.mesonpy-rel -Csetup-args=-Dcoverage=true | ||
python3 dev.py build --coverage | ||
- name: Run tests | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ jobs: | |
strategy: | ||
fail-fast: false # if a particular matrix build fails, don't skip the rest | ||
matrix: | ||
os: [ubuntu-24.04, ubuntu-22.04] | ||
os: [ubuntu-22.04] | ||
|
||
env: | ||
# Pip now forces us to either make a venv or set this flag, so we will do | ||
|
@@ -58,7 +58,7 @@ jobs: | |
PG_DEPS_FROM_SYSTEM: 1 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Install deps | ||
# install numpy from pip and not apt because the one from pip is newer, | ||
|
@@ -84,12 +84,11 @@ jobs: | |
|
||
- name: Test typestubs | ||
run: | | ||
pip3 install mypy | ||
pip3 install mypy==1.13.0 | ||
python3 buildconfig/stubs/stubcheck.py | ||
# We upload the generated files under github actions assets | ||
- name: Upload sdist | ||
if: matrix.os == 'ubuntu-24.04' # upload sdist only once | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pygame-wheels-sdist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ jobs: | |
CIBW_ARCHS: ${{ matrix.winarch }} | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- uses: TheMrMilchmann/setup-msvc-dev@v3 # this lets us use the developer command prompt on windows | ||
with: | ||
|
@@ -59,10 +59,10 @@ jobs: | |
- name: Install uv for speed | ||
uses: yezz123/setup-uv@v4 | ||
with: | ||
uv-version: "0.4.10" | ||
uv-version: "0.5.4" | ||
|
||
- name: Build and test wheels | ||
uses: pypa/cibuildwheel@v2.21.3 | ||
uses: pypa/cibuildwheel@v2.22.0 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].2 | ||
|
||
- name: Install deps | ||
# https://github.com/actions/runner-images/issues/7192 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: python3 dev.py all | ||
|
||
# Run CI on changes to main branch, or any PR to main. Do not run CI on | ||
# any other branch. | ||
# Run on changes to all files. | ||
on: | ||
push: | ||
branches: main | ||
|
||
pull_request: | ||
branches: main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-dev-check | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
dev-check: | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
# Pip now forces us to either make a venv or set this flag, so we will do | ||
# this | ||
PIP_BREAK_SYSTEM_PACKAGES: 1 | ||
|
||
# We are using dependencies installed from apt | ||
PG_DEPS_FROM_SYSTEM: 1 | ||
|
||
# environment variables to set while testing | ||
SDL_VIDEODRIVER: "dummy" | ||
SDL_AUDIODRIVER: "disk" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Install deps | ||
run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev python3-dev | ||
- name: Check dev.py all | ||
run: python3 dev.py all |
Oops, something went wrong.