-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup binary builds for Alpine and MacOS arm (#6139)
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
- Loading branch information
Showing
4 changed files
with
64 additions
and
98 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 |
---|---|---|
|
@@ -151,12 +151,12 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
- name: Install cython | ||
uses: py-actions/py-dependency-install@v2 | ||
with: | ||
submodules: true | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
path: requirements/cython.txt | ||
- name: Cythonize | ||
run: | | ||
make cythonize | ||
|
@@ -169,113 +169,76 @@ jobs: | |
name: dist | ||
path: dist | ||
|
||
build-linux: | ||
name: Linux | ||
strategy: | ||
matrix: | ||
pyver: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310] | ||
arch: [x86_64, aarch64, i686, ppc64le, s390x] | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
env: | ||
py: /opt/python/${{ matrix.pyver }}/bin/python | ||
img: quay.io/pypa/manylinux2014_${{ matrix.arch }} | ||
build-wheels: | ||
name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }} | ||
runs-on: ${{ matrix.os }}-latest | ||
needs: pre-deploy | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/[email protected] | ||
- name: Available platforms | ||
run: echo ${{ steps.qemu.outputs.platforms }} | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Cythonize | ||
if: ${{ matrix.no-extensions == '' }} | ||
run: | | ||
make cythonize | ||
- name: Install tools | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | ||
${{ env.img }} ${{ env.py }} -m pip install -U setuptools wheel | ||
- name: Make wheel | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | ||
${{ env.img }} ${{ env.py }} setup.py bdist_wheel | ||
- name: Repair wheel wheel | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | ||
${{ env.img }} auditwheel repair dist/*.whl --wheel-dir wheelhouse/ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: wheelhouse/* | ||
|
||
build-binary: | ||
name: Binary wheels | ||
strategy: | ||
matrix: | ||
pyver: [3.6, 3.7, 3.8, 3.9, '3.10'] | ||
os: [macos, windows] | ||
arch: [x86, x64] | ||
exclude: | ||
- os: macos | ||
arch: x86 | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }}-latest | ||
needs: pre-deploy | ||
os: [ubuntu, windows, macos] | ||
qemu: [''] | ||
include: | ||
# Split ubuntu job for the sake of speed-up | ||
- os: ubuntu | ||
qemu: aarch64 | ||
- os: ubuntu | ||
qemu: ppc64le | ||
- os: ubuntu | ||
qemu: s390x | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Set up QEMU | ||
if: ${{ matrix.qemu }} | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
submodules: true | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
architecture: ${{ matrix.arch }} | ||
platforms: all | ||
id: qemu | ||
- name: Prepare emulation | ||
run: | | ||
if [[ -n "${{ matrix.qemu }}" ]]; then | ||
# Build emulated architectures only if QEMU is set, | ||
# use default "auto" otherwise | ||
echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
- name: Install cython | ||
uses: py-actions/py-dependency-install@v2 | ||
with: | ||
path: requirements/cython.txt | ||
- name: Cythonize | ||
if: ${{ matrix.no-extensions == '' }} | ||
run: | | ||
make cythonize | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U setuptools wheel | ||
- name: Make wheel | ||
run: | ||
python setup.py bdist_wheel | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_MACOS: x86_64 arm64 universal2 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
path: ./wheelhouse/*.whl | ||
|
||
deploy: | ||
name: Deploy | ||
needs: [build-linux, build-binary, build-tarball] | ||
environment: release | ||
needs: [build-tarball, build-wheels] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install twine | ||
run: | | ||
python -m pip install twine | ||
- name: Download dists | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: PyPI upload | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
twine upload dist/* | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Login | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
- name: Make Release | ||
uses: aio-libs/[email protected] | ||
with: | ||
changes_file: CHANGES.rst | ||
name: aiohttp | ||
version_file: aiohttp/__init__.py | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pypi_token: ${{ secrets.PYPI_API_TOKEN }} | ||
artifact: dist | ||
fix_issue_regex: "`#(\\d+) <https://github.com/aio-libs/aiohttp/issues/\\1>`" | ||
fix_issue_repl: "(#\\1)" |
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 @@ | ||
Started shipping platform-specific arm64 wheels for Apple Silicon — :user:`asvetlov`. |
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 @@ | ||
Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes — :user:`asvetlov`. |
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 |
---|---|---|
|
@@ -283,6 +283,7 @@ resolvers | |
reusage | ||
reuseconn | ||
runtime | ||
runtimes | ||
sa | ||
schemas | ||
sendfile | ||
|