Skip to content

chore(deps): bump docker/build-push-action from 5.1.0 to 5.2.0 #358

chore(deps): bump docker/build-push-action from 5.1.0 to 5.2.0

chore(deps): bump docker/build-push-action from 5.1.0 to 5.2.0 #358

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- "*.*.*.*"
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: pre-commit/action@v3.0.1
build_wheels:
name: Build ${{ matrix.arch }} wheels
needs: [lint]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- arch: "x86_64"
docker_arch: "amd64"
test_image: quay.io/pypa/manylinux1_x86_64
- arch: "i686"
docker_arch: "i386"
test_image: quay.io/pypa/manylinux1_i686
- arch: "aarch64"
docker_arch: "arm64v8"
test_image: quay.io/pypa/manylinux2014_aarch64
- arch: "ppc64le"
docker_arch: "ppc64le"
test_image: quay.io/pypa/manylinux2014_ppc64le
- arch: "s390x"
docker_arch: "s390x"
test_image: quay.io/pypa/manylinux2014_s390x
- arch: "armv7l"
docker_arch: "arm32v7"
test_image: arm32v7/python:3.6-slim-jessie
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for setuptools_scm to find tags
submodules: 'recursive'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
if: matrix.arch != 'x86_64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
- name: Build patchelf_build_${{ matrix.arch }} image
uses: docker/build-push-action@v5.2.0
with:
context: .
load: true
push: false
tags: patchelf_build_${{ matrix.arch == 'armv7l' && 'aarch64' || matrix.arch }}:latest
build-args: |
ARCH=${{ matrix.docker_arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: "${{ matrix.arch == 'armv7l' && 'aarch64' || matrix.arch }}"
- name: Test wheel on ${{ matrix.test_image }}
run: |
cat <<EOF > check.sh
set -e
set -x
if ! which pipx; then
python3 -m pip install pipx
export PATH=/root/.local/bin:\$PATH
pipx install auditwheel
fi
WHEEL=$(find ./wheelhouse -name 'patchelf-*.whl')
auditwheel show \${WHEEL}
echo "\${WHEEL}" > ./patchelf
pipx install -f --pip-args="-r" patchelf
patchelf --version
EOF
docker run -v $(pwd):/gha ${{ matrix.test_image }} sh -ec "cd /gha && sh ./check.sh"
- uses: actions/upload-artifact@v4
with:
name: "cibw-wheels-${{ matrix.arch }}"
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
needs: [lint]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for setuptools_scm to find tags
submodules: 'recursive'
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
test_sdist:
name: Test SDist with python ${{ matrix.python }}
needs: [build_sdist]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python: ["2.7", "3.6", "3.11", "3.12-dev"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
if: matrix.python != '2.7'
name: Install Python ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}
- name: Install Ubuntu Python 2.7
if: matrix.python == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python2 python3-virtualenv
virtualenv -p python2 ${HOME}/cp27
${HOME}/cp27/bin/python -m pip install -U pip
${HOME}/cp27/bin/python -m pip install -U setuptools wheel
echo "${HOME}/cp27/bin" >> $GITHUB_PATH
- uses: actions/download-artifact@v4
with:
name: cibw-sdist
path: sdist
- name: Install SDist
run: |
SDIST="$(pwd)/$(find sdist -name '*.tar.gz')"
pip install "patchelf[test] @ file://${SDIST}"
- name: Test installed SDist
run: pytest ./tests
check_dist:
name: Check dist
needs: [build_wheels, build_sdist, test_sdist]
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- run: pipx run twine check --strict dist/*
upload_pypi:
name: Upload to PyPI
needs: [build_wheels, build_sdist, test_sdist, check_dist]
runs-on: ubuntu-22.04
if: github.event_name == 'push' && github.repository == 'mayeut/patchelf-pypi' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.12
with:
user: __token__
password: ${{ secrets.PYPI_RELEASE_PASSWORD }}