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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: CI
on:
push:
branches:
pull_request:
branches:
jobs:
# ────────────────────────────────────────────────────────────────────────────
# Format — checks that code conforms to rustfmt
# ────────────────────────────────────────────────────────────────────────────
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Cache Cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: cargo fmt --check
run: cargo fmt --check
# ────────────────────────────────────────────────────────────────────────────
# Clippy — zero warnings allowed
# ────────────────────────────────────────────────────────────────────────────
clippy:
name: Clippy
runs-on: ubuntu-latest
needs: fmt
steps:
- uses: actions/checkout@v7
- name: Cache Cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-clippy-
- name: cargo clippy — default features
run: cargo clippy -- -D warnings
# DD-043 (#50) — sparse linear algebra backend (faer). No system
# dependency needed, but requires rustc 1.84+ (faer 0.24's own MSRV,
# above this crate's own rust-version = "1.80") — @stable is expected
# to satisfy this; revisit if it ever regresses below 1.84.
- name: cargo clippy — feature sparse
run: cargo clippy --features sparse -- -D warnings
# DD-027 (#75, migrated to hdf5-metno per #79) — needs libhdf5's C
# headers, discovered via pkg-config. No code uses this feature yet
# (ExternalTabulated not implemented) — this only guards against the
# dependency itself becoming unbuildable.
- name: Install system dependencies (HDF5)
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends libhdf5-dev pkg-config
- name: cargo clippy — feature hdf5
run: cargo clippy --features hdf5 -- -D warnings
# J5 (v0.7) — activate when consumed for real:
# parallel/serde are already declared in Cargo.toml but not yet
# exercised by any real threshold-triggered or serialized code path.
# - name: cargo clippy — feature parallel
# run: cargo clippy --features parallel -- -D warnings
# - name: cargo clippy — feature serde
# run: cargo clippy --features serde -- -D warnings
# ────────────────────────────────────────────────────────────────────────────
# Test — unit and integration test suite
# ────────────────────────────────────────────────────────────────────────────
test:
name: Test
runs-on: ubuntu-latest
needs: fmt
steps:
- uses: actions/checkout@v7
- name: Cache Cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-test-
- name: cargo test — default features
run: cargo test
# DD-043 (#50) — see the clippy job for the rustc 1.84+ note.
- name: cargo test — feature sparse
run: cargo test --features sparse
# DD-027 (#75, migrated to hdf5-metno per #79).
- name: Install system dependencies (HDF5)
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends libhdf5-dev pkg-config
- name: cargo test — feature hdf5
run: cargo test --features hdf5
# J5 (v0.7) — activate when consumed for real (see the clippy job).
# - name: cargo test — feature parallel
# run: cargo test --features parallel
# - name: cargo test — feature serde
# run: cargo test --features serde
# ────────────────────────────────────────────────────────────────────────────
# Doc — generation and deployment to GitHub Pages
# Triggered on push to main only
# ────────────────────────────────────────────────────────────────────────────
doc:
name: Documentation
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs:
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Cache Cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-doc-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-doc-
- name: cargo doc — build with KaTeX header
run: RUSTDOCFLAGS="--html-in-header docs/katex-header.html" cargo doc --no-deps
- name: Add root redirect to oxiflow/index.html
run: |
echo '<meta http-equiv="refresh" content="0; url=oxiflow/index.html">' \
> target/doc/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
enable_jekyll: false