Add files via upload #595
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| jobs: | |
| test-and-verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run unit tests | |
| run: cargo test -p dsfb --all-targets --locked | |
| - name: Run drift impulse example | |
| run: cargo run --release -p dsfb --example drift_impulse --locked | |
| - name: Verify analysis script works on simulation output | |
| run: | | |
| SIM_CSV="$(find output-dsfb -mindepth 2 -maxdepth 2 -type f -name 'sim-dsfb.csv' | sort | tail -n1)" | |
| if [[ -z "${SIM_CSV}" ]]; then | |
| echo "No simulation CSV found in output-dsfb/<timestamp>/sim-dsfb.csv" >&2 | |
| exit 1 | |
| fi | |
| python3 scripts/analyze_sim.py --csv "${SIM_CSV}" --no-plots --impulse-start 300 --impulse-duration 100 |