Skip to content

Commit ef782d6

Browse files
committed
check in cargo.lock for caching; introduce async runtime
uses tokio to spawn tasks for running clang-format/tidy on each file
1 parent 8a05e13 commit ef782d6

21 files changed

+2101
-164
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55
# to native line endings on checkout.
66
*.py text eol=lf
77
*.rst text eol=lf
8+
*.css text eol=lf
89
*.md text eol=lf
910
*.rs text eol=lf
1011
*.yaml text eol=lf
1112
*.toml text eol=lf
13+
*.lock text eol=lf
1214
*.yml text eol=lf
1315
*.sh text eol=lf
1416
*.cpp text eol=lf
1517
*.hpp text eol=lf
1618
*.patch text eol=lf
19+
*.diff text eol=lf
1720
.gitattributes text eol=lf
21+
.gitmodules text eol=lf
22+
.gitignore text eol=lf
1823
*.txt text eol=lf
24+
*.json text eol=lf
1925
*.code-workspace text eol=lf
26+
*.clang-tidy text eol=lf
27+
*.clang-format text eol=lf

.github/workflows/build-docs.yml

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
working-directory: cpp-linter-py
1616
run: pip install -r docs/requirements.txt
1717

18+
- name: Cache .cargo locked resources
19+
uses: actions/cache@v4
20+
with:
21+
path: .cargo
22+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
23+
1824
- name: Build docs
1925
working-directory: cpp-linter-py
2026
run: sphinx-build docs docs/_build/html
@@ -38,6 +44,11 @@ jobs:
3844
steps:
3945
- uses: actions/checkout@v4
4046
- run: rustup update --no-self-update
47+
- name: Cache .cargo locked resources
48+
uses: actions/cache@v4
49+
with:
50+
path: .cargo
51+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
4152
- run: cargo doc --no-deps --manifest-path cpp-linter-lib/Cargo.toml
4253
- name: upload rustdoc build as artifact
4354
uses: actions/upload-artifact@v4

.github/workflows/pre-commit-hooks.yml

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- run: rustup update
18+
- name: Cache .cargo locked resources
19+
uses: actions/cache@v4
20+
with:
21+
path: .cargo
22+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
1823
- name: cargo clippy
1924
run: cargo clippy
2025
- name: cargo fmt

.github/workflows/run-dev-tests.yml

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
python -m pip install clang-tools
8888
clang-tools --install ${{ matrix.version }}
8989
90+
- name: Cache .cargo locked resources
91+
uses: actions/cache@v4
92+
with:
93+
path: .cargo
94+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
95+
9096
- name: Collect Coverage
9197
working-directory: cpp-linter-lib
9298
env:

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ debug/
180180

181181
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
182182
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
183-
Cargo.lock
183+
# Cargo.lock
184184

185185
# These are backup files generated by rustfmt
186186
**/*.rs.bk

0 commit comments

Comments
 (0)