fix wheel renaming for pypy #158
Workflow file for this run
This file contains hidden or 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
| name: build-wheels | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [ master, unstuck-vmprof ] | |
| pull_request: | |
| branches: [ master, unstuck-vmprof ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build_binary_wheels: | |
| name: Build binary wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, windows-2022, macos-latest] | |
| steps: | |
| # Note: the action happens inside a docker image | |
| - uses: actions/checkout@v7 | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: all | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v4.2.1 | |
| env: | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
| CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | |
| CIBW_ARCHS_LINUX: auto aarch64 | |
| # cp3*t-*: free-threaded CPython is built by default since | |
| # cibuildwheel 4, but vmprof does not support it | |
| CIBW_SKIP: "pp* cp3*t-* *-win32 *-manylinux_i686 *musllinux*" | |
| CIBW_BEFORE_BUILD_LINUX: dnf install -y libunwind-devel | |
| CIBW_BEFORE_TEST: pip install -r test_requirements.txt | |
| CIBW_TEST_COMMAND: cd {package} && pytest vmprof jitlog -vv | |
| CIBW_TEST_COMMAND_WINDOWS: cd /d {package} && pytest vmprof jitlog -vv | |
| CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_pypy_wheels: | |
| name: Build pypy wheels | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| # Note: not inside a docker | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: 'pypy-3.11' | |
| - name: Install system libraries | |
| run: sudo apt install -y libunwind-dev libelf-dev libdwarf-dev rename | |
| - name: Build wheel | |
| run: | | |
| pypy -m pip install wheel | |
| pypy -m pip wheel . | |
| - name: Install wheel | |
| run: pypy -m pip install vmprof*.whl | |
| - name: Test wheel | |
| run: | | |
| FAILED=false | |
| pypy -m pip install -r test_requirements.txt build | |
| pypy -m pytest vmprof -v || FAILED=true | |
| pypy -m pytest jitlog -v || FAILED=true | |
| if [ "$FAILED" == true ]; then exit 1; fi | |
| # The wheel is pure python and comes out as | |
| # vmprof-*-py3-none-any.whl | |
| # which pip would also pick on CPython. Tag it for this PyPy | |
| # version instead | |
| TAG=$(pypy -c "import sys; print('pp%d%d' % sys.version_info[:2])") | |
| rename "s/py3-none-any/$TAG-none-any/" vmprof-*.whl | |
| - name: Build sdist | |
| run: | | |
| pypy -m build --sdist . | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| path: | | |
| vmprof*.whl | |
| dist/*.tar.gz | |