Skip to content

Commit

Permalink
Add support for GitHub Actions
Browse files Browse the repository at this point in the history
Closes pypa#159
  • Loading branch information
mayeut committed Feb 20, 2020
1 parent 65792bd commit f07fa71
Show file tree
Hide file tree
Showing 6 changed files with 1,869 additions and 10 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on: [push, pull_request]

jobs:
test:
name: Test cibuildwheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
name: Install Python ${{ matrix.python_version }}
with:
python-version: "3.7"

- name: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
- name: Install Visual C++ for Python 2.7
if: startsWith(matrix.os, 'windows')
run: |
choco install vcpython27 -f -y
- name: Test cibuildwheel
run: |
python ./bin/run_tests.py
8 changes: 4 additions & 4 deletions cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ def main():
if args.platform != 'auto':
platform = args.platform
else:
ci = strtobool(os.environ.get('CI', 'false')) or 'BITRISE_BUILD_NUMBER' in os.environ or 'AZURE_HTTP_USER_AGENT' in os.environ
ci = strtobool(os.environ.get('CI', 'false')) or 'BITRISE_BUILD_NUMBER' in os.environ or 'AZURE_HTTP_USER_AGENT' in os.environ or 'GITHUB_WORKFLOW' in os.environ
if not ci:
print('cibuildwheel: Unable to detect platform. cibuildwheel should run on your CI server, '
'Travis CI, AppVeyor, Azure Pipelines and CircleCI are supported. You can run on your '
'development machine or other CI providers using the --platform argument. Check --help '
'output for more information.',
'Travis CI, AppVeyor, Azure Pipelines, GitHub Actions and CircleCI are supported. You '
'can run on your development machine or other CI providers using the --platform argument. '
'Check --help output for more information.',
file=sys.stderr)
exit(2)
if sys.platform.startswith('linux'):
Expand Down
Loading

0 comments on commit f07fa71

Please sign in to comment.