|
| 1 | +# This file is autogenerated by maturin v0.14.17 |
| 2 | +# To update, run |
| 3 | +# |
| 4 | +# maturin generate-ci github |
| 5 | +# |
| 6 | +name: CI |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + - master |
| 13 | + tags: |
| 14 | + - '*' |
| 15 | + pull_request: |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
| 21 | +jobs: |
| 22 | + linux: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v3 |
| 29 | + - uses: actions/setup-python@v4 |
| 30 | + with: |
| 31 | + python-version: '3.10' |
| 32 | + - name: Build wheels |
| 33 | + uses: PyO3/maturin-action@v1 |
| 34 | + with: |
| 35 | + target: ${{ matrix.target }} |
| 36 | + args: --release --out dist --find-interpreter |
| 37 | + sccache: 'true' |
| 38 | + manylinux: auto |
| 39 | + - name: Upload wheels |
| 40 | + uses: actions/upload-artifact@v3 |
| 41 | + with: |
| 42 | + name: wheels |
| 43 | + path: dist |
| 44 | + |
| 45 | + windows: |
| 46 | + runs-on: windows-latest |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + target: [x64, x86] |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v3 |
| 52 | + - uses: actions/setup-python@v4 |
| 53 | + with: |
| 54 | + python-version: '3.10' |
| 55 | + architecture: ${{ matrix.target }} |
| 56 | + - name: Build wheels |
| 57 | + uses: PyO3/maturin-action@v1 |
| 58 | + with: |
| 59 | + target: ${{ matrix.target }} |
| 60 | + args: --release --out dist --find-interpreter |
| 61 | + sccache: 'true' |
| 62 | + - name: Upload wheels |
| 63 | + uses: actions/upload-artifact@v3 |
| 64 | + with: |
| 65 | + name: wheels |
| 66 | + path: dist |
| 67 | + |
| 68 | + macos: |
| 69 | + runs-on: macos-latest |
| 70 | + strategy: |
| 71 | + matrix: |
| 72 | + target: [x86_64, aarch64] |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v3 |
| 75 | + - uses: actions/setup-python@v4 |
| 76 | + with: |
| 77 | + python-version: '3.10' |
| 78 | + - name: Build wheels |
| 79 | + uses: PyO3/maturin-action@v1 |
| 80 | + with: |
| 81 | + target: ${{ matrix.target }} |
| 82 | + args: --release --out dist --find-interpreter |
| 83 | + sccache: 'true' |
| 84 | + - name: Upload wheels |
| 85 | + uses: actions/upload-artifact@v3 |
| 86 | + with: |
| 87 | + name: wheels |
| 88 | + path: dist |
| 89 | + |
| 90 | + sdist: |
| 91 | + runs-on: ubuntu-latest |
| 92 | + steps: |
| 93 | + - uses: actions/checkout@v3 |
| 94 | + - name: Build sdist |
| 95 | + uses: PyO3/maturin-action@v1 |
| 96 | + with: |
| 97 | + command: sdist |
| 98 | + args: --out dist |
| 99 | + - name: Upload sdist |
| 100 | + uses: actions/upload-artifact@v3 |
| 101 | + with: |
| 102 | + name: wheels |
| 103 | + path: dist |
| 104 | + |
| 105 | + release: |
| 106 | + name: Release |
| 107 | + runs-on: ubuntu-latest |
| 108 | + if: "startsWith(github.ref, 'refs/tags/')" |
| 109 | + needs: [linux, windows, macos, sdist] |
| 110 | + steps: |
| 111 | + - uses: actions/download-artifact@v3 |
| 112 | + with: |
| 113 | + name: wheels |
| 114 | + - name: Publish to PyPI |
| 115 | + uses: PyO3/maturin-action@v1 |
| 116 | + env: |
| 117 | + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
| 118 | + with: |
| 119 | + command: upload |
| 120 | + args: --skip-existing * |
0 commit comments