Skip to content

Commit 1e65de1

Browse files
authored
Merge pull request #110 from dyzheng/develop
update abacusmodeling/abacus-develop: develop from deepmodeling/abacus-develop: develop
2 parents 3b891d1 + 53a7d9d commit 1e65de1

File tree

1,020 files changed

+66482
-17279
lines changed

Some content is hidden

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

1,020 files changed

+66482
-17279
lines changed

.clang-format

Lines changed: 33 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,37 @@
11
---
2-
Language: Cpp
3-
# BasedOnStyle: LLVM
4-
AccessModifierOffset: -2
2+
BasedOnStyle: Microsoft
3+
AccessModifierOffset: '-2'
54
AlignAfterOpenBracket: Align
6-
AlignConsecutiveMacros: None
7-
AlignConsecutiveAssignments: None
8-
AlignConsecutiveBitFields: None
9-
AlignConsecutiveDeclarations: None
10-
AlignEscapedNewlines: Right
11-
AlignOperands: Align
12-
AlignTrailingComments: true
13-
AllowAllArgumentsOnNextLine: true
14-
AllowAllConstructorInitializersOnNextLine: true
15-
AllowAllParametersOfDeclarationOnNextLine: true
16-
AllowShortEnumsOnASingleLine: true
17-
AllowShortBlocksOnASingleLine: Never
18-
AllowShortCaseLabelsOnASingleLine: false
19-
AllowShortFunctionsOnASingleLine: All
20-
AllowShortLambdasOnASingleLine: All
21-
AllowShortIfStatementsOnASingleLine: Never
22-
AllowShortLoopsOnASingleLine: false
23-
AlwaysBreakAfterDefinitionReturnType: None
24-
AlwaysBreakAfterReturnType: None
25-
AlwaysBreakBeforeMultilineStrings: false
26-
AlwaysBreakTemplateDeclarations: MultiLine
27-
AttributeMacros:
28-
- __capability
29-
BinPackArguments: true
30-
BinPackParameters: true
31-
BraceWrapping:
32-
AfterCaseLabel: false
33-
AfterClass: false
34-
AfterControlStatement: Never
35-
AfterEnum: false
36-
AfterFunction: false
37-
AfterNamespace: false
38-
AfterObjCDeclaration: false
39-
AfterStruct: false
40-
AfterUnion: false
41-
AfterExternBlock: false
42-
BeforeCatch: false
43-
BeforeElse: false
44-
BeforeLambdaBody: false
45-
BeforeWhile: false
46-
IndentBraces: false
47-
SplitEmptyFunction: true
48-
SplitEmptyRecord: true
49-
SplitEmptyNamespace: true
50-
BreakBeforeBinaryOperators: None
51-
BreakBeforeConceptDeclarations: true
52-
BreakBeforeBraces: Attach
53-
BreakBeforeInheritanceComma: false
54-
BreakInheritanceList: BeforeColon
55-
BreakBeforeTernaryOperators: true
56-
BreakConstructorInitializersBeforeComma: false
57-
BreakConstructorInitializers: BeforeColon
58-
BreakAfterJavaFieldAnnotations: false
59-
BreakStringLiterals: true
60-
ColumnLimit: 80
61-
CommentPragmas: '^ IWYU pragma:'
62-
CompactNamespaces: false
63-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
64-
ConstructorInitializerIndentWidth: 4
65-
ContinuationIndentWidth: 4
66-
Cpp11BracedListStyle: true
67-
DeriveLineEnding: true
68-
DerivePointerAlignment: false
69-
DisableFormat: false
70-
EmptyLineBeforeAccessModifier: LogicalBlock
71-
ExperimentalAutoDetectBinPacking: false
72-
FixNamespaceComments: true
73-
ForEachMacros:
74-
- foreach
75-
- Q_FOREACH
76-
- BOOST_FOREACH
77-
StatementAttributeLikeMacros:
78-
- Q_EMIT
79-
IncludeBlocks: Preserve
80-
IncludeCategories:
81-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
82-
Priority: 2
83-
SortPriority: 0
84-
CaseSensitive: false
85-
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
86-
Priority: 3
87-
SortPriority: 0
88-
CaseSensitive: false
89-
- Regex: '.*'
90-
Priority: 1
91-
SortPriority: 0
92-
CaseSensitive: false
93-
IncludeIsMainRegex: '(Test)?$'
94-
IncludeIsMainSourceRegex: ''
95-
IndentCaseLabels: false
96-
IndentCaseBlocks: false
97-
IndentGotoLabels: true
98-
IndentPPDirectives: None
99-
IndentExternBlock: AfterExternBlock
100-
IndentRequires: false
101-
IndentWidth: 4
102-
IndentWrappedFunctionNames: false
103-
InsertTrailingCommas: None
104-
JavaScriptQuotes: Leave
105-
JavaScriptWrapImports: true
106-
KeepEmptyLinesAtTheStartOfBlocks: true
107-
MacroBlockBegin: ''
108-
MacroBlockEnd: ''
109-
MaxEmptyLinesToKeep: 1
110-
NamespaceIndentation: None
111-
ObjCBinPackProtocolList: Auto
112-
ObjCBlockIndentWidth: 2
113-
ObjCBreakBeforeNestedBlockParam: true
114-
ObjCSpaceAfterProperty: false
115-
ObjCSpaceBeforeProtocolList: true
116-
PenaltyBreakAssignment: 2
117-
PenaltyBreakBeforeFirstCallParameter: 19
118-
PenaltyBreakComment: 300
119-
PenaltyBreakFirstLessLess: 120
120-
PenaltyBreakString: 1000
121-
PenaltyBreakTemplateDeclaration: 10
122-
PenaltyExcessCharacter: 1000000
123-
PenaltyReturnTypeOnItsOwnLine: 60
124-
PenaltyIndentedWhitespace: 0
5+
AlignConsecutiveMacros: 'true'
6+
AlignEscapedNewlines: Left
7+
AlignOperands: 'true'
8+
AlignTrailingComments: 'false'
9+
AllowAllArgumentsOnNextLine: 'false'
10+
AllowAllParametersOfDeclarationOnNextLine: 'false'
11+
BinPackArguments: 'false'
12+
BinPackParameters: 'false'
13+
BreakBeforeBinaryOperators: All
14+
BreakBeforeTernaryOperators: 'true'
15+
Cpp11BracedListStyle: 'true'
16+
DerivePointerAlignment: 'true'
17+
FixNamespaceComments: 'true'
18+
IncludeBlocks: Regroup
19+
IndentWidth: '4'
20+
Language: Cpp
12521
PointerAlignment: Right
126-
ReflowComments: true
127-
SortIncludes: true
128-
SortJavaStaticImport: Before
129-
SortUsingDeclarations: true
130-
SpaceAfterCStyleCast: false
131-
SpaceAfterLogicalNot: false
132-
SpaceAfterTemplateKeyword: true
133-
SpaceBeforeAssignmentOperators: true
134-
SpaceBeforeCaseColon: false
135-
SpaceBeforeCpp11BracedList: false
136-
SpaceBeforeCtorInitializerColon: true
137-
SpaceBeforeInheritanceColon: true
138-
SpaceBeforeParens: ControlStatements
139-
SpaceAroundPointerQualifiers: Default
140-
SpaceBeforeRangeBasedForLoopColon: true
141-
SpaceInEmptyBlock: false
142-
SpaceInEmptyParentheses: false
143-
SpacesBeforeTrailingComments: 1
144-
SpacesInAngles: false
145-
SpacesInConditionalStatement: false
146-
SpacesInContainerLiterals: true
147-
SpacesInCStyleCastParentheses: false
148-
SpacesInParentheses: false
149-
SpacesInSquareBrackets: false
150-
SpaceBeforeSquareBrackets: false
151-
BitFieldColonSpacing: Both
152-
Standard: Latest
153-
StatementMacros:
154-
- Q_UNUSED
155-
- QT_REQUIRE_VERSION
156-
TabWidth: 8
157-
UseCRLF: false
158-
UseTab: Never
159-
WhitespaceSensitiveMacros:
160-
- STRINGIZE
161-
- PP_STRINGIZE
162-
- BOOST_PP_STRINGIZE
163-
- NS_SWIFT_NAME
164-
- CF_SWIFT_NAME
22+
ReflowComments: 'true'
23+
SortIncludes: 'true'
24+
SortUsingDeclarations: 'true'
25+
SpaceAfterCStyleCast: 'false'
26+
SpaceAfterLogicalNot: 'false'
27+
SpaceBeforeRangeBasedForLoopColon: 'false'
28+
SpaceInEmptyParentheses: 'false'
29+
SpacesInAngles: 'false'
30+
SpacesInCStyleCastParentheses: 'false'
31+
SpacesInContainerLiterals: 'false'
32+
SpacesInParentheses: 'false'
33+
SpacesInSquareBrackets: 'false'
34+
Standard: Cpp11
35+
TabWidth: '4'
36+
UseTab: Never
16537
...
166-

.devcontainer/devcontainer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
// For format details, see https://aka.ms/devcontainer.json.
1+
// To develop inside a pre-configured container, see https://code.visualstudio.com/docs/remote/containers .
2+
// For format details, see https://aka.ms/devcontainer.json .
23
{
34
"image":"ghcr.io/deepmodeling/abacus-development-kit:gnu",
4-
"extensions": ["ms-vscode.cpptools-extension-pack"]
5-
}
5+
"extensions": [
6+
"ms-vscode.cpptools-extension-pack",
7+
"xaver.clang-format",
8+
"cschlosser.doxdocgen"
9+
]
10+
}

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.yaml]
1212
indent_size = 2
13+
14+
[CMakeLists.txt]
15+
indent_style = space
16+
indent_size = 2

.github/workflows/hosted_test.yml renamed to .github/workflows/build_test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Build Test
22
on: push
33

44
jobs:
@@ -27,5 +27,4 @@ jobs:
2727
- name: Build
2828
run: |
2929
cmake -B build -DBUILD_TESTING=ON ${{ matrix.build_args }}
30-
cmake --build build -j4
31-
cmake --install build
30+
cmake --build build -j2

.github/workflows/container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- develop
77
- reconstruction
88
- newelpa
9-
9+
1010
jobs:
1111
build_container_and_push:
1212
runs-on: ubuntu-latest

.github/workflows/dynamic.yml

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,67 +11,23 @@ on:
1111
default: '2'
1212

1313
jobs:
14-
start-runner:
15-
name: Start self-hosted EC2 runner
16-
runs-on: ubuntu-latest
17-
outputs:
18-
label: ${{ steps.start-ec2-runner.outputs.label }}
19-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
20-
steps:
21-
- name: Configure AWS credentials
22-
uses: aws-actions/configure-aws-credentials@v1
23-
with:
24-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26-
aws-region: ${{ secrets.AWS_REGION }}
27-
- name: Start EC2 runner
28-
id: start-ec2-runner
29-
uses: machulav/ec2-github-runner@v2
30-
with:
31-
mode: start
32-
github-token: ${{ secrets.PAT }}
33-
ec2-image-id: ami-07758124f42f794bf
34-
ec2-instance-type: c5.4xlarge
35-
subnet-id: subnet-f7edb991
36-
security-group-id: sg-fd5185e7
3714
test:
3815
name: Do the job on the runner
39-
needs: start-runner # required to start the main job when the runner is ready
40-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
16+
runs-on: self-hosted
4117
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
4218
steps:
4319
- name: Checkout
4420
uses: actions/checkout@v2
4521
- name: Build and Test
4622
run: |
47-
cmake -B build -DENABLE_ASAN=1
23+
cmake -B build -DENABLE_ASAN=1 -DBUILD_TESTING=ON -DENABLE_DEEPKS=1
4824
cmake --build build -j16
49-
ctest --test-dir build --verbose
25+
cmake --install build
26+
cmake --build build --target test ARGS="-V"
5027
- name: Publish Report to Dashboard
5128
uses: crazy-max/ghaction-github-pages@v2
5229
with:
5330
target_branch: dashboard
5431
build_dir: html
5532
env:
5633
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
stop-runner:
58-
name: Stop self-hosted EC2 runner
59-
needs:
60-
- start-runner # required to get output from the start-runner job
61-
- test # required to wait when the main job is done
62-
runs-on: ubuntu-latest
63-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
64-
steps:
65-
- name: Configure AWS credentials
66-
uses: aws-actions/configure-aws-credentials@v1
67-
with:
68-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
69-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
70-
aws-region: ${{ secrets.AWS_REGION }}
71-
- name: Stop EC2 runner
72-
uses: machulav/ec2-github-runner@v2
73-
with:
74-
mode: stop
75-
github-token: ${{ secrets.PAT }}
76-
label: ${{ needs.start-runner.outputs.label }}
77-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/static.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
clang-tidy:
8-
runs-on: ubuntu-20.04
8+
runs-on: self-hosted
99
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
1010
steps:
1111
- name: Checkout Pull Request
@@ -14,22 +14,17 @@ jobs:
1414
ref: ${{ github.event.pull_request.head.sha }}
1515
- name: Setup clang-tidy
1616
run: |
17-
apt-get install -y --no-install-recommends gnupg ca-certificates
18-
wget https://apt.llvm.org/llvm-snapshot.gpg.key --no-check-certificate && apt-key add llvm-snapshot.gpg.key
19-
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-12 main" >> /etc/apt/sources.list
20-
echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-12 main" >> /etc/apt/sources.list
21-
apt-get update
22-
apt-get install -y --no-install-recommends clang-tidy-12
17+
apt-get update && apt-get install -y --no-install-recommends clang-format clang-tidy
2318
- name: Generate Build Commands
2419
run: |
25-
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=clang++-12
20+
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1
2621
- name: Checkout Changed Files
2722
id: files
2823
uses: deepmodeling/get-changed-files@master
2924
- name: Run clang-tidy
3025
run: |
3126
printf "%s\n" ${{ steps.files.outputs.added_modified }} | grep -E "^.*\.(cpp|h)$" > cppfiles.txt
32-
clang-tidy-12 -p=build --export-fixes=diagnostics.yaml `cat cppfiles.txt`
27+
clang-tidy -p=build --export-fixes=diagnostics.yaml `cat cppfiles.txt`
3328
- name: Run clang-tidy-pr-comments action
3429
uses: deepmodeling/abacus-code-reviewer@master
3530
with:

0 commit comments

Comments
 (0)