|
| 1 | +name: wheel |
| 2 | + |
| 3 | +on: [push, workflow_dispatch] |
| 4 | + |
| 5 | +jobs: |
| 6 | + sdist: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v2 |
| 10 | + - name: Reorganize repository |
| 11 | + run: | |
| 12 | + git config user.email "" |
| 13 | + git config user.name "dummy" |
| 14 | + git subtree add --prefix python/subprojects/minpack . HEAD |
| 15 | + git mv python/{mesonpep517,pyproject}.toml |
| 16 | + git commit -m "Python dist" |
| 17 | + - run: | |
| 18 | + pipx run build . --sdist |
| 19 | + working-directory: python |
| 20 | + - uses: actions/upload-artifact@v3 |
| 21 | + with: |
| 22 | + name: minpack-python-sdist |
| 23 | + path: python/dist/*.tar.gz |
| 24 | + retention-days: 5 |
| 25 | + |
| 26 | + manylinux: |
| 27 | + needs: |
| 28 | + - sdist |
| 29 | + runs-on: ubuntu-latest |
| 30 | + container: condaforge/linux-anvil-cos7-x86_64 |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + python: ['3.7', '3.8', '3.9', '3.10'] |
| 35 | + |
| 36 | + defaults: |
| 37 | + run: |
| 38 | + shell: ${{ matrix.shell || 'bash -l {0}' }} |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Create environment |
| 42 | + run: >- |
| 43 | + mamba create -n wheel |
| 44 | + --yes |
| 45 | + c-compiler |
| 46 | + fortran-compiler |
| 47 | + python=${{ matrix.python }} |
| 48 | + auditwheel |
| 49 | + git |
| 50 | + python |
| 51 | + pip |
| 52 | + python-build |
| 53 | + pkgconfig |
| 54 | + patchelf |
| 55 | + cffi |
| 56 | + numpy |
| 57 | + meson |
| 58 | + unzip |
| 59 | + wheel |
| 60 | + - name: Download sdist |
| 61 | + uses: actions/download-artifact@v2 |
| 62 | + with: |
| 63 | + name: minpack-python-sdist |
| 64 | + - name: Build wheel |
| 65 | + run: | |
| 66 | + conda activate wheel |
| 67 | + set -ex |
| 68 | + tar xvf minpack-*.tar.gz |
| 69 | + python -m build minpack-*/ --wheel |
| 70 | + auditwheel show minpack-*/dist/*.whl |
| 71 | + auditwheel repair -w minpack-*/dist minpack-*/dist/*.whl --plat ${{ env.plat }} |
| 72 | + rm minpack-*/dist/*-linux_x86_64.whl |
| 73 | + env: |
| 74 | + plat: manylinux${{ matrix.python == '3.6' && '2010' || '_2_12' }}_x86_64 |
| 75 | + - uses: actions/upload-artifact@v3 |
| 76 | + with: |
| 77 | + name: minpack-python-${{ matrix.python }} |
| 78 | + path: minpack-*/dist/*.whl |
| 79 | + retention-days: 5 |
0 commit comments