Skip to content

Commit bb35b96

Browse files
committed
Split up precommit and regtest
1 parent b9357cf commit bb35b96

2 files changed

Lines changed: 43 additions & 8 deletions

File tree

.github/workflows/precommit.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Precommit
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
test:
12+
name: Precommit
13+
runs-on: X64
14+
if: github.repository_owner == 'deepmodeling'
15+
container:
16+
image: ghcr.io/deepmodeling/abacus-gnu
17+
volumes:
18+
- /tmp/ccache:/github/home/.ccache
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
fetch-depth: 0
25+
26+
- name: Install CI tools
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y ccache ca-certificates python-is-python3 python3-pip
30+
sudo pip install clang-format clang-tidy
31+
32+
- name: Configure
33+
run: |
34+
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
35+
36+
- uses: pre-commit/action@v3.0.1
37+
with:
38+
extra_args:
39+
--from-ref ${{ github.event.pull_request.base.sha }}
40+
--to-ref ${{ github.event.pull_request.head.sha }}
41+
continue-on-error: true
42+
- uses: pre-commit-ci/lite-action@v1.0.3
43+

.github/workflows/test.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ jobs:
3333
run: |
3434
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
3535
36-
- uses: pre-commit/action@v3.0.1
37-
with:
38-
extra_args:
39-
--from-ref ${{ github.event.pull_request.base.sha }}
40-
--to-ref ${{ github.event.pull_request.head.sha }}
41-
continue-on-error: true
42-
- uses: pre-commit-ci/lite-action@v1.0.3
43-
4436
- name: Build
4537
run: |
4638
cmake --build build -j8

0 commit comments

Comments
 (0)