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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
43 changes: 0 additions & 43 deletions .clang-tidy

This file was deleted.

12 changes: 6 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// To develop inside a pre-configured container, see https://code.visualstudio.com/docs/remote/containers .
// For format details, see https://aka.ms/devcontainer.json .
{
"image":"ghcr.io/deepmodeling/abacus-gnu",
"extensions": [
"ms-vscode.cpptools-extension-pack",
"xaver.clang-format",
"cschlosser.doxdocgen"
]
"image":"ghcr.io/deepmodeling/abacus-gnu",
"extensions": [
"ms-vscode.cpptools-extension-pack",
"xaver.clang-format",
"cschlosser.doxdocgen"
]
}
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.pre-commit-config.yaml export-ignore
.github/ export-ignore

# Line break
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
62 changes: 62 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Precommit

on:
workflow_dispatch:
pull_request:

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

jobs:
test:
name: Precommit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
# We will handle submodules manually after fixing ownership
submodules: 'false'

- name: Update submodules
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init --recursive

- name: Configure precommit server
run: |
cd tools/precommit
./start_local_server.sh &

- name: Wait for precommit server
run: |
for i in {1..300}; do
if curl -fs -o /dev/null http://127.0.0.1:8080/ 2>/dev/null; then
echo "precommit server is ready"
exit 0
fi
sleep 1
done

echo "precommit server did not become ready" >&2
echo "==== precommit server log ====" >&2
cat "$RUNNER_TEMP/precommit-server.log" >&2 || true
exit 1

- name: Run precommit
env:
ABACUS_PRECOMMIT_SERVER: "http://127.0.0.1:8080"
run: |
if ! ./tools/precommit/precommit.py --no-cache; then
echo ""
echo "********************************************"
echo "* *"
echo "* O/ Try running ./make_pretty.sh *"
echo "* /| *"
echo "* / \\ *"
echo "********************************************"
echo ""
exit 1
fi
Loading
Loading