3333 python : 311
3434 platform_id : manylinux_x86_64
3535 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
3643 # macos-x86-64
3744 - os : macos-latest
3845 python : 311
6875 CIBW_ARCHS : all
6976 CIBW_BUILD : cp${{ matrix.python }}-${{ matrix.platform_id }}
7077 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
7281 with :
82+ name : cibw-cp${{ matrix.python }}-${{ matrix.platform_id }}-cu${{ matrix.cuda_version }}-${{ strategy.job-index }}
7383 path : ./wheelhouse/*.whl
7484 build_sdist :
7585 name : Build source distribution
7888 - uses : actions/checkout@v4
7989 with :
8090 fetch-depth : 0
81- - uses : actions/setup-python@v4
91+ - uses : actions/setup-python@v5
8292 name : Install Python
8393 with :
8494 python-version : ' 3.11'
8797 - name : Build sdist
8898 run : python -m build --sdist
8999
90- - uses : actions/upload-artifact@v3
100+ - uses : actions/upload-artifact@v4
91101 with :
102+ name : cibw-sdist
92103 path : dist/*.tar.gz
93104
94105 upload_pypi :
@@ -99,22 +110,31 @@ jobs:
99110 id-token : write
100111 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
101112 steps :
102- - uses : actions/download-artifact@v3
113+ - uses : actions/download-artifact@v4
103114 with :
104- name : artifact
115+ pattern : cibw-*
105116 path : dist
117+ merge-multiple : true
106118 - uses : pypa/gh-action-pypi-publish@release/v1
107119
108120 build_docker :
109121 # use the already built wheels to build docker
110122 needs : [build_wheels]
111123 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"
112132 steps :
113133 - uses : actions/checkout@v4
114- - uses : actions/download-artifact@v3
134+ - uses : actions/download-artifact@v4
115135 with :
116- name : artifact
117136 path : source/install/docker/dist
137+ merge-multiple : true
118138 - name : Log in to the Container registry
119139 uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
120140 with :
@@ -124,27 +144,30 @@ jobs:
124144
125145 - name : Extract metadata (tags, labels) for Docker
126146 id : meta
127- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
147+ uses : docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c
128148 with :
129149 images : ghcr.io/deepmodeling/deepmd-kit
130150
131151 - name : Build and push Docker image
132- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
152+ uses : docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
133153 with :
134154 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 }}
137157 labels : ${{ steps.meta.outputs.labels }}
158+ build-args : |
159+ VARIANT=${{ matrix.variant }}
160+ CUDA_VERSION=${{ matrix.cuda_version }}
138161
139162 build_pypi_index :
140163 needs : [build_wheels, build_sdist]
141164 runs-on : ubuntu-latest
142165 steps :
143- - uses : actions/download-artifact@v3
166+ - uses : actions/download-artifact@v4
144167 with :
145- name : artifact
146168 path : dist/packages
147- - uses : actions/setup-python@v4
169+ merge-multiple : true
170+ - uses : actions/setup-python@v5
148171 name : Install Python
149172 with :
150173 python-version : ' 3.11'
@@ -153,7 +176,7 @@ jobs:
153176 ls dist/packages > package_list.txt
154177 dumb-pypi --output-dir dist --packages-url ../../packages --package-list package_list.txt --title "DeePMD-kit Developed Packages"
155178 - name : Upload Pages artifact
156- uses : actions/upload-pages-artifact@v2
179+ uses : actions/upload-pages-artifact@v3
157180 with :
158181 path : dist
159182 deploy_pypi_index :
@@ -169,11 +192,11 @@ jobs:
169192 steps :
170193 - name : Deploy to GitHub Pages
171194 id : deployment
172- uses : actions/deploy-pages@v2
195+ uses : actions/deploy-pages@v4
173196
174197 pass :
175198 name : Pass testing build wheels
176- needs : [build_wheels, build_sdist]
199+ needs : [build_wheels, build_sdist, build_docker, build_pypi_index ]
177200 runs-on : ubuntu-latest
178201 if : always()
179202 steps :
0 commit comments