forked from 1b-agent/fieldcraft-upstream
* test: hostile-params test runs under small session work caps Session gains Limits, the defaults of mesh.tet.generate's max_steiner and max_tets (production values unchanged; a parameter still overrides them; file.open keeps them). The registry-wide hostile-params test runs on sessions with small caps, so the needle-triangle tessellation it meshes is refused at once instead of meshing to the 50k Steiner cap: the engine test binary drops from ~350 s to ~20 s locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * ci: move heavy tests to a heavy job on main, nightly and on demand Four slow tests are #[ignore = "heavy: ..."] (every corpus recipe, the cantilever convergence study, the explicit-vs-modal cantilever period, the generic-predicate rational cross-check); fast representative tests of each area stay in the PR gate. cargo xtask test --heavy runs every ignored test (benchmarks included) and the doc tests; cargo xtask test and ci run the rest without the doc tests. The new heavy CI job runs it on pushes to main, nightly and on workflow_dispatch. Branch jobs restore main's rust cache and no longer save their own. AGENTS.md documents the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * test: the three slow LBM verification cases run in the heavy job The Stokes-drag sphere array, the staircase-pipe convergence study and the developing-channel case are heavy (21 s, 11 s, 6 s alone); plane Poiseuille, Couette, Taylor-Green, reproducibility and the stability limits stay in the PR gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
# Nightly: the heavy tests on main.
|
|
- cron: '23 3 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
# Pull requests that only touch Markdown or docs/ skip the build jobs (they still report, as
|
|
# skipped). Pushes to main and manual runs always run everything.
|
|
changes:
|
|
name: Select checks
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
code: ${{ steps.paths.outputs.code }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
- id: paths
|
|
name: Detect code changes
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
run: |
|
|
if [ "$EVENT_NAME" != "pull_request" ]; then
|
|
echo "code=true" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
changed=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
|
|
code=false
|
|
while IFS= read -r f; do
|
|
case "$f" in
|
|
docs/features.md) code=true ;;
|
|
*.md|docs/*) ;;
|
|
"") ;;
|
|
*) code=true ;;
|
|
esac
|
|
done <<< "$changed"
|
|
echo "code=$code" >> "$GITHUB_OUTPUT"
|
|
echo "code changes: $code"
|
|
|
|
ci:
|
|
name: cargo xtask ci
|
|
needs: changes
|
|
if: needs.changes.outputs.code == 'true'
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
targets: wasm32-unknown-unknown
|
|
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
with:
|
|
# Branches restore main's cache; saving their own would only evict it.
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- run: cargo xtask ci
|
|
|
|
heavy:
|
|
# The heavy verification and corpus tests (#[ignore]d) and the doc tests: on main, nightly
|
|
# and on demand, not on every pull request.
|
|
name: cargo xtask test --heavy
|
|
if: contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name)
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
with:
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- run: cargo xtask test --heavy
|
|
|
|
advisories:
|
|
name: Dependency advisories and sources
|
|
needs: changes
|
|
if: needs.changes.outputs.code == 'true'
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Install cargo-deny
|
|
run: cargo install cargo-deny --version 0.20.2 --locked
|
|
- run: cargo deny --locked check --warn unmaintained advisories bans sources
|