Skip to content

Commit b875ea8

Browse files
authored
Merge devel to master (deepmodeling#3165)
Prepare v2.2.8
2 parents 839f4fe + 138ffef commit b875ea8

File tree

260 files changed

+15372
-8472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+15372
-8472
lines changed

.github/labeler.yml

+38-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
11
Python:
2-
- deepmd/**/*
3-
- deepmd_cli/**/*
4-
- source/tests/**/*
5-
Docs: doc/**/*
6-
Examples: examples/**/*
7-
Core: source/lib/**/*
8-
CUDA: source/lib/src/gpu/**/*
9-
ROCM: source/lib/src/gpu/**/*
10-
OP: source/op/**/*
11-
C++: source/api_cc/**/*
12-
C: source/api_c/**/*
13-
LAMMPS: source/lmp/**/*
14-
Gromacs: source/gmx/**/*
15-
i-Pi: source/ipi/**/*
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- deepmd/**/*
5+
- deepmd_utils/**/*
6+
- source/tests/**/*
7+
Docs:
8+
- changed-files:
9+
- any-glob-to-any-file: doc/**/*
10+
Examples:
11+
- changed-files:
12+
- any-glob-to-any-file: examples/**/*
13+
Core:
14+
- changed-files:
15+
- any-glob-to-any-file: source/lib/**/*
16+
CUDA:
17+
- changed-files:
18+
- any-glob-to-any-file: source/lib/src/gpu/**/*
19+
ROCM:
20+
- changed-files:
21+
- any-glob-to-any-file: source/lib/src/gpu/**/*
22+
OP:
23+
- changed-files:
24+
- any-glob-to-any-file: source/op/**/*
25+
C++:
26+
- changed-files:
27+
- any-glob-to-any-file: source/api_cc/**/*
28+
C:
29+
- changed-files:
30+
- any-glob-to-any-file: source/api_c/**/*
31+
LAMMPS:
32+
- changed-files:
33+
- any-glob-to-any-file: source/lmp/**/*
34+
Gromacs:
35+
- changed-files:
36+
- any-glob-to-any-file: source/gmx/**/*
37+
i-Pi:
38+
- changed-files:
39+
- any-glob-to-any-file: source/ipi/**/*

.github/release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- app/pre-commit-ci
5+
- app/dependabot
6+
categories:
7+
- title: Breaking Changes
8+
labels:
9+
- "breaking change"
10+
- title: New Features
11+
labels:
12+
- "new feature"
13+
- title: Enhancement
14+
labels:
15+
- enhancement
16+
- title: Documentation
17+
labels:
18+
# automatically added
19+
- Docs
20+
# for docs outside the doc directory
21+
- "other docs"
22+
exclude:
23+
labels:
24+
- build
25+
- bug
26+
- title: Build and release
27+
labels:
28+
- build
29+
- title: Bug fixings
30+
labels:
31+
- bug
32+
- title: Other Changes
33+
labels:
34+
- "*"

.github/workflows/build_cc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
dp_variant: clang
2222
steps:
2323
- uses: actions/checkout@v4
24-
- uses: actions/setup-python@v4
24+
- uses: actions/setup-python@v5
2525
with:
2626
python-version: '3.11'
2727
cache: 'pip'
@@ -37,7 +37,7 @@ jobs:
3737
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
3838
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
3939
&& sudo apt-get update \
40-
&& sudo apt-get -y install cuda-cudart-dev-12-0 cuda-nvcc-12-0
40+
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
4141
if: matrix.variant == 'cuda120'
4242
env:
4343
DEBIAN_FRONTEND: noninteractive

.github/workflows/build_wheel.yml

+40-17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ jobs:
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
@@ -68,8 +75,11 @@ jobs:
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
@@ -78,7 +88,7 @@ jobs:
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'
@@ -87,8 +97,9 @@ jobs:
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:

.github/workflows/codeql.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '45 2 * * 2'
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
13+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [ 'c-cpp', 'javascript-typescript', 'python' ]
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
cache: 'pip'
31+
if: matrix.language == 'c-cpp'
32+
- name: "Setup dependencies"
33+
if: matrix.language == 'c-cpp'
34+
run: |
35+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
36+
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
37+
&& sudo apt-get update \
38+
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
39+
python -m pip install tensorflow
40+
env:
41+
DEBIAN_FRONTEND: noninteractive
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v3
45+
with:
46+
languages: ${{ matrix.language }}
47+
queries: security-extended,security-and-quality
48+
- name: "Run, Build Application using script"
49+
run: source/install/build_cc.sh
50+
env:
51+
DP_VARIANT: cuda
52+
DOWNLOAD_TENSORFLOW: "FALSE"
53+
if: matrix.language == 'c-cpp'
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v3
57+
with:
58+
category: "/language:${{matrix.language}}"

.github/workflows/labeler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v4
12+
- uses: actions/labeler@v5
1313
with:
1414
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/package_c.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,48 @@ jobs:
88
build_c:
99
name: Build C library
1010
runs-on: ubuntu-22.04
11+
strategy:
12+
matrix:
13+
include:
14+
- tensorflow_build_version: "2.15"
15+
tensorflow_version: ""
16+
filename: libdeepmd_c.tar.gz
17+
- tensorflow_build_version: "2.14"
18+
tensorflow_version: ">=2.5.0rc0,<2.15"
19+
filename: libdeepmd_c_cu11.tar.gz
1120
steps:
1221
- uses: actions/checkout@v4
1322
- name: Package C library
1423
run: ./source/install/docker_package_c.sh
24+
env:
25+
TENSORFLOW_VERSION: ${{ matrix.tensorflow_version }}
26+
TENSORFLOW_BUILD_VERSION: ${{ matrix.tensorflow_build_version }}
27+
- run: cp libdeepmd_c.tar.gz ${{ matrix.filename }}
28+
if: matrix.filename != 'libdeepmd_c.tar.gz'
1529
# for download and debug
1630
- name: Upload artifact
17-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
1832
with:
19-
name: libdeepmd_c
20-
path: ./libdeepmd_c.tar.gz
33+
name: libdeepmd_c-${{ strategy.job-index }}-${{ matrix.filename }}
34+
path: ${{ matrix.filename }}
2135
- name: Test C library
2236
run: ./source/install/docker_test_package_c.sh
2337
- name: Release
2438
uses: softprops/action-gh-release@v1
2539
if: startsWith(github.ref, 'refs/tags/')
2640
with:
27-
files: libdeepmd_c.tar.gz
41+
files: ${{ matrix.filename }}
2842
test_c:
2943
name: Test building from C library
3044
needs: [build_c]
3145
runs-on: ubuntu-22.04
3246
steps:
3347
- uses: actions/checkout@v4
3448
- name: Download artifact
35-
uses: actions/download-artifact@v3
49+
uses: actions/download-artifact@v4
3650
with:
37-
name: libdeepmd_c
51+
pattern: libdeepmd_c-*
52+
merge-multiple: true
3853
- run: tar -vxzf ./libdeepmd_c.tar.gz
3954
- name: Test C library
4055
run: ./source/install/build_from_c.sh

.github/workflows/test_cc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: actions/setup-python@v4
11+
- uses: actions/setup-python@v5
1212
with:
1313
python-version: '3.11'
1414
cache: 'pip'

0 commit comments

Comments
 (0)