Skip to content

Commit

Permalink
GH actions: parallel builds, python 3.10, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankith committed Aug 15, 2021
1 parent a86ef45 commit c564fe5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
matrix:
# TODO: when Github actions supports M1 Mac, add `macos-11.0` to this
os: [macos-10.15]
pyversion: ['pypy-3.7', 'pypy-2.7', '2.7', '3.5', '3.6', '3.7', '3.8', '3.9']
pyversion: ['pypy-3.7', 'pypy-2.7', '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.1']

steps:
- uses: actions/checkout@v2.3.4
Expand All @@ -44,6 +44,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyversion }}

- name: Get pip cache
uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-${{ matrix.pyversion }}-pip-cache

- name: Install deps
run: |
Expand All @@ -67,6 +73,7 @@ jobs:
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: pygame-mac-wheels
path: dist/*.whl

# - name: Upload binaries to Github Releases
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,22 @@ on:
- '.github/workflows/windows.yml'
- '.github/workflows/sdl1-sdist.yml'

# TODO: Parallelize this build
jobs:
build-manylinux:
runs-on: ubuntu-18.04
strategy:
fail-fast: false # if a particular matrix build fails, don't skip the rest
matrix:
arch: ['x64', 'x86']
tag: ['-', '-manylinux-'] # one tag for CPython builds, and another for PyPy

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

- name: Build manylinux wheels
run: |
cd buildconfig/manylinux-build
make pull pull-manylinux wheels wheels-manylinux
make pull${{ matrix.tag }}${{ matrix.arch }} wheels${{ matrix.tag }}${{ matrix.arch }}
cd ../..
mkdir -p dist/
cp buildconfig/manylinux-build/wheelhouse/*.whl dist/
Expand All @@ -47,6 +51,7 @@ jobs:
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: pygame-manylinux-wheels
path: dist/*.whl

# - name: Upload binaries to Github Releases
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/sdl1-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:

- name: Install deps
run: |
sudo apt-get update --fix-missing
sudo apt-get upgrade
sudo apt-get install python3-dev python3-setuptools python3-numpy python3-opengl libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libtiff5-dev libx11-6 libx11-dev fluid-soundfont-gm timgm6mb-soundfont xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf libfreetype6-dev
python3 -m pip install -U pip
python3 -m pip install -U wheel requests
Expand Down Expand Up @@ -78,6 +80,7 @@ jobs:
- name: Upload sdist
uses: actions/upload-artifact@v2
with:
name: pygame-sdist
path: dist/*.tar.gz

# - name: Upload binaries to Github Releases
Expand All @@ -95,4 +98,4 @@ jobs:
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# python3 -m pip install twine
# twine upload dist/*.tar.gz
# twine upload dist/*.tar.gz
28 changes: 10 additions & 18 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
# PyPy 7.3.4 and above does not have 32-bit builds, only 64-bit ones (python 3.7)
# So we build with 7.3.3 for 32-bit builds, and 7.3.4+ for 64-bit builds
matrix:
# pyversion: ['3.5', '3.6', '3.7', '3.8', '3.9', 'pypy-2.7-v7.3.3', 'pypy-3.6-v7.3.3', 'pypy-3.7-v7.3.3', 'pypy-3.7']
# disable all but one to save resources, since they are covered by appveyor windows builds.
pyversion: ['3.5']
pyversion: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.1', 'pypy-2.7-v7.3.3', 'pypy-3.6-v7.3.3', 'pypy-3.7-v7.3.3', 'pypy-3.7']
arch: ['x64', 'x86']

exclude:
Expand All @@ -54,29 +52,22 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4

# python 2.7 needs special treatment because it needs an old compiler to work
# https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
# https://web.archive.org/web/20210106040224/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
# - name: Setup MSBuild with MSVC v9.0
# if: matrix.pyversion == '2.7'
# run: |
# Invoke-WebRequest https://github.com/GeoNode/geonode-win-installer/raw/ffb76c7cbf1d6b4970c6c25f79c3c7682a3aa035/VCForPython27.msi -OutFile C:\VCForPython27.msi
# msiexec.exe /i "C:\VCForPython27.msi" /qn ALLUSERS=1

# - name: Setup MSBuild with MSVC latest version
# if: matrix.pyversion != '2.7'
# uses: microsoft/setup-msbuild@v1.0.2

- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyversion }}
architecture: ${{ matrix.arch }}

- name: Get pip cache
uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.pyversion }}-${{ matrix.arch }}-pip-cache

- name: Install deps
run: |
python -m pip install -U pip
python -m pip install -U wheel requests numpy
python -m pip install -U pip wheel
python -m pip install -U requests numpy
- name: Build the wheel and install it
run: |
Expand All @@ -93,6 +84,7 @@ jobs:
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: pygame-windows-wheels
path: dist/*.whl

# - name: Upload binaries to Github Releases
Expand Down

0 comments on commit c564fe5

Please sign in to comment.