testing airspeedvelocity

This commit is contained in:
2026-02-17 15:30:07 -05:00
parent 1f0db6e43a
commit 033bfd04a7
2 changed files with 21 additions and 24 deletions
+12 -24
View File
@@ -32,26 +32,18 @@ jobs:
python -m pip install asv virtualenv uv==${{ env.UV_VERSION }} nox
python -m pip install -e ".[tests]"
- name: ASV machine info
run: asv machine --yes --config=asv.conf.json
- name: Compute base commit
- name: Run ASV continuous via nox
env:
- ASV_FACTOR: "1.10"
run: |
git fetch origin "${{ forgejo.base_ref }}" --depth=200
BASE_SHA=$(git merge-base HEAD "origin/${{ forgejo.base_ref }}")
echo "ASV_BASE_SHA=${BASE_SHA}" >> $GITHUB_ENV
nox -s benchmark_regression
- name: Run ASV continuous (gate on regressions)
run: |
# Factor 1.10 means 10% regression threshold
asv continuous --config=asv.conf.json --factor 1.10 "$ASV_BASE_SHA" HEAD
- name: Upload ASV artifacts (optional)
if: always()
uses: actions/upload-artifact@v4
with:
name: asv-results-pr
path: build/asv
# - name: Upload ASV artifacts (optional)
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: asv-results-pr
# path: build/asv
asv-publish:
if: forgejo.event_name == 'push'
@@ -84,13 +76,9 @@ jobs:
mkdir -p build/asv/results
aws s3 sync "s3://${ASV_S3_BUCKET}/asv/results" build/asv/results --delete || true
- name: ASV machine info
run: asv machine --yes --config=asv.conf.json
- name: Run ASV and publish HTML
- name: ASV via nox
run: |
asv run --config=asv.conf.json --show-stderr --verbose
asv publish --config=asv.conf.json
nox -s benchmark
- name: Upload updated results (S3)
env:
+9
View File
@@ -599,6 +599,15 @@ def benchmark(session: nox.Session):
session.run("asv", "run", "--show-stderr", "--verbose", f"--config={config_path}")
session.run("asv", "publish", f"--config={config_path}")
@nox.session(python=DEFAULT_PYTHON, reuse_venv=True, venv_backend="uv")
def benchmark_regresssion(session: nox.Session):
"""Run Airspeed Velocity benchmarks regression test."""
session.install("-e", ".[tests]")
config_path = "asv.conf.json"
asv_factor = os.environ.get(ASV_FACTOR)
asv_base_sha = os.environ.get(ASV_BASE_SHA)
session.run("asv", "machine", "--yes", f"--config={config_path}")
session.run("asv", "continuous", "--show-stderr", "--verbose", f"--factor={asv_factor}", f"--config={config_path}", asv_base_sha, "HEAD")
# Sessions to run by default when running `nox` without arguments
nox.options.sessions = [