Skip to content

Commit a88558f

Browse files
authored
Merge pull request #15 from nojaf/ci
Add basic CI action
2 parents 1182cdc + b1fc92f commit a88558f

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
runs-on: ${{ matrix.os }}
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: clippy
24+
25+
- name: Cache cargo registry
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cargo/registry
29+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Cache cargo index
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.cargo/git
35+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Cache cargo build
38+
uses: actions/cache@v4
39+
with:
40+
path: target
41+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
42+
43+
- name: Build
44+
run: cargo build --verbose
45+
46+
- name: Run Clippy
47+
run: cargo clippy --all-targets --all-features -- -D warnings

0 commit comments

Comments
 (0)