-
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 branch 'main' into filenotfound
- Loading branch information
Showing
170 changed files
with
6,330 additions
and
2,031 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,158 @@ | ||
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: | ||
deps: | ||
runs-on: macos-10.15 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Test for Mac Deps cache hit | ||
id: macdep-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ github.workspace }}/pygame_mac_deps | ||
# The hash of all files in buildconfig manylinux-build and macdependencies is | ||
# the key to the cache. If anything changes here, the deps are built again | ||
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }} | ||
|
||
# build mac deps on cache miss | ||
- name: Build Mac Deps | ||
if: steps.macdep-cache.outputs.cache-hit != 'true' | ||
run: | | ||
brew install coreutils | ||
cd buildconfig/macdependencies | ||
bash ./build_mac_deps.sh | ||
# Uncomment when you want to manually verify the deps by downloading them | ||
# - name: Upload Mac deps | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: pygame-mac-deps | ||
# path: ${{ github.workspace }}/pygame_mac_deps | ||
|
||
build: | ||
name: ${{ matrix.name }} | ||
needs: deps | ||
runs-on: macos-10.15 # ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # if a particular matrix build fails, don't skip the rest | ||
matrix: | ||
# windows is covered by appveyor for now | ||
# os: [windows-latest, macos-10.15] | ||
|
||
# Split job into 5 matrix builds, because GH actions provides 5 concurrent | ||
# builds on macOS | ||
include: | ||
- { name: "MacOS (cp27 & pp27)", cibuildver: 1, pyversions: cp27-* pp27-* } | ||
- { name: "MacOS (cp35 & pp36)", cibuildver: 1, pyversions: cp35-* pp36-* } | ||
- { name: "MacOS (cp36 & cp37)", cibuildver: 2, pyversions: cp36-* cp37-* } | ||
- { name: "MacOS (cp38 & cp39)", cibuildver: 2, pyversions: cp38-* cp39-* } | ||
- { name: "MacOS (cp310 & pp37)", cibuildver: 2, pyversions: cp310-* pp37-* } | ||
|
||
# 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' | ||
|
||
env: | ||
SDL_VIDEODRIVER: "dummy" | ||
SDL_AUDIODRIVER: "disk" | ||
|
||
CIBW_BUILD: ${{ matrix.pyversions }} | ||
|
||
CIBW_BEFORE_ALL_MACOS: cd buildconfig/macdependencies && bash ./install_mac_deps.sh | ||
|
||
CIBW_BEFORE_BUILD: 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 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/Library/Caches/pip # This cache path is only right on mac | ||
key: pip-cache-${{ matrix.name }} | ||
|
||
- name: Fetch Mac deps | ||
id: macdep-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ github.workspace }}/pygame_mac_deps | ||
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }} | ||
|
||
# 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 | ||
|
||
# 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 | ||
# env: | ||
# CIBW_ARCHS_MACOS: "x86_64 universal2" | ||
|
||
- 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.