Skip to content

Commit 9be389b

Browse files
author
Codex
committed
Add CI workflow and tighten build checks
1 parent 9c5167d commit 9be389b

File tree

6 files changed

+3703
-616
lines changed

6 files changed

+3703
-616
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Lint and Test
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest, windows-latest]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install Rust
26+
uses: dtolnay/rust-toolchain@stable
27+
28+
- name: Cache cargo registry and build
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cargo/bin/
33+
~/.cargo/registry/index/
34+
~/.cargo/registry/cache/
35+
~/.cargo/git/db/
36+
target/
37+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-cargo-
40+
41+
- name: Cargo fmt
42+
run: cargo fmt -- --check
43+
44+
- name: Cargo clippy
45+
run: cargo clippy -- -D warnings
46+
47+
- name: Cargo test
48+
run: cargo test

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
target/
2+
**/*.pdb
3+
**/*.log
4+
/.idea/
5+
/.vscode/
6+
/.DS_Store
7+
*.exe
8+
*.dll
9+

0 commit comments

Comments
 (0)