From b9357cf556da61017ebc7c0c231bfbfb9c0b5836 Mon Sep 17 00:00:00 2001 From: Growl Date: Fri, 8 May 2026 14:37:45 +0800 Subject: [PATCH 1/2] Remove added ModuleBase::TITLE in xc_functional.cpp --- source/module_hamilt_general/module_xc/xc_functional.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/module_hamilt_general/module_xc/xc_functional.cpp b/source/module_hamilt_general/module_xc/xc_functional.cpp index 2fc74ffbb78..84a08c080dc 100644 --- a/source/module_hamilt_general/module_xc/xc_functional.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional.cpp @@ -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" @@ -399,4 +398,4 @@ std::string XC_Functional::output_info() s += std::to_string(id)+"\t"; return s; #endif -} \ No newline at end of file +} From bb35b9636dbd61acff10904f9face72495e2a11a Mon Sep 17 00:00:00 2001 From: Growl Date: Fri, 8 May 2026 16:05:35 +0800 Subject: [PATCH 2/2] Split up precommit and regtest --- .github/workflows/precommit.yml | 43 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 8 ------ 2 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/precommit.yml diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 00000000000..6c9bccfd62e --- /dev/null +++ b/.github/workflows/precommit.yml @@ -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 + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f9996e0703..9b49b110536 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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