-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (42 loc) · 1.18 KB
/
Copy pathci.yml
File metadata and controls
55 lines (42 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches: [main]
pull_request:
# Cancel in-progress runs for the same ref when new commits are pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust (fmt, clippy, test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install libpcap (for the `pcap` crate)
run: |
sudo apt-get update
sudo apt-get install -y libpcap-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: cargo test
run: cargo test --all
nix:
name: Nix (build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: nix build
run: nix build --print-build-logs
- name: nix flake check
run: nix flake check --no-build
- name: smoke test
run: ./result/bin/tapgres --help