-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed merge conflicts and updated requirements
- Loading branch information
Showing
199 changed files
with
3,700 additions
and
126,718 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
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 |
---|---|---|
|
@@ -35,26 +35,45 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-debian-multiarch | ||
cancel-in-progress: true | ||
|
||
# this command is called in two places, so save it in an env first | ||
env: | ||
INSTALL_CMD: | | ||
apt-get update --fix-missing | ||
apt-get upgrade -y | ||
apt-get install build-essential meson cython3 -y | ||
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev -y | ||
apt-get install libfreetype6-dev libportmidi-dev fontconfig -y | ||
apt-get install python3-dev python3-pip python3-wheel python3-sphinx -y | ||
pip3 install meson-python --break-system-packages | ||
jobs: | ||
build-multiarch: | ||
name: Debian (Bullseye - 11) [${{ matrix.arch }}] | ||
name: Debian (Bookworm - 12) [${{ matrix.arch }}] | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false # if a particular matrix build fails, don't skip the rest | ||
matrix: | ||
# maybe more things could be added in here in the future (if needed) | ||
arch: [s390x, ppc64le] | ||
include: | ||
- { arch: s390x, base_image: '' } | ||
- { arch: ppc64le, base_image: '' } | ||
- { arch: armv6, base_image: '' } | ||
# a custom base_image is specified in the armv7 case. This is done because | ||
# the armv6 image is just raspbian in disguise. And the wheel built on armv7 | ||
# is going to be tested on armv6 | ||
- { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' } | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].4 | ||
|
||
- name: Build sources and run tests | ||
uses: uraimo/[email protected].1 | ||
uses: uraimo/[email protected].2 | ||
id: build | ||
with: | ||
arch: ${{ matrix.arch }} | ||
distro: bullseye | ||
arch: ${{ matrix.base_image && 'none' || matrix.arch }} | ||
distro: ${{ matrix.base_image && 'none' || 'bookworm' }} | ||
base_image: ${{ matrix.base_image }} | ||
|
||
# Not required, but speeds up builds | ||
githubToken: ${{ github.token }} | ||
|
@@ -74,20 +93,61 @@ jobs: | |
# builds don't have to re-install them. The image layer is cached | ||
# publicly in your project's package repository, so it is vital that | ||
# no secrets are present in the container state or logs. | ||
install: | | ||
apt-get update --fix-missing | ||
apt-get upgrade -y | ||
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg-dev fontconfig -y | ||
apt-get install python3-setuptools python3-dev python3-pip python3-wheel python3-sphinx -y | ||
install: ${{ env.INSTALL_CMD }} | ||
|
||
# Build a wheel, install it for running unit tests | ||
# 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) | ||
run: | | ||
export PIP_CONFIG_FILE=buildconfig/pip_config.ini | ||
echo "\nBuilding pygame wheel\n" | ||
python3 setup.py docs | ||
pip3 wheel . --wheel-dir /artifacts -vvv | ||
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 "\nRunning tests\n" | ||
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 | ||
with: | ||
name: pygame-multiarch-${{ matrix.arch }}-dist | ||
path: ~/artifacts/*.whl | ||
|
||
# test wheels built on armv7 on armv6. Why? | ||
# because piwheels expects the same armv7 wheel to work on both armv7 and armv6 | ||
test-armv7-on-armv6: | ||
needs: build-multiarch | ||
name: Debian (Bookworm - 12) [build - armv7, test - armv6] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Download all multiarch artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: pygame-multiarch-armv7-dist | ||
path: ~/artifacts | ||
|
||
- name: Rename arm wheel in artifacts | ||
run: | | ||
cd ~/artifacts | ||
for f in *; do | ||
mv "$f" "${f//armv7l/armv6l}" | ||
done | ||
- name: Test armv7 wheel on armv6 | ||
uses: uraimo/[email protected] | ||
with: | ||
arch: armv6 | ||
distro: bookworm | ||
githubToken: ${{ github.token }} | ||
dockerRunArgs: --volume ~/artifacts:/artifacts_new | ||
shell: /bin/sh | ||
install: ${{ env.INSTALL_CMD }} | ||
run: | | ||
echo "\nInstalling wheel\n" | ||
pip3 install --no-index --pre --find-links /artifacts pygame-ce | ||
pip3 install --no-index --pre --break-system-packages --find-links /artifacts_new pygame-ce | ||
echo "\nRunning tests\n" | ||
export SDL_VIDEODRIVER=dummy | ||
export SDL_AUDIODRIVER=disk | ||
|
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 |
---|---|---|
|
@@ -40,33 +40,12 @@ jobs: | |
SDK_ARCHIVE: python3.11-wasm-sdk-Ubuntu-22.04.tar.lz4 | ||
SDKROOT: /opt/python-wasm-sdk | ||
|
||
# use the most recent cython from github, but pin on a commit for CI | ||
# stability. This is also needed to benefit from caching cython installs | ||
LATEST_CYTHON_COMMIT: 2f3a781dcca092ce95fbfef2736b12b0d1ab50dd # cython 3.0.0 | ||
|
||
WHEELHOUSE_CYTHON: /tmp/wheelhouse/cython | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Cache Cython | ||
id: cache-cython | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.WHEELHOUSE_CYTHON }} | ||
key: wasm-ubuntu-cython-${{ env.LATEST_CYTHON_COMMIT }}-path-${{ env.WHEELHOUSE_CYTHON }} | ||
|
||
# This builds the cython wheel and stores it in cache too | ||
- name: Download and build cython on cache miss | ||
if: steps.cache-cython.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p $WHEELHOUSE_CYTHON | ||
pip wheel --wheel-dir $WHEELHOUSE_CYTHON git+https://github.com/cython/cython.git@$LATEST_CYTHON_COMMIT | ||
- uses: actions/[email protected] | ||
|
||
- name: Install latest cython and regen | ||
- name: Regen with latest cython (using system python3) | ||
run: | | ||
pip install --no-index --find-links $WHEELHOUSE_CYTHON --pre cython | ||
touch $(find | grep pxd$) | ||
pip3 install cython==3.0.10 | ||
python3 setup.py cython_only | ||
- name: Install python-wasm-sdk | ||
|
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 |
---|---|---|
|
@@ -38,23 +38,25 @@ concurrency: | |
jobs: | ||
deps: | ||
name: ${{ matrix.macarch }} deps | ||
runs-on: macos-12 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# make arm64 deps and x86_64 deps | ||
macarch: [arm64, x86_64] | ||
include: | ||
- { macarch: arm64, os: macos-14 } | ||
- { macarch: x86_64, os: macos-13 } | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].4 | ||
|
||
- 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 | ||
# 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 }} | ||
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}-${{ matrix.os }} | ||
lookup-only: true | ||
|
||
# build mac deps on cache miss | ||
|
@@ -76,7 +78,7 @@ jobs: | |
build: | ||
name: ${{ matrix.name }} | ||
needs: deps | ||
runs-on: macos-12 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # if a particular matrix build fails, don't skip the rest | ||
matrix: | ||
|
@@ -87,31 +89,36 @@ jobs: | |
- { | ||
name: "x86_64 (CPython 3.9 - 3.12)", | ||
macarch: x86_64, | ||
os: macos-13, | ||
pyversions: "cp3{9,10,11,12}-*", | ||
} | ||
|
||
- { | ||
name: "x86_64 (Python 3.8)", | ||
macarch: x86_64, | ||
os: macos-13, | ||
# CPython/PyPy 3.8 | ||
pyversions: "?p38-*", | ||
} | ||
|
||
- { | ||
name: "x86_64 (PyPy 3.9 and 3.10)", | ||
macarch: x86_64, | ||
os: macos-13, | ||
pyversions: "pp39-* pp310-*", | ||
} | ||
|
||
- { | ||
name: "arm64 (CPython 3.8 - 3.10)", | ||
macarch: arm64, | ||
os: macos-14, | ||
pyversions: "cp3{8,9,10}-*", | ||
} | ||
|
||
- { | ||
name: "arm64 (CPython 3.11 - 3.12)", | ||
macarch: arm64, | ||
os: macos-14, | ||
pyversions: "cp3{11,12}-*", | ||
} | ||
|
||
|
@@ -120,7 +127,7 @@ jobs: | |
# load pip config from this file. Define this in 'CIBW_ENVIRONMENT' | ||
# because this should not affect cibuildwheel machinery | ||
# also define environment variables needed for testing | ||
CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk | ||
CIBW_ENVIRONMENT: SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk | ||
|
||
# Explicitly tell CIBW what the wheel arch deployment target should be | ||
# There seems to be no better way to set this than this env | ||
|
@@ -135,8 +142,6 @@ jobs: | |
|
||
CIBW_BUILD: ${{ matrix.pyversions }} | ||
|
||
# Build arm64 and x86_64 wheels too on an Intel runner. | ||
# Note that the arm64 wheels cannot be tested on CI in this configuration | ||
CIBW_ARCHS: ${{ matrix.macarch }} | ||
|
||
# Setup macOS dependencies | ||
|
@@ -160,24 +165,24 @@ jobs: | |
CIBW_BUILD_VERBOSITY: 2 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].4 | ||
|
||
- 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.name }} | ||
|
||
- 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 }} | ||
fail-on-cache-miss: true | ||
|
||
- name: Build and test wheels | ||
uses: pypa/cibuildwheel@v2.16.4 | ||
uses: pypa/cibuildwheel@v2.17.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: | |
# load pip config from this file. Define this in 'CIBW_ENVIRONMENT' | ||
# because this should not affect cibuildwheel machinery | ||
# also define environment variables needed for testing | ||
CIBW_ENVIRONMENT: PIP_CONFIG_FILE=buildconfig/pip_config.ini PORTMIDI_INC_PORTTIME=1 SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk | ||
CIBW_ENVIRONMENT: SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk | ||
|
||
CIBW_BUILD: "cp3{8,9,10,11,12}-* pp3{8,9,10}-*" | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
|
@@ -79,10 +79,10 @@ jobs: | |
CIBW_BUILD_VERBOSITY: 2 | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
|
@@ -102,7 +102,7 @@ jobs: | |
|
||
- name: Build and push Docker image | ||
if: steps.inspect.outcome == 'failure' | ||
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 | ||
with: | ||
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base | ||
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }} | ||
|
@@ -118,7 +118,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.16.4 | ||
uses: pypa/cibuildwheel@v2.17.0 | ||
|
||
# We upload the generated files under github actions assets | ||
- name: Upload dist | ||
|
Oops, something went wrong.