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:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: test (${{ matrix.os }})
# Linux is the production platform and the only one where the page-cache
# residency tests run (tests/residency.rs is `cfg(target_os = "linux")`);
# macOS is where trg is developed.
strategy:
fail-fast: false
matrix:
os:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# The differential tests use rg as the line-number oracle. cmake, for the
# default zlib-ng backend, is preinstalled on both runner images.
- name: Install ripgrep
run: |
if [ "$RUNNER_OS" = Linux ]; then
sudo apt-get update -q && sudo apt-get install -y -q ripgrep
else
brew install ripgrep
fi
- name: Test
run: cargo test
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
msrv:
# Must match `rust-version` in Cargo.toml. A build with the committed
# Cargo.lock, so it fails when a dependency update needs a newer compiler.
name: check (Rust 1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --locked --all-targets
no-default-features:
# The README's fallback for hosts without cmake: pure-Rust miniz_oxide
# instead of zlib-ng. Nothing else builds it, so it would rot unnoticed.
name: test (no default features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install ripgrep
run: sudo apt-get update -q && sudo apt-get install -y -q ripgrep
- name: Test
run: cargo test --no-default-features