Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into docs-to-stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldalma999 committed Nov 4, 2024
2 parents ae70cfa + de88561 commit 810a652
Show file tree
Hide file tree
Showing 43 changed files with 1,318 additions and 812 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-debian-multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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/[email protected].1
- uses: actions/[email protected].2

- name: Regen with latest cython (using system python3)
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].1
uses: actions/[email protected].2
with:
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
# The hash of all files in buildconfig manylinux-build and macdependencies is
Expand Down Expand Up @@ -116,17 +116,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/[email protected].1
uses: actions/[email protected].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/[email protected].1
uses: actions/[email protected].2
with:
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-on-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/build-sdl3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,26 @@ 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

- 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'
Expand All @@ -74,12 +84,8 @@ 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: Build with SDL3
run: python3 dev.py build --sdl3

# - name: Run tests
# env:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/build-ubuntu-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-ubuntu-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -89,7 +89,6 @@ jobs:
# 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/dev-check.yml
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
65 changes: 0 additions & 65 deletions .github/workflows/format-lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release-gh-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
contents: write

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2

- name: Download all artifacts
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2

- name: Pull all release assets
uses: robinraju/[email protected]
Expand Down
16 changes: 8 additions & 8 deletions buildconfig/download_win_prebuilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def get_urls(x86=True, x64=True):
url_sha1 = []
url_sha1.extend([
[
'https://github.com/libsdl-org/SDL/releases/download/release-2.30.8/SDL2-devel-2.30.8-VC.zip',
'389a7575afaeccd3586a8105520cbec46b930dcb',
'https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-devel-2.30.9-VC.zip',
'd89a2ad46b98ba08db5ec5877cb2fde46e127825',
],
[
'https://github.com/libsdl-org/SDL/releases/download/preview-3.1.3/SDL3-devel-3.1.3-VC.zip',
'8e4d7104193ba976406fe9968301de6f6b57f342'
'https://github.com/libsdl-org/SDL/releases/download/preview-3.1.6/SDL3-devel-3.1.6-VC.zip',
'7a3b9ed85cfe735c7e106d98c4b6395a113e5d7e'
],
[
'https://github.com/pygame-community/SDL_image/releases/download/2.8.2-pgce/SDL2_image-devel-2.8.2-VCpgce.zip',
Expand Down Expand Up @@ -238,23 +238,23 @@ def copy(src, dst):
copy(
os.path.join(
temp_dir,
'SDL2-devel-2.30.8-VC/SDL2-2.30.8'
'SDL2-devel-2.30.9-VC/SDL2-2.30.9'
),
os.path.join(
move_to_dir,
prebuilt_dir,
'SDL2-2.30.8'
'SDL2-2.30.9'
)
)
copy(
os.path.join(
temp_dir,
'SDL3-devel-3.1.3-VC/SDL3-3.1.3'
'SDL3-devel-3.1.6-VC/SDL3-3.1.6'
),
os.path.join(
move_to_dir,
prebuilt_dir,
'SDL3-3.1.3'
'SDL3-3.1.6'
)
)

Expand Down
2 changes: 2 additions & 0 deletions buildconfig/macdependencies/clean_usr_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ln -s /usr/bin/git /opt/homebrew/bin/git
rm -rf /usr/local/lib/libtiff*
rm -rf /usr/local/lib/libzstd*
rm -rf /usr/local/lib/libwebp*
rm -rf /usr/local/lib/libdeflate*
rm -rf /usr/local/lib/libsndfile*
rm -rf /usr/local/lib/glib*
rm -rf /usr/local/lib/libglib*
Expand All @@ -27,6 +28,7 @@ rm -rf /usr/local/opt/freetype*

rm -rf /usr/local/Cellar/libtiff /opt/homebrew/Cellar/libtiff
rm -rf /usr/local/Cellar/libsndfile /opt/homebrew/Cellar/libsndfile
rm -rf /usr/local/Cellar/libdeflate* /opt/homebrew/Cellar/libdeflate*
rm -rf /usr/local/Cellar/glib /opt/homebrew/Cellar/glib
rm -rf /usr/local/Cellar/brotli /opt/homebrew/Cellar/brotli
rm -rf /usr/local/Cellar/pcre* /opt/homebrew/Cellar/pcre*
Expand Down
Loading

0 comments on commit 810a652

Please sign in to comment.