Skip to content

Commit ede757a

Browse files
committed
Unity now a wrap
1 parent 678d4ef commit ede757a

Some content is hidden

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

50 files changed

+193
-9949
lines changed
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Tests pygame on more exotic architectures. This is not something that is
2+
# actively supported, but source code support for this is nice to have. We
3+
# don't do any releases from here.
4+
5+
name: Debian Packaged
6+
7+
# Run CI only on changes to main branch, or any PR to main. Do not run CI on
8+
# any other branch. Also, skip any non-source changes from running on CI
9+
on:
10+
push:
11+
branches: main
12+
paths-ignore:
13+
- 'docs/**'
14+
- 'examples/**'
15+
- '.gitignore'
16+
- '*.rst'
17+
- '*.md'
18+
- '.github/workflows/*.yml'
19+
# re-include current file to not be excluded
20+
- '!.github/workflows/build-debian-packaged.yml'
21+
22+
pull_request:
23+
branches: main
24+
paths-ignore:
25+
- 'docs/**'
26+
- 'examples/**'
27+
- '.gitignore'
28+
- '*.rst'
29+
- '*.md'
30+
- '.github/workflows/*.yml'
31+
# re-include current file to not be excluded
32+
- '!.github/workflows/build-debian-packaged.yml'
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}-debian-packaged
36+
cancel-in-progress: true
37+
38+
# this command is called in two places, so save it in an env first
39+
env:
40+
INSTALL_CMD: |
41+
apt-get update --fix-missing
42+
apt-get upgrade -y
43+
apt-get install build-essential meson cython3 -y
44+
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev -y
45+
apt-get install libfreetype6-dev libportmidi-dev fontconfig -y
46+
apt-get install python3-dev python3-pip python3-wheel python3-sphinx python3-all dh-python python-all python-setuptools -y
47+
apt-get update
48+
apt-get install debhelper-compat python3-pyproject-metadata python3-tomli -y
49+
wget http://http.us.debian.org/debian/pool/main/m/meson-python/python3-mesonpy_0.12.0-2_all.deb
50+
dpkg -i python3-mesonpy_0.12.0-2_all.deb
51+
apt install
52+
pip3 install meson-python "sphinx-autoapi<=3.3.2" meson --break-system-packages
53+
54+
jobs:
55+
build-packaged:
56+
name: Debian (Bookworm - 12) [${{ matrix.arch }}, ${{matrix.python}}]
57+
runs-on: ubuntu-22.04
58+
59+
strategy:
60+
fail-fast: false # if a particular matrix build fails, don't skip the rest
61+
matrix:
62+
# maybe more things could be added in here in the future (if needed)
63+
include:
64+
# - { arch: x86, base_image: '' }
65+
# - { arch: x86-64, base_image: '', python: 3.9}
66+
# - { arch: x86-64, base_image: '', python: 3.10}
67+
# - { arch: x86-64, base_image: '', python: 3.11}
68+
# - { arch: x86-64, base_image: '', python: 3.12}
69+
- { arch: x86-64, base_image: '', python: 3.13}
70+
# - { arch: s390x, base_image: '' }
71+
# - { arch: ppc64le, base_image: '' }
72+
# - { arch: armv6, base_image: '' }
73+
# # a custom base_image is specified in the armv7 case. This is done because
74+
# # the armv6 image is just raspbian in disguise. And the wheel built on armv7
75+
# # is going to be tested on armv6
76+
# - { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' }
77+
78+
steps:
79+
- uses: actions/checkout@v4.2.2
80+
81+
- uses: actions/setup-python@v5
82+
with:
83+
python-version: ${{ matrix.python }}
84+
85+
# - name: Build sources and run tests
86+
# uses: uraimo/run-on-arch-action@v3.0.1
87+
# id: build
88+
# with:
89+
# arch: ${{ matrix.base_image && 'none' || matrix.arch }}
90+
# distro: ${{ matrix.base_image && 'none' || 'bookworm' }}
91+
# base_image: ${{ matrix.base_image }}
92+
93+
# # Not required, but speeds up builds
94+
# githubToken: ${{ github.token }}
95+
96+
# # Create an artifacts directory
97+
# setup: mkdir -p ~/artifacts
98+
99+
# # Mount the artifacts directory as /artifacts in the container
100+
# dockerRunArgs: --volume ~/artifacts:/artifacts
101+
102+
# # The shell to run commands with in the container
103+
# shell: /bin/sh
104+
105+
# # Install some dependencies in the container. This speeds up builds if
106+
# # you are also using githubToken. Any dependencies installed here will
107+
# # be part of the container image that gets cached, so subsequent
108+
# # builds don't have to re-install them. The image layer is cached
109+
# # publicly in your project's package repository, so it is vital that
110+
# # no secrets are present in the container state or logs.
111+
# install: ${{ env.INSTALL_CMD }}
112+
113+
# # Build a wheel, install it for running unit tests.
114+
# # pip does not know that ninja is installed, and tries to install it again.
115+
# # so pass --ignore-dep ninja explicitly
116+
# run: |
117+
# echo "\nBuilding and installing pygame wheel\n"
118+
# PIP_BREAK_SYSTEM_PACKAGES=1 python3 dev.py --ignore-dep ninja build --wheel /artifacts --lax
119+
# echo "\nRunning tests\n"
120+
# export SDL_VIDEODRIVER=dummy
121+
# export SDL_AUDIODRIVER=disk
122+
# python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
123+
124+
- name: Build Packaged Deb
125+
id: build
126+
run: |
127+
${{env.INSTALL_CMD}}
128+
apt install debmake -y
129+
mkdir ../pygame-ce-2.5.5
130+
mv * ../pygame-ce-2.5.5
131+
mv ../pygame-ce-2.5.5 .
132+
tar czf pygame-ce-2.5.5.tar.gz pygame-ce-2.5.5
133+
mv pygame-ce-2.5.5.tar.gz pygame-ce_2.5.5.orig.tar.gz
134+
cd pygame-ce-2.5.5
135+
debmake -b:python3
136+
perl -0000 -pi -e '$INDENT=" "; s{(Build-Depends: debhelper-compat.*python3-all)}{\1,\n${INDENT}cython3,\n${INDENT}libfreetype6-dev,\n${INDENT}libportmidi-dev,\n${INDENT}libsdl2-dev,\n${INDENT}libsdl2-image-dev,\n${INDENT}libsdl2-mixer-dev,\n${INDENT}libsdl2-ttf-dev}s' debian/control
137+
perl -0000 -pi.bak -e 's{Standards-Version}{\nStandards-Version}s' debian/control
138+
cat debian/control
139+
dpkg-source -b .
140+
dpkg-buildpackage
141+
142+
143+
- name: debug
144+
if: (failure() && steps.build.outcome == 'failure')
145+
run: cat pygame-ce-2.5.5/debian/control
146+
147+
# Upload the generated files under github actions assets section
148+
- name: Upload dist
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: debian-packaged-${{ matrix.arch }}-dist
152+
path: "*.deb"
153+
154+
# # test wheels built on armv7 on armv6. Why?
155+
# # because piwheels expects the same armv7 wheel to work on both armv7 and armv6
156+
# test-armv7-on-armv6:
157+
# needs: build-packaged
158+
# name: Debian (Bookworm - 12) [build - armv7, test - armv6]
159+
# runs-on: ubuntu-22.04
160+
# steps:
161+
# - name: Download all multiarch artifacts
162+
# uses: actions/download-artifact@v4
163+
# with:
164+
# name: pygame-multiarch-armv7-dist
165+
# path: ~/artifacts
166+
167+
# - name: Rename arm wheel in artifacts
168+
# run: |
169+
# cd ~/artifacts
170+
# for f in *; do
171+
# mv "$f" "${f//armv7l/armv6l}"
172+
# done
173+
174+
# - name: Test armv7 wheel on armv6
175+
# uses: uraimo/run-on-arch-action@v3.0.1
176+
# with:
177+
# arch: armv6
178+
# distro: bookworm
179+
# githubToken: ${{ github.token }}
180+
# dockerRunArgs: --volume ~/artifacts:/artifacts_new
181+
# shell: /bin/sh
182+
# install: ${{ env.INSTALL_CMD }}
183+
# run: |
184+
# echo "\nInstalling wheel\n"
185+
# pip3 install --no-index --pre --break-system-packages --find-links /artifacts_new pygame-ce
186+
# echo "\nRunning tests\n"
187+
# export SDL_VIDEODRIVER=dummy
188+
# export SDL_AUDIODRIVER=disk
189+
# python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ concurrency:
4343
cancel-in-progress: true
4444

4545
jobs:
46-
gen_coverage:
46+
gen_ctest:
4747
runs-on: ${{ matrix.os }}
4848
strategy:
4949
fail-fast: false # if a particular matrix build fails, don't skip the rest

subprojects/unity/CMakeLists.txt

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

subprojects/unity/LICENSE.txt

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

0 commit comments

Comments
 (0)