Skip to content

Commit 3b31efe

Browse files
committed
lint codes
Signed-off-by: Smityz <smityz@qq.com> add config to use custom dns Signed-off-by: Smityz <smityz@qq.com>
1 parent 755b0e0 commit 3b31efe

File tree

9 files changed

+771
-292
lines changed

9 files changed

+771
-292
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,31 @@ on:
99
name: CI
1010

1111
jobs:
12-
build:
13-
name: build
12+
check:
13+
name: check
1414
runs-on: ubuntu-latest
15+
env:
16+
CARGO_TARGET_DIR: "./build"
1517
steps:
16-
- uses: actions/checkout@v2
17-
- name: Rust Cache
18-
uses: Swatinem/rust-cache@v1.4.0
18+
- uses: actions/checkout@v3
19+
- name: cpp lint
20+
uses: DoozyX/clang-format-lint-action@v0.16.2
21+
with:
22+
source: '.'
23+
extensions: 'cpp,h'
24+
exclude: 'build'
25+
style: Google
26+
- name: rust cache
27+
uses: actions/cache@v3
28+
with:
29+
path: |
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
build/
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
36+
- name: rust lint
37+
run: cargo fmt -- --check && cargo clippy -- -D warnings && cargo check --all-targets --all-features
1938
- name: cmake build
20-
run: cmake -S . -B build && cmake --build build
39+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build

0 commit comments

Comments
 (0)