Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Use Github Actions + cibuildwheel for all wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau authored Oct 11, 2021
2 parents 8eed936 + db6386a commit 7fc8aec
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 265 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build wheels

on: [push, pull_request]

jobs:
build_wheels:
name: py${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# cibuildwheel builds linux wheels inside a manylinux container
# it also takes care of procuring the correct python version for us
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [36, 37, 38, 39, 310]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"
- name: Install cibuildwheel
run: |
python -m pip install "cibuildwheel==2.1.3"
- name: Build wheels
env:
CIBW_BUILD: "cp${{ matrix.python-version }}-*"
CIBW_SKIP: "*-manylinux_i686 *-win32"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_TEST: pip install pytest
CIBW_TEST_COMMAND: pytest {package}
run: |
python -m cibuildwheel --output-dir wheelhouse .
- uses: actions/upload-artifact@v2
with:
name: dist
path: ./wheelhouse/*.whl
build_sdist_python_wheel:
name: sdist and python wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"
- name: Run check-manifest
run: |
pip install check-manifest
check-manifest -v
- name: Build sdist and wheel
run: |
pip install --upgrade setuptools pip wheel
python setup.py sdist
- uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/*.tar.gz
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .travis/build-linux-wheels.sh

This file was deleted.

13 changes: 13 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
include ast27/Grammar/Grammar
include ast27/Parser/Python.asdl
recursive-include ast27 *.h
recursive-include ast27 *.py

include ast3/Grammar/Grammar
include ast3/Parser/Python.asdl
recursive-include ast3 *.h
recursive-include ast3 *.py

recursive-include ast3/tests *.py
include LICENSE

prune tools
exclude CONTRIBUTING.md
exclude release_process.md
exclude update_process.md
31 changes: 0 additions & 31 deletions appveyor.yml

This file was deleted.

37 changes: 0 additions & 37 deletions install_python.ps1

This file was deleted.

37 changes: 9 additions & 28 deletions release_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,12 @@
2. Make a git tag pointing to this commit with the version number as the name
of the tag.
3. Push the commit and the tag.
4. Wait for the Travis CI and Appveyor builds to complete.
5. Make sure there's nothing in your `typed_ast/dist` directory.
6. Run `python3 setup.py sdist` (this creates `dist/typed-ast-VERSION.tar.gz`).
7. Download the wheels from Travis-CI and Appveyor.
- Do this using `tools/download_typed_ast.py`. If you run into issues,
download them manually:
- Find the Appveyor build for the tag
[here](https://ci.appveyor.com/project/ddfisher/typed-ast-a4xqu/history) and
download the artifact produced by each job into the `dist` directory.
- Download [the latest manylinux
wheels](https://console.cloud.google.com/storage/browser/typed-ast) into the
`dist` directory. (You will have to sign in with your Google account to
access these wheels, but all Google accounts have access.)

8. On a Mac with Python 3.6, 3.7, 3.8 and 3.9 installed, run
`python3.6 setup.py bdist_wheel`, `python3.7 setup.py bdist_wheel`,
`python3.8 setup.py bdist_wheel` and `python3.9 setup.py bdist_wheel`
(this creates wheels in `dist`).
9. Confirm that the wheels for MacOS target `macosx_10_9` (and not say,
`macosx_10_15`). You may need `export MACOSX_DEPLOYMENT_TARGET=10.9` and
possibly to recompile Python with that environment variable set.
10. Compare the wheels produced to previous release of typed-ast to make sure
you have the full matrix.
11. If possible, verify the final `typed_ast` wheels work on Windows, MacOS,
and Linux platforms.
12. Upload the sdist and wheels to PyPI with `twine upload dist/*`.
13. Make a commit which bumps the bugfix version and adds back the `.dev0`
suffix.
4. Wait for the GitHub Actions build to complete.
5. Download all artifacts from the relevant GitHub Actions build.
6. Compare the wheels produced with the previous release of typed-ast to make sure
you have the full matrix.
7. If possible, verify the final `typed_ast` wheels work on Windows, macOS,
and Linux platforms.
8. Upload the sdist and wheels to PyPI with `twine upload dist/*`.
9. Make a commit which bumps the bugfix version and adds back the `.dev0`
suffix.
78 changes: 0 additions & 78 deletions tools/download_typed_ast.py

This file was deleted.

0 comments on commit 7fc8aec

Please sign in to comment.