-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2605 from pygame/gh-actions-update
Github Actions parallel builds, python 3.10 CI, pip wheel caching and other minor fixes
- Loading branch information
Showing
6 changed files
with
143 additions
and
213 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Build | ||
|
||
# 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/manylinux.yml' | ||
- '.github/workflows/sdl1-sdist.yml' | ||
|
||
pull_request: | ||
branches: main | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'examples/**' | ||
- '.gitignore' | ||
- 'README.rst' | ||
- '.github/workflows/manylinux.yml' | ||
- '.github/workflows/sdl1-sdist.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # if a particular matrix build fails, don't skip the rest | ||
matrix: | ||
os: [windows-latest, macos-10.15] | ||
|
||
# seperate into matrix for concurrency. | ||
pyver: ['cp27', 'cp35', 'cp36', 'cp37', 'cp38', 'cp39', 'cp310', 'pp27', 'pp36', 'pp37'] | ||
|
||
# exclude py2 builds on windows, because they don't work due to the | ||
# fact that py2 builds use old compiler. There is a workaround for this | ||
# but is not implemented here because Appveyor can already handle py2 | ||
# on windows | ||
exclude: | ||
- os: windows-latest | ||
pyver: 'cp27' | ||
- os: windows-latest | ||
pyver: 'pp27' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# use cibuildwheel v1 to build on older python versions | ||
- name: Build wheels with CIBuildWheel v1 | ||
if: matrix.pyver == 'cp27' || matrix.pyver == 'cp35' || matrix.pyver == 'pp27' || matrix.pyver == 'pp36' | ||
uses: pypa/cibuildwheel@v1.12.0 | ||
env: | ||
SDL_VIDEODRIVER: "dummy" | ||
SDL_AUDIODRIVER: "disk" | ||
|
||
CIBW_BUILD: ${{ matrix.pyver }}-* | ||
|
||
# Install some dependencies | ||
CIBW_BEFORE_BUILD_MACOS: pip install requests numpy && brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf zlib freetype portmidi | ||
CIBW_BEFORE_BUILD_WINDOWS: pip install requests numpy | ||
|
||
CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,timing --time_out 300 | ||
|
||
# Increase pip debugging output | ||
CIBW_BUILD_VERBOSITY: 2 | ||
|
||
# use latest cibuildwheel for newer python versions | ||
- name: Build wheels with CIBuildWheel v2 | ||
if: matrix.pyver != 'cp27' && matrix.pyver != 'cp35' && matrix.pyver != 'pp27' && matrix.pyver != 'pp36' | ||
uses: pypa/cibuildwheel@v2.1.2 | ||
env: | ||
SDL_VIDEODRIVER: "dummy" | ||
SDL_AUDIODRIVER: "disk" | ||
|
||
CIBW_BUILD: ${{ matrix.pyver }}-* | ||
|
||
# Build universal2 wheels too on an Intel runner. | ||
# Note that the `arm64` part of the `universal2` wheel cannot be | ||
# tested in this configuration. | ||
# uncomment when arm builds are working | ||
# CIBW_ARCHS_MACOS: "x86_64 universal2" | ||
|
||
# Install some dependencies | ||
CIBW_BEFORE_BUILD_MACOS: pip install requests numpy && brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf zlib freetype portmidi | ||
CIBW_BEFORE_BUILD_WINDOWS: pip install requests numpy | ||
|
||
CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,timing --time_out 300 | ||
|
||
# Increase pip debugging output | ||
CIBW_BUILD_VERBOSITY: 2 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pygame-wheels | ||
path: ./wheelhouse/*.whl | ||
|
||
# - name: Upload binaries to Github Releases | ||
# if: github.event_name == 'release' | ||
# uses: svenstaro/upload-release-action@v2 | ||
# with: | ||
# repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
# file: ./wheelhouse/*.whl | ||
# tag: ${{ github.ref }} | ||
# | ||
# - name: Upload binaries to PyPI | ||
# if: github.event_name == 'release' | ||
# env: | ||
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
# run: | | ||
# python3 -m pip install twine | ||
# twine upload ./wheelhouse/*.whl |
This file was deleted.
Oops, something went wrong.
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 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
Oops, something went wrong.