Merge pull request #2497 from pygame-community/release/2.4.0.dev2 #2129
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 workflow tests sdist builds and also doubles as a way to test that | |
# pygame compiles on all ubuntu LTS versions | |
# the main difference between this and the manylinux builds is that this runs | |
# directly under ubuntu and uses apt installed dependencies, while the | |
# manylinux workflow runs with centos docker and self-compiled dependencies | |
# IMPORTANT: binaries are not to be uploaded from this workflow! | |
name: Ubuntu sdist | |
# 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 | |
# from running on CI | |
on: | |
push: | |
branches: main | |
paths-ignore: | |
- 'docs/**' | |
- 'examples/**' | |
- '.gitignore' | |
- '*.rst' | |
- '*.md' | |
- '.github/workflows/*.yml' | |
# re-include current file to not be excluded | |
- '!.github/workflows/build-ubuntu-sdist.yml' | |
pull_request: | |
branches: main | |
paths-ignore: | |
- 'docs/**' | |
- 'examples/**' | |
- '.gitignore' | |
- '*.rst' | |
- '*.md' | |
- '.github/workflows/*.yml' | |
# re-include current file to not be excluded | |
- '!.github/workflows/build-ubuntu-sdist.yml' | |
# the github release drafter can call this workflow | |
workflow_call: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-ubuntu-sdist | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # if a particular matrix build fails, don't skip the rest | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
steps: | |
- uses: actions/[email protected] | |
- name: Install deps | |
# install numpy from pip and not apt because the one from pip is newer, | |
# and has typestubs | |
run: | | |
sudo apt-get update --fix-missing | |
sudo apt-get upgrade | |
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg-dev python3-setuptools python3-dev | |
pip3 install sphinx"<7.2.0" numpy>=1.21.0 | |
- name: Make sdist and install it | |
env: | |
PIP_CONFIG_FILE: "buildconfig/pip_config.ini" | |
run: | | |
python3 setup.py docs | |
python3 setup.py sdist | |
pip3 install dist/pygame-*.tar.gz -vv | |
- name: Run tests | |
env: | |
SDL_VIDEODRIVER: "dummy" | |
SDL_AUDIODRIVER: "disk" | |
run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300 | |
- name: Test typestubs | |
if: matrix.os == 'ubuntu-22.04' # run stubtest only once | |
run: | | |
pip3 install mypy | |
python3 setup.py stubcheck | |
# We upload the generated files under github actions assets | |
- name: Upload sdist | |
if: matrix.os == 'ubuntu-20.04' # upload sdist only once | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pygame-wheels-sdist | |
path: dist/*.tar.gz | |