Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Precommit

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Precommit
runs-on: X64
if: github.repository_owner == 'deepmodeling'
container:
image: ghcr.io/deepmodeling/abacus-gnu
volumes:
- /tmp/ccache:/github/home/.ccache
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install CI tools
run: |
sudo apt-get update
sudo apt-get install -y ccache ca-certificates python-is-python3 python3-pip
sudo pip install clang-format clang-tidy

- name: Configure
run: |
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1

- uses: pre-commit/action@v3.0.1
with:
extra_args:
--from-ref ${{ github.event.pull_request.base.sha }}
--to-ref ${{ github.event.pull_request.head.sha }}
continue-on-error: true
- uses: pre-commit-ci/lite-action@v1.0.3

8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ jobs:
run: |
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1

- uses: pre-commit/action@v3.0.1
with:
extra_args:
--from-ref ${{ github.event.pull_request.base.sha }}
--to-ref ${{ github.event.pull_request.head.sha }}
continue-on-error: true
- uses: pre-commit-ci/lite-action@v1.0.3

- name: Build
run: |
cmake --build build -j8
Expand Down
3 changes: 1 addition & 2 deletions source/module_hamilt_general/module_xc/xc_functional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ int XC_Functional::get_func_type()

void XC_Functional::set_xc_first_loop(const UnitCell& ucell)
{
ModuleBase::TITLE("XC_Functional", "set_xc_first_loop");
/** In the special "two-level" calculation case,
the first scf iteration only calculate the functional without exact
exchange. but in "nscf" calculation, there is no need of "two-level"
Expand Down Expand Up @@ -399,4 +398,4 @@ std::string XC_Functional::output_info()
s += std::to_string(id)+"\t";
return s;
#endif
}
}
Loading