summaryrefslogtreecommitdiff
path: root/.github/workflows/wheel-manylinux.yml
blob: 40ef7ad47cfb5e3fbd9fbb6cde444c3c54cb5eb1 (plain)
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
90
91
name: Linux wheel build

on:
  release:
    types: [created]

jobs:
  python:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v3
      with:
        python-version: "3.10"

    - name: Install build dependencies
      run: pip install -U "setuptools<60" pip wheel

    - name: Make sdist and Python wheel
      run: make sdist pywheel

    - name: Release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/')
      with:
        files: |
          dist/*.tar.gz
          dist/*-none-any.whl

    - name: Upload sdist
      uses: actions/upload-artifact@v3
      with:
        name: sdist
        path: dist/*.tar.gz
        if-no-files-found: ignore

    - name: Upload Python wheel
      uses: actions/upload-artifact@v3
      with:
        name: wheel-Python
        path: dist/*-none-any.whl
        if-no-files-found: ignore

  binary:
    strategy:
      # Allows for matrix sub-jobs to fail without canceling the rest
      fail-fast: false

      matrix:
        image:
          - manylinux1_x86_64
          - manylinux1_i686
          - musllinux_1_1_x86_64
          - musllinux_1_1_aarch64
          - manylinux_2_24_x86_64
          - manylinux_2_24_i686
          - manylinux_2_24_aarch64

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - name: Set up Python 3.10
      uses: actions/setup-python@v3
      with:
        python-version: "3.10"

    - name: Building wheel
      run: |
        make sdist wheel_${{ matrix.image }}

    - name: Copy wheels in dist
      run: cp wheelhouse*/*.whl dist/

    - name: Release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/')
      with:
        files: |
          dist/*manylinux*.whl
          dist/*musllinux*.whl

    - name: Archive Wheels
      uses: actions/upload-artifact@v3
      with:
        name: ${{ matrix.image }}
        path: dist/*m[au][ns][yl]linux*.whl
        if-no-files-found: ignore