Skip to content

Commit 1930ad6

Browse files
committed
updated CI
1 parent 0a82e3f commit 1930ad6

File tree

3 files changed

+138
-2
lines changed

3 files changed

+138
-2
lines changed

.github/workflows/publish.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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"

.github/workflows/workflow.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Whole
2+
3+
on: [push]
4+
5+
jobs:
6+
# test:
7+
# if: ${{ ! startsWith(github.event.ref, 'refs/tags/v') }}
8+
# uses: ./.github/workflows/test.yml
9+
# secrets: inherit
10+
11+
publish:
12+
# if: startsWith(github.event.ref, 'refs/tags/v')
13+
uses: ./.github/workflows/publish.yml
14+
secrets: inherit
15+
16+
# docs:
17+
# if: startsWith(github.event.ref, 'refs/tags/')
18+
# needs: publish
19+
# uses: ./.github/workflows/docs.yml
20+
# secrets: inherit
21+
22+
# docs_update:
23+
# if: startsWith(github.event.ref, 'refs/tags/d')
24+
# uses: ./.github/workflows/docs.yml
25+
# secrets: inherit

cibuildwheel_support/prepare_build_environment_windows.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ curl --netrc-optional -L -nv -o cuda.exe https://developer.download.nvidia.com/c
88
./cuda.exe -s nvcc_12.4 cudart_12.4 cublas_dev_12.4 curand_dev_12.4 cusparse_dev_12.4 cusolver_dev_12.4
99
rm cuda.exe
1010

11-
WITH_CUDA=1
12-
CUDA_HOME="$CUDA_ROOT"
11+
export WITH_CUDA=1
12+
export CUDA_HOME="$CUDA_ROOT"

0 commit comments

Comments
 (0)