Repository navigation
54 lines (43 loc) · 1.47 KB
/
Copy pathci.yml
File metadata and controls
54 lines (43 loc) · 1.47 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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
lint-test:
name: Lint and test (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# crates/llm-provider-kit is a public submodule.
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install test dependencies
run: sudo apt-get update && sudo apt-get install -y ripgrep bubblewrap
# The sandbox tests run commands under bwrap, which needs unprivileged
# user namespaces; Ubuntu 24.04 restricts them through AppArmor.
- name: Allow unprivileged user namespaces
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Check formatting
run: cargo fmt --check
- name: Clippy (deny warnings)
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Run tests
run: cargo test --workspace
# The release workflow already builds Windows binaries, so keep Windows
# compiling on every PR. Tests are only run on Linux for now.
build-windows:
name: Build (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
# crates/llm-provider-kit is a public submodule.
submodules: true
- uses: dtolnay/rust-toolchain@stable
- name: Build workspace (including tests)
run: cargo build --workspace --all-targets