From a41d27d0d5de69548175188b3d465ee940bcadcf Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:15:15 +0300 Subject: [PATCH 1/7] Setup new build --- .github/workflows/ci.yml | 159 +++++++++++++++------------------------ 1 file changed, 61 insertions(+), 98 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b92a258785..6db8a13819b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,13 +153,13 @@ jobs: needs: pre-deploy steps: - name: Checkout - uses: actions/checkout@v2.3.5 - with: - submodules: true - - name: Setup Python 3.8 - uses: actions/setup-python@v2 + uses: actions/checkout@v2.3.4 + - name: Setup Python + uses: actions/setup-python@v2.2.2 + - name: Install cython + uses: py-actions/py-dependency-install@v2 with: - python-version: 3.8 + path: requirements/cython.txt - name: Cythonize run: | make cythonize @@ -172,113 +172,76 @@ jobs: name: dist path: dist - build-linux: - name: Linux + build-wheels: + name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }} + runs-on: ${{ matrix.os }}-latest + needs: pre-deploy strategy: matrix: - pyver: [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 }} - 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/checkout@v2.3.5 - with: - submodules: true + uses: actions/checkout@v2.3.4 - name: Set up QEMU - id: qemu + if: ${{ matrix.qemu }} uses: docker/setup-qemu-action@v1 - - 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.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 - steps: - - name: Checkout - uses: actions/checkout@v2.3.5 - with: - submodules: true - - name: Setup Python 3.8 - uses: actions/setup-python@v2 + 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/setup-python@v2.2.2 + - name: Install cython + uses: py-actions/py-dependency-install@v2 with: - python-version: ${{ matrix.pyver }} - architecture: ${{ matrix.arch }} + 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/cibuildwheel@v2.2.2 + 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/checkout@v2.3.4 + - name: Login + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token + - name: Make Release + uses: aio-libs/create-release@v1.2.2 + 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+) `" + fix_issue_repl: "(#\\1)" From 12fc03ee8375462b10ba60aec6783f4aee54e34c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:18:46 +0300 Subject: [PATCH 2/7] Add CHANGES --- CHANGES/6139.1.feature | 1 + CHANGES/6139.2.feature | 1 + 2 files changed, 2 insertions(+) create mode 100644 CHANGES/6139.1.feature create mode 100644 CHANGES/6139.2.feature diff --git a/CHANGES/6139.1.feature b/CHANGES/6139.1.feature new file mode 100644 index 00000000000..6652d85ceae --- /dev/null +++ b/CHANGES/6139.1.feature @@ -0,0 +1 @@ +Started shipping platform-specific arm64 wheels for Apple Silicon. diff --git a/CHANGES/6139.2.feature b/CHANGES/6139.2.feature new file mode 100644 index 00000000000..f29e90790b0 --- /dev/null +++ b/CHANGES/6139.2.feature @@ -0,0 +1 @@ +Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. From 0cee04839313c96ae0e1ed920f13e7fd9c935dea Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:26:05 +0300 Subject: [PATCH 3/7] Fix version --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6db8a13819b..3cd29d09f4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: needs: pre-deploy steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Setup Python uses: actions/setup-python@v2.2.2 - name: Install cython @@ -190,7 +190,7 @@ jobs: qemu: s390x steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Set up QEMU if: ${{ matrix.qemu }} uses: docker/setup-qemu-action@v1 @@ -230,7 +230,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Login run: | echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token From d77f6a7685036ab0bb0ae86b8503e672659a04e7 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:28:20 +0300 Subject: [PATCH 4/7] Update CHANGES/6139.1.feature Co-authored-by: Sviatoslav Sydorenko --- CHANGES/6139.1.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES/6139.1.feature b/CHANGES/6139.1.feature index 6652d85ceae..0dfa6b110e0 100644 --- a/CHANGES/6139.1.feature +++ b/CHANGES/6139.1.feature @@ -1 +1 @@ -Started shipping platform-specific arm64 wheels for Apple Silicon. +Started shipping platform-specific arm64 wheels for Apple Silicon — :user:`asvetlov`. From d307bada56b9bc3ec7955ea4460725e9715ef987 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:28:27 +0300 Subject: [PATCH 5/7] Update CHANGES/6139.2.feature Co-authored-by: Sviatoslav Sydorenko --- CHANGES/6139.2.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES/6139.2.feature b/CHANGES/6139.2.feature index f29e90790b0..eb9630701df 100644 --- a/CHANGES/6139.2.feature +++ b/CHANGES/6139.2.feature @@ -1 +1 @@ -Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. +Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes — :user:`asvetlov`. From bf4a713fe897e730260961207fca3458ae3e0194 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 15:47:12 +0300 Subject: [PATCH 6/7] Rename --- CHANGES/{6139.1.feature => 6139.feature.1} | 0 CHANGES/{6139.2.feature => 6139.feature.2} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename CHANGES/{6139.1.feature => 6139.feature.1} (100%) rename CHANGES/{6139.2.feature => 6139.feature.2} (100%) diff --git a/CHANGES/6139.1.feature b/CHANGES/6139.feature.1 similarity index 100% rename from CHANGES/6139.1.feature rename to CHANGES/6139.feature.1 diff --git a/CHANGES/6139.2.feature b/CHANGES/6139.feature.2 similarity index 100% rename from CHANGES/6139.2.feature rename to CHANGES/6139.feature.2 From 16af33aa1537aab0d4827af51c7ba25b714c1ea6 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 27 Oct 2021 17:45:33 +0300 Subject: [PATCH 7/7] Update whitelist --- docs/spelling_wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 8a39c37e4da..2e5a8d1d84c 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -286,6 +286,7 @@ resolvers reusage reuseconn runtime +runtimes sa schemas sendfile