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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches:
pull_request:
jobs:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: cargo build
run: cargo build --release --locked
- name: cargo test
run: cargo test --release --locked
- name: cargo clippy
run: cargo clippy --release --all-targets -- -D warnings
continue-on-error: true
- name: --version smoke
run: ./target/release/agtop${{ matrix.os == 'windows-latest' && '.exe' || '' }} --version
shell: bash
- name: --list-builtins smoke
run: ./target/release/agtop${{ matrix.os == 'windows-latest' && '.exe' || '' }} --list-builtins
shell: bash
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
continue-on-error: true
# Linux-host cross-compile coverage. The macOS targets were
# historically excluded because libproc's bindgen step needed the
# Apple SDK; that's no longer true — we use direct FFI to libSystem
# for proc_pidinfo / proc_pidfdinfo, so the apple targets cross-
# compile from ubuntu-latest fine.
cross-targets:
name: cargo check ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
- x86_64-pc-windows-msvc
- x86_64-pc-windows-gnu
- x86_64-unknown-freebsd
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- run: cargo check --target ${{ matrix.target }} --release --locked