File: wheels.yml

package info (click to toggle)
python-parasail 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,316 kB
  • sloc: python: 21,354; sh: 10; makefile: 2
file content (89 lines) | stat: -rw-r--r-- 3,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build and upload to PyPI

# Build on every branch push, tag push, and pull request change:
on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
# on:
#   push:
#   pull_request:
#   release:
#     types:
#       - published
env:
  CIBW_BUILD_VERBOSITY: 3
  CIBW_TEST_COMMAND: python -m unittest discover {project}/tests
  # Disable building PyPy wheels on all platforms
  CIBW_SKIP: pp*
  # The windows builds was reusing the found win32 dll instead of downloading the win64 one.
  # Additionally, the build directory contained the prior win32 dll. Easier to delete it, too.
  CIBW_BEFORE_BUILD_WINDOWS: del /q {project}\parasail\parasail.dll
  # automake is not included in the stock macos runner, which triggers `setup.py` to install all deps (not just
  # the missing ones). However, the newly installed m4 binary fails on macos with a SIGABRT (though the original
  # `brew` installed one does not) as documented in:
  #     https://github.com/jeffdaily/parasail-python/issues/24.
  CIBW_BEFORE_BUILD_MACOS: brew install automake

jobs:
  build_wheels:
    name: Build wheels for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
    runs-on: ${{ matrix.buildplat[0] }}
    strategy:
      # Ensure that a wheel builder finishes even if another fails
      fail-fast: false
      matrix:
        buildplat:
        - [ubuntu-20.04, manylinux_x86_64]
        - [ubuntu-20.04, musllinux_i686]
        - [ubuntu-20.04, manylinux_x86_64]
        - [ubuntu-20.04, musllinux_i686]
        - [windows-2019, win_amd64]
        - [windows-2019, win32]
        - [macos-11, macosx_x86_64]
        # we only need to build for a single python version since the wheels are universal
        python: ["cp38"]

    steps:
      - uses: actions/checkout@v3

      - name: Build wheels
        uses: pypa/cibuildwheel@v2.9.0
        env:
          CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}

      - uses: actions/upload-artifact@v3
        with:
          path: ./wheelhouse/*.whl

  build_sdist:
    name: Build source distribution
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Build sdist
        run: pipx run build --sdist

      - uses: actions/upload-artifact@v3
        with:
          path: dist/*.tar.gz

  upload_pypi:
    needs: [build_wheels, build_sdist]
    runs-on: ubuntu-latest
    # upload to PyPI on every tag starting with 'v'
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    # alternatively, to publish when a GitHub Release is created, use the following rule:
    # if: github.event_name == 'release' && github.event.action == 'published'
    steps:
      - uses: actions/download-artifact@v3
        with:
          # unpacks default artifact into dist/
          # if `name: artifact` is omitted, the action will create extra parent dir
          name: artifact
          path: dist

      - uses: pypa/gh-action-pypi-publish@v1.5.0
        with:
          user: __token__
          password: ${{ secrets.pypi_password }}
          # To test: repository_url: https://test.pypi.org/legacy/