Skip to content

Commit

Permalink
Merge branch 'main' into matiiss-allow-sprite-group-subscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Matiiss authored Nov 24, 2024
2 parents 38e00db + 2b195a7 commit e0c0698
Show file tree
Hide file tree
Showing 325 changed files with 9,677 additions and 3,741 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- run:
name: Build the Linux wheels.
command: |
pip3 install --user cibuildwheel==2.20.0
pip3 install --user cibuildwheel==2.21.3
PATH="$HOME/.local/bin:$PATH" cibuildwheel --output-dir wheelhouse
- store_artifacts:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/blank_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: 🗎 Blank Issue
about: A blank issue. For those who know what they are doing.
title: ''
labels:
labels:
assignees: ''

---
---
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''

**Environment:**

If possible, please include the output of `pygame.print_debug_info()` from your program in your bug report. It looks something
If possible, please include the output of `pygame.print_debug_info()` from your program in your bug report. It looks something
like this:

```
Expand All @@ -33,7 +33,7 @@ Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
Display Driver: windows
Mixer Driver: wasapi
```
If you can't get the debug output, any of the environment details included in it that you do know would be useful
If you can't get the debug output, any of the environment details included in it that you do know would be useful
in diagnosing the issue & helping you.

Other environment details, not included in `print_debug_info()`, that might help:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ assignees: ''

**Description**

Describe your enhancement, as clearly as possible.
Describe your enhancement, as clearly as possible.
12 changes: 6 additions & 6 deletions .github/workflows/build-debian-multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ env:
jobs:
build-multiarch:
name: Debian (Bookworm - 12) [${{ matrix.arch }}]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
Expand All @@ -65,10 +65,10 @@ jobs:
- { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' }

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.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 }}
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
export SDL_VIDEODRIVER=dummy
export SDL_AUDIODRIVER=disk
python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
# Upload the generated files under github actions assets section
- name: Upload dist
uses: actions/upload-artifact@v4
Expand All @@ -120,7 +120,7 @@ jobs:
test-armv7-on-armv6:
needs: build-multiarch
name: Debian (Bookworm - 12) [build - armv7, test - armv6]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Download all multiarch artifacts
uses: actions/download-artifact@v4
Expand All @@ -136,7 +136,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-emsdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
SDKROOT: /opt/python-wasm-sdk

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2

- name: Regen with latest cython (using system python3)
run: |
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: macOS

# 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
# 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:
Expand All @@ -27,7 +27,7 @@ on:
- '.github/workflows/*.yml'
# re-include current file to not be excluded
- '!.github/workflows/build-macos.yml'

# the github release drafter can call this workflow
workflow_call:

Expand All @@ -47,14 +47,14 @@ jobs:
- { macarch: x86_64, os: macos-13 }

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2

- name: Test for Mac Deps cache hit
id: macdep-cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
with:
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
# The hash of all files in buildconfig manylinux-build and macdependencies is
# The hash of all files in buildconfig manylinux-build and macdependencies is
# the key to the cache. If anything changes here, the deps are built again
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}-${{ matrix.os }}
lookup-only: true
Expand Down Expand Up @@ -116,17 +116,17 @@ jobs:
CIBW_BEFORE_TEST: rm -rf ${{ github.workspace }}/pygame_mac_deps

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2

- name: pip cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
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.0.2
uses: actions/cache@v4.1.2
with:
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
Expand All @@ -135,14 +135,13 @@ jobs:
- name: Install uv for speed
uses: yezz123/setup-uv@v4
with:
uv-version: "0.2.22"
uv-version: "0.4.10"

- name: Build and test wheels
uses: pypa/cibuildwheel@v2.20.0
uses: pypa/cibuildwheel@v2.21.3

- uses: actions/upload-artifact@v4
with:
name: pygame-wheels-macos-${{ matrix.macarch }}
path: ./wheelhouse/*.whl
compression-level: 0 # wheels are already zip files, no need for more compression

21 changes: 10 additions & 11 deletions .github/workflows/build-manylinux.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ManyLinux

# 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
# 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:
Expand All @@ -27,7 +27,7 @@ on:
- '.github/workflows/*.yml'
# re-include current file to not be excluded
- '!.github/workflows/build-manylinux.yml'

# the github release drafter can call this workflow
workflow_call:

Expand All @@ -38,29 +38,29 @@ concurrency:
jobs:
build:
name: ${{ matrix.arch }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write

strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
arch: [x86_64, i686]

env:
CIBW_ARCHS: ${{ matrix.arch }}

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2

- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Inspect image, skip build if image exists
id: inspect
continue-on-error: true
Expand All @@ -75,7 +75,7 @@ jobs:

- name: Build and push Docker image
if: steps.inspect.outcome == 'failure'
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }}
Expand All @@ -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.20.0
uses: pypa/cibuildwheel@v2.21.3

# We upload the generated files under github actions assets
- name: Upload dist
Expand All @@ -100,4 +100,3 @@ jobs:
name: pygame-wheels-manylinux-${{ matrix.arch }}
path: ./wheelhouse/*.whl
compression-level: 0 # wheels are already zip files, no need for more compression

4 changes: 1 addition & 3 deletions .github/workflows/build-on-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ jobs:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang32, env: clang-i686 }
- { sys: clang64, env: clang-x86_64 }
# - { sys: clangarm64, env: clang-aarch64 }

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/build-sdl3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# SDL3 porting is WIP
name: SDL3 build

# 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-sdl3.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-sdl3.yml'

# the github release drafter can call this workflow
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ubuntu-sdist
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
os: [ubuntu-24.04, windows-latest, macos-14]

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

steps:
- uses: actions/[email protected]

- name: Install pygame deps (linux)
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt-get update --fix-missing
sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev
- 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'
run: |
git clone https://github.com/libsdl-org/SDL
cd SDL
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:
# SDL_VIDEODRIVER: "dummy"
# SDL_AUDIODRIVER: "disk"
# run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
Loading

0 comments on commit e0c0698

Please sign in to comment.