33
33
python : 311
34
34
platform_id : manylinux_x86_64
35
35
dp_variant : cuda
36
+ cuda_version : 12.2
37
+ - os : ubuntu-latest
38
+ python : 311
39
+ platform_id : manylinux_x86_64
40
+ dp_variant : cuda
41
+ cuda_version : 11.8
42
+ dp_pkg_name : deepmd-kit-cu11
36
43
# macos-x86-64
37
44
- os : macos-latest
38
45
python : 311
68
75
CIBW_ARCHS : all
69
76
CIBW_BUILD : cp${{ matrix.python }}-${{ matrix.platform_id }}
70
77
DP_VARIANT : ${{ matrix.dp_variant }}
71
- - uses : actions/upload-artifact@v3
78
+ CUDA_VERSION : ${{ matrix.cuda_version }}
79
+ DP_PKG_NAME : ${{ matrix.dp_pkg_name }}
80
+ - uses : actions/upload-artifact@v4
72
81
with :
82
+ name : cibw-cp${{ matrix.python }}-${{ matrix.platform_id }}-cu${{ matrix.cuda_version }}-${{ strategy.job-index }}
73
83
path : ./wheelhouse/*.whl
74
84
build_sdist :
75
85
name : Build source distribution
78
88
- uses : actions/checkout@v4
79
89
with :
80
90
fetch-depth : 0
81
- - uses : actions/setup-python@v4
91
+ - uses : actions/setup-python@v5
82
92
name : Install Python
83
93
with :
84
94
python-version : ' 3.11'
87
97
- name : Build sdist
88
98
run : python -m build --sdist
89
99
90
- - uses : actions/upload-artifact@v3
100
+ - uses : actions/upload-artifact@v4
91
101
with :
102
+ name : cibw-sdist
92
103
path : dist/*.tar.gz
93
104
94
105
upload_pypi :
@@ -99,22 +110,31 @@ jobs:
99
110
id-token : write
100
111
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
101
112
steps :
102
- - uses : actions/download-artifact@v3
113
+ - uses : actions/download-artifact@v4
103
114
with :
104
- name : artifact
115
+ pattern : cibw-*
105
116
path : dist
117
+ merge-multiple : true
106
118
- uses : pypa/gh-action-pypi-publish@release/v1
107
119
108
120
build_docker :
109
121
# use the already built wheels to build docker
110
122
needs : [build_wheels]
111
123
runs-on : ubuntu-latest
124
+ strategy :
125
+ fail-fast : false
126
+ matrix :
127
+ include :
128
+ - variant : " "
129
+ cuda_version : " 12"
130
+ - variant : " _cu11"
131
+ cuda_version : " 11"
112
132
steps :
113
133
- uses : actions/checkout@v4
114
- - uses : actions/download-artifact@v3
134
+ - uses : actions/download-artifact@v4
115
135
with :
116
- name : artifact
117
136
path : source/install/docker/dist
137
+ merge-multiple : true
118
138
- name : Log in to the Container registry
119
139
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
120
140
with :
@@ -124,27 +144,30 @@ jobs:
124
144
125
145
- name : Extract metadata (tags, labels) for Docker
126
146
id : meta
127
- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
147
+ uses : docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c
128
148
with :
129
149
images : ghcr.io/deepmodeling/deepmd-kit
130
150
131
151
- name : Build and push Docker image
132
- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
152
+ uses : docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
133
153
with :
134
154
context : source/install/docker
135
- push : ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' }}
136
- tags : ${{ steps.meta.outputs.tags }}
155
+ push : ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
156
+ tags : ${{ steps.meta.outputs.tags }}${{ matrix.variant }}
137
157
labels : ${{ steps.meta.outputs.labels }}
158
+ build-args : |
159
+ VARIANT=${{ matrix.variant }}
160
+ CUDA_VERSION=${{ matrix.cuda_version }}
138
161
139
162
build_pypi_index :
140
163
needs : [build_wheels, build_sdist]
141
164
runs-on : ubuntu-latest
142
165
steps :
143
- - uses : actions/download-artifact@v3
166
+ - uses : actions/download-artifact@v4
144
167
with :
145
- name : artifact
146
168
path : dist/packages
147
- - uses : actions/setup-python@v4
169
+ merge-multiple : true
170
+ - uses : actions/setup-python@v5
148
171
name : Install Python
149
172
with :
150
173
python-version : ' 3.11'
@@ -153,7 +176,7 @@ jobs:
153
176
ls dist/packages > package_list.txt
154
177
dumb-pypi --output-dir dist --packages-url ../../packages --package-list package_list.txt --title "DeePMD-kit Developed Packages"
155
178
- name : Upload Pages artifact
156
- uses : actions/upload-pages-artifact@v2
179
+ uses : actions/upload-pages-artifact@v3
157
180
with :
158
181
path : dist
159
182
deploy_pypi_index :
@@ -169,11 +192,11 @@ jobs:
169
192
steps :
170
193
- name : Deploy to GitHub Pages
171
194
id : deployment
172
- uses : actions/deploy-pages@v2
195
+ uses : actions/deploy-pages@v4
173
196
174
197
pass :
175
198
name : Pass testing build wheels
176
- needs : [build_wheels, build_sdist]
199
+ needs : [build_wheels, build_sdist, build_docker, build_pypi_index ]
177
200
runs-on : ubuntu-latest
178
201
if : always()
179
202
steps :
0 commit comments