Skip to content

Commit 00e4448

Browse files
ci: add build verification GitHub Action (#22)
Signed-off-by: Gunjan10-droid <[email protected]>
1 parent 9793efc commit 00e4448

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Verification
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
name: Rust Build & Test
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
rust: [stable, beta]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Install Rust
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: ${{ matrix.rust }}
26+
override: true
27+
components: rustfmt, clippy
28+
29+
- name: Cache Cargo registry
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
~/.cargo/registry
34+
~/.cargo/git
35+
target
36+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37+
38+
- name: Build
39+
run: cargo build --workspace --verbose
40+
41+
- name: Run Tests
42+
run: cargo test --workspace --verbose
43+
44+
- name: Check Formatting
45+
run: cargo fmt --all -- --check
46+
47+
- name: Run Clippy Linter
48+
run: cargo clippy --workspace -- -D warnings
49+
50+
- name: Test CLI examples
51+
run: |
52+
cargo run --bin rusticle -- --help

0 commit comments

Comments
 (0)