alice-physics 2.2.0

Deterministic physics engine: 128-bit fixed-point rigid bodies with bit-exact, replayable results, typed observation and rollback for search and planning, plus FEM, CFD and 3D-print analysis modules
Documentation
name: Downstream

# Build and test the crates that depend on alice-physics (ALICE-SDF, ALICE-LOL
# and ALICE-TRT, their main branches) against this commit, so a change here that
# breaks them fails here. scripts/downstream_check.sh does the work and runs the
# same way locally; it lists which downstream tests run and why.
#
# One Linux job: the downstream suites are tested on every OS in their own
# repositories, and this job only has to see the crates compile and pass against
# the changed alice-physics.

on:
  push:
    branches: [main]
    paths:
      - 'src/**'
      - 'Cargo.toml'
      - 'rust-toolchain.toml'
      - 'scripts/downstream_check.sh'
      - 'scripts/downstream_select_tag.py'
      - 'scripts/downstream_test_counts.py'
      - '.github/workflows/downstream.yml'
  pull_request:
    branches: [main]
    paths:
      - 'src/**'
      - 'Cargo.toml'
      - 'rust-toolchain.toml'
      - 'scripts/downstream_check.sh'
      - 'scripts/downstream_select_tag.py'
      - 'scripts/downstream_test_counts.py'
      - '.github/workflows/downstream.yml'
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  downstream:
    name: ALICE-SDF, ALICE-LOL and ALICE-TRT against this commit
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v5

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      # ALICE-TRT's GPU tests return early, and pass, when wgpu finds no
      # adapter, and the runner has no GPU: Mesa's software Vulkan driver
      # (lavapipe) gives wgpu a CPU adapter, as in ALICE-TRT's own Linux GPU
      # lanes. downstream_check.sh fails the TRT step when the adapter is
      # missing. Not cached: apt-get update is most of the ~20 s and must run
      - name: Install Mesa software Vulkan (lavapipe) for the ALICE-TRT GPU tests
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends mesa-vulkan-drivers libvulkan1 vulkan-tools
          vulkaninfo --summary || echo "vulkaninfo --summary failed (exit $?); the ALICE-TRT GPU probe decides"

      # fetched first so the cache below can key on the downstream manifests
      # ALICE-SDF, ALICE-LOL and ALICE-TRT (with ALICE-ML, ALICE-DB and
      # ALICE-Crypto, path dependencies of ALICE-TRT) at main; ALICE-LLM and
      # ALICE-Zip at the newest
      # release tag that fits ALICE-LOL both ways. ALICE-Kinematics at main: its
      # only release tag requires alice-lol 0.3 and ALICE-LOL main is 0.4; drop
      # this once a release tag accepts the current alice-lol
      - name: Fetch downstream repositories
        env:
          DOWNSTREAM_ROOT: ${{ runner.temp }}/downstream
          KINEMATICS_REF: main
        run: bash scripts/downstream_check.sh --fetch-only

      - uses: Swatinem/rust-cache@v2
        with:
          shared-key: downstream
          workspaces: |
            ${{ runner.temp }}/downstream/ALICE-SDF -> ${{ runner.temp }}/downstream/target/sdf
            ${{ runner.temp }}/downstream/ALICE-LOL -> ${{ runner.temp }}/downstream/target/lol
            ${{ runner.temp }}/downstream/ALICE-TRT -> ${{ runner.temp }}/downstream/target/trt

      - name: Build and test downstream (fails on a requirement that rejects this version, a test binary with 0 tests, an unpatched alice-physics or no GPU adapter for ALICE-TRT)
        env:
          DOWNSTREAM_ROOT: ${{ runner.temp }}/downstream
          DOWNSTREAM_TARGET_DIR: ${{ runner.temp }}/downstream/target
        run: bash scripts/downstream_check.sh --no-fetch