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
name: CI
# Anti-rot gate. The limit-normal OpenSubdiv-oracle tests silently rotted once
# (the `opensubdiv-petite` dep drifted its API and bumped vendored OpenSubdiv
# 3.5 -> 3.6.1) because nothing ran them. The `oracle` job below compiles AND
# runs those tests on every push/PR, which catches both compile drift and
# runtime divergence.
on:
push:
branches:
pull_request:
# Cancel superseded runs on the same ref.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
# Cheap, fast feedback: formatting, library-level lint, and README freshness.
# Compiles only the subdiv-kernels lib (no `opensubdiv-petite`, no C++ build).
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-rdme
# Informational only: the tree carries pre-existing rustfmt version-drift
# diffs (doc/import rewrapping). Surface them without blocking PRs until a
# one-shot tree-wide reformat under a pinned toolchain lands; flip to a
# hard gate then.
- name: rustfmt (informational)
run: cargo fmt --all --check
continue-on-error: true
- name: clippy (lib)
run: cargo clippy --lib
# Fail if the README has drifted from the lib.rs crate docs. Warnings
# (unresolved re-export intra-doc links) are expected and don't fail.
- name: README in sync with lib.rs
run: cargo rdme --check --no-fail-on-warnings
# Full suite including the OpenSubdiv-oracle gates. `opensubdiv-petite` is a
# crates.io dependency that vendors OpenSubdiv and builds it via cmake + a C++
# compiler, so those are installed here.
oracle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install C++ build tooling for vendored OpenSubdiv
run: sudo apt-get update && sudo apt-get install -y cmake clang
- name: Test (default features, includes OSD oracle)
run: cargo test --no-fail-fast