From 0a0dc4d5080ce6d1ddfa5333b55b64f2a83f22c4 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 12 Sep 2026 00:31:43 -0400 Subject: [PATCH] Add AirspeedVelocity benchmarking CI Adds a benchmark workflow (Julia 1 and lts) and a benchmark/benchmarks.jl suite covering representative workloads so PRs check for performance regressions. Co-Authored-By: Chris Rackauckas Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: devin 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local session transcript /home/crackauc/.local/share/devin/cli/summaries/history_ccb52064e6514b21.md --- .github/workflows/benchmark.yml | 29 +++++++++++++++++++++++ benchmark/benchmarks.jl | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/benchmark.yml create mode 100644 benchmark/benchmarks.jl diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 00000000..750b9670 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,29 @@ +name: Benchmark this PR + +on: + pull_request: + branches: [master] + paths-ignore: ['docs/**'] + +permissions: + pull-requests: write + contents: read + +jobs: + benchmark: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + version: ["1", "lts"] + env: + # Force consistent Julia depot path for self-hosted runners + JULIA_DEPOT_PATH: ~/.julia + steps: + - uses: MilesCranmer/AirspeedVelocity.jl@action-v1 + with: + julia-version: ${{ matrix.version }} + script: "benchmark/benchmarks.jl" + extra-pkgs: "" + job-summary: true diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl new file mode 100644 index 00000000..9ca1615e --- /dev/null +++ b/benchmark/benchmarks.jl @@ -0,0 +1,41 @@ +using Pkg +# Monorepo: the libraries live in lib/ — develop them so we benchmark this +# checkout's code, not the registered versions. +for lib in ( + "ODEProblemLibrary", "DAEProblemLibrary", "DDEProblemLibrary", + "SDEProblemLibrary", "JumpProblemLibrary", "BVProblemLibrary", + "NonlinearProblemLibrary", + ) + Pkg.develop(path = joinpath(@__DIR__, "..", "lib", lib)) +end + +using ODEProblemLibrary, DAEProblemLibrary, NonlinearProblemLibrary +using BVProblemLibrary +using BenchmarkTools + +const SUITE = BenchmarkGroup() + +# ============================================================================= +# Problem library loading (the package's job: constructing problems) +# ============================================================================= + +SUITE["ode"] = BenchmarkGroup() + +SUITE["ode"]["vanderpol"] = @benchmarkable ODEProblemLibrary.prob_ode_vanderpol +SUITE["ode"]["lorenz"] = @benchmarkable ODEProblemLibrary.prob_ode_lorenz +SUITE["ode"]["rober"] = @benchmarkable ODEProblemLibrary.prob_ode_rober +SUITE["ode"]["brusselator_1d"] = @benchmarkable ODEProblemLibrary.prob_ode_brusselator_1d +SUITE["ode"]["pleiades"] = @benchmarkable ODEProblemLibrary.prob_ode_pleiades +SUITE["ode"]["hires"] = @benchmarkable ODEProblemLibrary.prob_ode_hires + +SUITE["dae"] = BenchmarkGroup() + +SUITE["dae"]["resrob"] = @benchmarkable DAEProblemLibrary.prob_dae_resrob + +SUITE["nonlinear"] = BenchmarkGroup() + +SUITE["nonlinear"]["testcase_lookup"] = @benchmarkable NonlinearProblemLibrary.nlprob_23_testcases["Generalized Rosenbrock function"] + +SUITE["bvp"] = BenchmarkGroup() + +SUITE["bvp"]["linear_1"] = @benchmarkable BVProblemLibrary.prob_bvp_linear_1