Skip to content

Commit

Permalink
Merge pull request pygame-community#3128 from pygame-community/ankith…
Browse files Browse the repository at this point in the history
…26-dev-py

Add `dev.py` implementing dev command shorthands
  • Loading branch information
ankith26 authored Nov 3, 2024
2 parents b805e0f + a44143c commit de88561
Show file tree
Hide file tree
Showing 8 changed files with 531 additions and 88 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-sdl3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ jobs:
sudo cmake --install . --config Release
- name: Build with SDL3
run: >
python3 -m pip install . -v -Csetup-args=-Dsdl_api=3
-Csetup-args=-Dimage=disabled
-Csetup-args=-Dmixer=disabled
-Csetup-args=-Dfont=disabled
run: python3 dev.py build --sdl3

# - name: Run tests
# env:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/build-ubuntu-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,17 @@ jobs:
- uses: actions/[email protected]

- 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
3 changes: 1 addition & 2 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 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
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.

Loading

0 comments on commit de88561

Please sign in to comment.