Skip to content

Commit

Permalink
Merge pull request #2821 from pygame/ankith26-sdl2-sdist
Browse files Browse the repository at this point in the history
Ubuntu 18/20 SDL2 sdist CI, mac CI pp36 drop
  • Loading branch information
illume committed Nov 6, 2021
2 parents 2dd50e1 + 50c4f87 commit a9e637f
Show file tree
Hide file tree
Showing 10 changed files with 4,118 additions and 3,197 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/build.yml
Expand Up @@ -14,6 +14,7 @@ on:
- '.gitignore'
- 'README.rst'
- '.github/workflows/manylinux.yml'
- '.github/workflows/ubuntu-sdist.yml'

pull_request:
branches: main
Expand All @@ -23,6 +24,7 @@ on:
- '.gitignore'
- 'README.rst'
- '.github/workflows/manylinux.yml'
- '.github/workflows/ubuntu-sdist.yml'

jobs:
deps:
Expand Down Expand Up @@ -77,32 +79,35 @@ jobs:
# builds on macOS
include:
- {
name: "MacOS x86_64 (cp36-pp36)",
cibuildver: 1,
name: "MacOS x86_64 (cp36-cp37)",
os: macos-10.15,
macarch: x86_64,
pyversions: cp36-* pp36-*
pyversions: cp36-* cp37-*
}

- {
name: "MacOS x86_64 (cp37-pp37)",
cibuildver: 2,
name: "MacOS x86_64 (cp37-cp38)",
os: macos-10.15,
macarch: x86_64,
pyversions: cp37-* pp37-*
pyversions: cp37-* cp38-*
}

- {
name: "MacOS x86_64 (cp38-cp39-cp310)",
cibuildver: 2,
name: "MacOS x86_64 (cp39-cp310)",
os: macos-10.15,
macarch: x86_64,
pyversions: cp38-* cp39-* cp310-*
pyversions: cp39-* cp310-*
}

- {
name: "MacOS x86_64 (pp37)",
os: macos-10.15,
macarch: x86_64,
pyversions: pp37-*
}

- {
name: "MacOS arm64 (cp38-cp39-cp310)",
cibuildver: 2,
os: macos-11,
macarch: arm64,
pyversions: cp38-* cp39-* cp310-*
Expand Down Expand Up @@ -155,15 +160,8 @@ jobs:
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}

# use cibuildwheel v1 to build on older python versions
- name: Build wheels with CIBuildWheel v1
if: matrix.cibuildver == 1
uses: pypa/cibuildwheel@v1.12.0

# use latest cibuildwheel for newer python versions
- name: Build wheels with CIBuildWheel v2
if: matrix.cibuildver == 2
uses: pypa/cibuildwheel@v2.1.3
- name: Build and test wheels
uses: pypa/cibuildwheel@v2.2.2
env:
# Build arm64 and x86_64 wheels too on an Intel runner.
# Note that the arm64 wheels cannot be tested on CI in this configuration
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/manylinux.yml
Expand Up @@ -14,6 +14,7 @@ on:
- '.gitignore'
- 'README.rst'
- '.github/workflows/build.yml'
- '.github/workflows/ubuntu-sdist.yml'

pull_request:
branches: main
Expand All @@ -23,6 +24,7 @@ on:
- '.gitignore'
- 'README.rst'
- '.github/workflows/build.yml'
- '.github/workflows/ubuntu-sdist.yml'

jobs:
build-manylinux:
Expand All @@ -31,14 +33,14 @@ jobs:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
arch: ['x64', 'x86', 'aarch64']
tag: ['-manylinux1-', '-manylinux2010-', -manylinux2014-]
tag: ['manylinux1', 'manylinux2010', 'manylinux2014']

exclude:
# aarch64 only with manylinux2014 for now
- arch: 'aarch64'
tag: '-manylinux1-'
tag: 'manylinux1'
- arch: 'aarch64'
tag: '-manylinux2010-'
tag: 'manylinux2010'

steps:
- uses: actions/checkout@v2.3.4
Expand All @@ -52,7 +54,7 @@ jobs:
- name: Build manylinux wheels
run: |
cd buildconfig/manylinux-build
make pull${{ matrix.tag }}${{ matrix.arch }} wheels${{ matrix.tag }}${{ matrix.arch }}
make pull-${{ matrix.tag }}-${{ matrix.arch }} wheels-${{ matrix.tag }}-${{ matrix.arch }}
cd ../..
mkdir -p dist/
cp buildconfig/manylinux-build/wheelhouse/*.whl dist/
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/ubuntu-sdist.yml
@@ -0,0 +1,80 @@
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:
release:
types: [created]
push:
branches: main
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.gitignore'
- 'README.rst'
- '.github/workflows/build.yml'
- '.github/workflows/manylinux.yml'

pull_request:
branches: main
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.gitignore'
- 'README.rst'
- '.github/workflows/build.yml'
- '.github/workflows/manylinux.yml'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
os: [ubuntu-18.04, ubuntu-20.04]

steps:
- uses: actions/checkout@v2.3.4

- name: Install deps
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 libjpeg8-dev python3-setuptools python3-dev python3-numpy
- name: Make sdist and install it
run: |
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,timing --time_out 300

# We upload the generated files under github actions assets
- name: Upload sdist
if: matrix.os == 'ubuntu-18.04' # upload sdist only once
uses: actions/upload-artifact@v2
with:
name: pygame-sdist
path: dist/*.tar.gz

# - name: Upload binaries to Github Releases
# if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' # upload sdist only once
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: dist/*.tar.gz
# tag: ${{ github.ref }}
#
# - name: Upload binaries to PyPI
# if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' # upload sdist only once
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# python3 -m pip install twine
# twine upload dist/*.tar.gz

0 comments on commit a9e637f

Please sign in to comment.