Skip to content

Commit

Permalink
Cleanup of the debug python action
Browse files Browse the repository at this point in the history
  • Loading branch information
oddbookworm committed Feb 23, 2025
1 parent 34acd6f commit b9cb297
Showing 1 changed file with 19 additions and 38 deletions.
57 changes: 19 additions & 38 deletions .github/workflows/build-ubuntu-debug-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# IMPORTANT: binaries are not to be uploaded from this workflow!

name: Ubuntu debug python
defaults:
run:
shell: bash -leo pipefail {0}

# Run CI only when a release is created, on changes to main branch, or any PR
# to main. Do not run CI on any other branch. Also, skip any non-source changes
Expand Down Expand Up @@ -45,7 +48,11 @@ jobs:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
os: [ ubuntu-24.04 ]
python: [ 3.11.11, 3.12.8 ]
# check our min python (minor) version and our max python (minor) version
python: [
3.9.21,
3.13.1
]

env:
# Pip now forces us to either make a venv or set this flag, so we will do
Expand All @@ -57,61 +64,35 @@ jobs:
steps:
- uses: actions/checkout@v4.2.2

- name: Install deps
- name: Install pygame-ce deps
# https://github.com/actions/runner-images/issues/7192
# https://github.com/orgs/community/discussions/47863
# echo -e 'export PYENV_ROOT="$HOME/.pyenv"\nexport PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
# echo -e 'eval "$(pyenv init --path)"\neval "$(pyenv init -)"' >> ~/.bashrc
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 -y
- name: Install pyenv
run: |
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
curl https://pyenv.run | bash
echo -e 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo -e 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'eval "$(pyenv init --path)"' >> ~/.bashrc
echo -e 'eval "$(pyenv init -)"' >> ~/.bashrc
echo -e 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo -e 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo -e 'eval "$(pyenv init -)"' >> ~/.bash_profile
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev -y
- name: Build
- name: Build debug python and pygame-ce
id: build
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
pyenv install ${{ matrix.python }} --debug --keep
pyenv install ${{ matrix.python }} --debug
pyenv global ${{ matrix.python }}-debug
echo $(python -VV)
python dev.py build --lax
- name: Run tests
env:
SDL_VIDEODRIVER: "dummy"
SDL_AUDIODRIVER: "disk"
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
pyenv global ${{ matrix.python }}-debug
python -m pygame.tests -v --exclude opengl,music,timing --time_out 300
# - name: Generate coverage
# id: gen-coverage
# # want to continue regardless of whether a test failed or not as long as the job wasn't cancelled
# if: ${{ steps.build.conclusion == 'success' && !cancelled() }}
# run: |
# lcov --capture --directory . --output-file ./coverage.info
# genhtml ./coverage.info --output-directory ./out

# # We upload the generated files under github actions assets
# - name: Upload coverage html
# # want to continue only if the coverage generation was successful
# if: ${{ steps.gen-coverage.conclusion == 'success' && !cancelled() }}
# uses: actions/upload-artifact@v4
# with:
# name: pygame-wheels-coverage
# path: ./out

0 comments on commit b9cb297

Please sign in to comment.