Skip to content

Commit 5ebd951

Browse files
committed
gha: add basic lint & build jobs
1 parent a83aa0f commit 5ebd951

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
RUSTFLAGS: "-Dwarnings"
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
- name: Setup Rust
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with:
22+
toolchain: stable
23+
components: rustfmt, clippy
24+
- name: Install system dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y \
28+
build-essential \
29+
libtss2-dev \
30+
pkg-config
31+
- name: Cargo fmt
32+
run: cargo fmt --check
33+
- name: Clippy
34+
run: cargo clippy --all-targets --all-features
35+
36+
build:
37+
runs-on: ubuntu-latest
38+
needs: [lint]
39+
steps:
40+
- uses: actions/checkout@v5
41+
- name: Setup Rust
42+
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
with:
44+
toolchain: stable
45+
- name: Install system dependencies
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y \
49+
build-essential \
50+
libtss2-dev \
51+
pkg-config
52+
- name: Build
53+
run: cargo build

0 commit comments

Comments
 (0)