|
| 1 | +name: Build for CUDA 12.4 and publish |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + workflow_call: |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + name: Build wheels on ${{ matrix.os }} |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + os: |
| 15 | + [ |
| 16 | + ubuntu-latest, |
| 17 | + ubuntu-24.04-arm, |
| 18 | + windows-latest, |
| 19 | + macos-13, |
| 20 | + macos-latest, |
| 21 | + ] |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - uses: actions/setup-python@v5 |
| 27 | + with: |
| 28 | + python-version: "3.13" |
| 29 | + |
| 30 | + - name: Install cibuildwheel |
| 31 | + run: python -m pip install cibuildwheel==2.23.0 |
| 32 | + |
| 33 | + - name: Build wheels |
| 34 | + run: python -m cibuildwheel --output-dir wheelhouse |
| 35 | + env: |
| 36 | + CIBW_ARCHS: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || '' }} |
| 37 | + |
| 38 | + - uses: actions/upload-artifact@v4 |
| 39 | + with: |
| 40 | + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 41 | + path: ./wheelhouse/*.whl |
| 42 | + |
| 43 | + # publish-to-pypi: |
| 44 | + # name: >- |
| 45 | + # Publish Python 🐍 distribution 📦 to PyPI |
| 46 | + # needs: |
| 47 | + # - build |
| 48 | + # runs-on: ubuntu-latest |
| 49 | + # environment: |
| 50 | + # name: pypi |
| 51 | + # url: https://pypi.org/p/torchmd-net |
| 52 | + # permissions: |
| 53 | + # id-token: write # IMPORTANT: mandatory for trusted publishing |
| 54 | + |
| 55 | + # steps: |
| 56 | + # - name: Download all the dists |
| 57 | + # uses: actions/download-artifact@v4 |
| 58 | + # with: |
| 59 | + # path: dist/ |
| 60 | + # merge-multiple: true |
| 61 | + |
| 62 | + # - name: Publish distribution 📦 to PyPI |
| 63 | + # uses: pypa/gh-action-pypi-publish@release/v1 |
| 64 | + # with: |
| 65 | + # password: ${{ secrets.TMDNET_PYPI_API_TOKEN }} |
| 66 | + # skip_existing: true |
| 67 | + |
| 68 | + # github-release: |
| 69 | + # name: >- |
| 70 | + # Sign the Python 🐍 distribution 📦 with Sigstore |
| 71 | + # and upload them to GitHub Release |
| 72 | + # needs: |
| 73 | + # - publish-to-pypi |
| 74 | + # runs-on: ubuntu-latest |
| 75 | + |
| 76 | + # permissions: |
| 77 | + # contents: write # IMPORTANT: mandatory for making GitHub Releases |
| 78 | + # id-token: write # IMPORTANT: mandatory for sigstore |
| 79 | + |
| 80 | + # steps: |
| 81 | + # - name: Download all the dists |
| 82 | + # uses: actions/download-artifact@v4 |
| 83 | + # with: |
| 84 | + # path: dist/ |
| 85 | + # merge-multiple: true |
| 86 | + |
| 87 | + # - name: Sign the dists with Sigstore |
| 88 | + # uses: sigstore/[email protected] |
| 89 | + # with: |
| 90 | + # inputs: >- |
| 91 | + # ./dist/*.whl |
| 92 | + |
| 93 | + # - name: Create GitHub Release |
| 94 | + # env: |
| 95 | + # GITHUB_TOKEN: ${{ github.token }} |
| 96 | + # run: >- |
| 97 | + # gh release create |
| 98 | + # "$GITHUB_REF_NAME" |
| 99 | + # --repo "$GITHUB_REPOSITORY" |
| 100 | + # --notes "" |
| 101 | + |
| 102 | + # - name: Upload artifact signatures to GitHub Release |
| 103 | + # env: |
| 104 | + # GITHUB_TOKEN: ${{ github.token }} |
| 105 | + # # Upload to GitHub Release using the `gh` CLI. |
| 106 | + # # `dist/` contains the built packages, and the |
| 107 | + # # sigstore-produced signatures and certificates. |
| 108 | + # run: >- |
| 109 | + # gh release upload |
| 110 | + # "$GITHUB_REF_NAME" dist/** |
| 111 | + # --repo "$GITHUB_REPOSITORY" |
0 commit comments