Skip to content

Commit de88561

Browse files
authored
Merge pull request #3128 from pygame-community/ankith26-dev-py
Add `dev.py` implementing dev command shorthands
2 parents b805e0f + a44143c commit de88561

File tree

8 files changed

+531
-88
lines changed

8 files changed

+531
-88
lines changed

.github/workflows/build-sdl3.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ jobs:
8585
sudo cmake --install . --config Release
8686
8787
- name: Build with SDL3
88-
run: >
89-
python3 -m pip install . -v -Csetup-args=-Dsdl_api=3
90-
-Csetup-args=-Dimage=disabled
91-
-Csetup-args=-Dmixer=disabled
92-
-Csetup-args=-Dfont=disabled
88+
run: python3 dev.py build --sdl3
9389

9490
# - name: Run tests
9591
# env:

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,17 @@ jobs:
6161
- uses: actions/checkout@v4.2.2
6262

6363
- name: Install deps
64-
# install numpy from pip and not apt because the one from pip is newer,
65-
# and has typestubs
6664
# https://github.com/actions/runner-images/issues/7192
6765
# https://github.com/orgs/community/discussions/47863
6866
run: |
6967
sudo apt-get update --fix-missing
7068
sudo apt-get install lcov -y
7169
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev python3-dev -y
72-
pip3 install --upgrade pip
73-
pip3 install meson-python ninja cython "sphinx<=7.2.6" # because we are doing --no-build-isolation
74-
pip3 install numpy>=1.21.0
7570
7671
- name: Build with coverage hooks and install
7772
id: build
7873
run: |
79-
pip3 install -e . --no-build-isolation -Cbuild-dir=./.mesonpy-rel -Csetup-args=-Dcoverage=true
74+
python3 dev.py build --coverage
8075
8176
- name: Run tests
8277
env:

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false # if a particular matrix build fails, don't skip the rest
5050
matrix:
51-
os: [ubuntu-24.04, ubuntu-22.04]
51+
os: [ubuntu-22.04]
5252

5353
env:
5454
# Pip now forces us to either make a venv or set this flag, so we will do
@@ -89,7 +89,6 @@ jobs:
8989
9090
# We upload the generated files under github actions assets
9191
- name: Upload sdist
92-
if: matrix.os == 'ubuntu-24.04' # upload sdist only once
9392
uses: actions/upload-artifact@v4
9493
with:
9594
name: pygame-wheels-sdist

.github/workflows/dev-check.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: python3 dev.py all
2+
3+
# Run CI on changes to main branch, or any PR to main. Do not run CI on
4+
# any other branch.
5+
# Run on changes to all files.
6+
on:
7+
push:
8+
branches: main
9+
10+
pull_request:
11+
branches: main
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}-dev-check
15+
cancel-in-progress: true
16+
17+
jobs:
18+
dev-check:
19+
runs-on: ubuntu-24.04
20+
21+
env:
22+
# Pip now forces us to either make a venv or set this flag, so we will do
23+
# this
24+
PIP_BREAK_SYSTEM_PACKAGES: 1
25+
26+
# We are using dependencies installed from apt
27+
PG_DEPS_FROM_SYSTEM: 1
28+
29+
# environment variables to set while testing
30+
SDL_VIDEODRIVER: "dummy"
31+
SDL_AUDIODRIVER: "disk"
32+
33+
steps:
34+
- uses: actions/checkout@v4.2.2
35+
36+
- name: Install deps
37+
run: |
38+
sudo apt-get update --fix-missing
39+
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev python3-dev
40+
41+
- name: Check dev.py all
42+
run: python3 dev.py all

.github/workflows/format-lint.yml

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

0 commit comments

Comments
 (0)