Skip to content

Commit d83daa3

Browse files
henryiiijoerick
andauthored
docs: use GitHub example in readme (#479)
* docs: use GitHub example in readme * Apply suggestions from code review Co-authored-by: Joe Rickerby <[email protected]> * Copy/style tweaks Co-authored-by: Joe Rickerby <[email protected]>
1 parent 4f4dae2 commit d83daa3

File tree

2 files changed

+38
-50
lines changed

2 files changed

+38
-50
lines changed

README.md

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cibuildwheel
99

1010
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
1111

12-
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports Azure Pipelines, Travis CI, AppVeyor, GitHub Actions and CircleCI - and it builds and tests your wheels across all of your platforms.
12+
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, and CircleCI - and it builds and tests your wheels across all of your platforms.
1313

1414

1515
What does it do?
@@ -58,49 +58,41 @@ Usage
5858
Example setup
5959
-------------
6060

61-
To build manylinux, macOS, and Windows wheels on Travis CI and upload them to PyPI whenever you tag a version, you could use this `.travis.yml`:
61+
To build manylinux, macOS, and Windows wheels on Github Actions, you could use this `.github/workflows/wheels.yml`:
6262

6363
```yaml
64-
language: python
64+
name: Build
65+
66+
on: [push, pull_request]
6567

6668
jobs:
67-
include:
68-
# perform a linux build
69-
- services: docker
70-
# and a mac build
71-
- os: osx
72-
language: shell
73-
# and a windows build
74-
- os: windows
75-
language: shell
76-
before_install:
77-
- choco install python --version 3.8.0
78-
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
79-
# make sure it's on PATH as 'python3'
80-
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
81-
82-
env:
83-
global:
84-
- TWINE_USERNAME=__token__
85-
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
86-
87-
install:
88-
- python3 -m pip install cibuildwheel==1.7.1
89-
90-
script:
91-
# build the wheels, put them into './wheelhouse'
92-
- python3 -m cibuildwheel --output-dir wheelhouse
93-
94-
after_success:
95-
# if the release was tagged, upload them to PyPI
96-
- |
97-
if [[ $TRAVIS_TAG ]]; then
98-
python3 -m pip install twine
99-
python3 -m twine upload wheelhouse/*.whl
100-
fi
69+
build_wheels:
70+
name: Build wheels on ${{ matrix.os }}
71+
runs-on: ${{ matrix.os }}
72+
strategy:
73+
matrix:
74+
os: [ubuntu-20.04, windows-2019, macOS-10.15]
75+
76+
steps:
77+
- uses: actions/checkout@v2
78+
79+
- uses: actions/setup-python@v2
80+
name: Install Python
81+
82+
- name: Install cibuildwheel
83+
run: python -m pip install cibuildwheel==1.7.1
84+
85+
- name: Build wheels
86+
run: python -m cibuildwheel --output-dir wheelhouse
87+
env:
88+
CIBW_SKIP: "cp27-* pp27-*" # skip Python 2.7 wheels
89+
90+
- uses: actions/upload-artifact@v2
91+
with:
92+
path: ./wheelhouse/*.whl
10193
```
10294
103-
For more information, including how to build on GitHub Actions, Appveyor, Azure Pipelines, or CircleCI, check out the [documentation](https://cibuildwheel.readthedocs.org) and the [examples](https://github.com/joerick/cibuildwheel/tree/master/examples).
95+
For more information, including building on Python 2, PyPI deployment, and the use of other CI services like Travis CI, Appveyor, Azure Pipelines, or CircleCI, check out the [documentation](https://cibuildwheel.readthedocs.org) and the [examples](https://github.com/joerick/cibuildwheel/tree/master/examples).
10496
10597
Options
10698
-------

examples/travis-ci-deploy.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,18 @@ jobs:
1919
# make sure it's on PATH as 'python3'
2020
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
2121

22-
env:
23-
global:
24-
- TWINE_USERNAME=__token__
25-
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
26-
2722
install:
2823
- python3 -m pip install cibuildwheel==1.7.1
2924

3025
script:
3126
# build the wheels, put them into './wheelhouse'
3227
- python3 -m cibuildwheel --output-dir wheelhouse
3328

34-
after_success:
35-
# if the release was tagged, upload them to PyPI
36-
- |
37-
if [[ $TRAVIS_TAG ]]; then
38-
python3 -m pip install twine
39-
python3 -m twine upload wheelhouse/*.whl
40-
fi
29+
deploy:
30+
provider: pypi
31+
username: "__token__"
32+
skip_cleanup: true
33+
on:
34+
tags: true
35+
password:
36+
secure: "" # Set to an encrypted API token. See https://docs.travis-ci.com/user/deployment/pypi/

0 commit comments

Comments
 (0)