From e0cd720ba770fa7ddced66e30187538f3fc11d12 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 09:28:29 +0100 Subject: [PATCH 1/8] Update ASV workflow in GitHub Actions Replaced tox command with ASV installation and execution steps for benchmarking. --- .github/workflows/asv.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 19a841ab..8fdc4acb 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -37,7 +37,13 @@ jobs: - run: cmake --preset base - run: cmake --build --preset build - run: ctest --preset test - - run: tox -e asv + - run: python -m pip install -r requirements/asv.txt + - run: | + asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' + asv update + asv run -v -m cloud-container -e --environment existing:python --set-commit-hash HEAD + asv publish + # - run: tox -e asv - uses: stefanzweifel/git-auto-commit-action@v4 with: From 7eb6ee4506b0e2213bb3250b711a8115cd7bb689 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 09:48:10 +0100 Subject: [PATCH 2/8] minimal import test --- .github/workflows/asv.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 8fdc4acb..6943e303 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -34,10 +34,11 @@ jobs: - uses: hendrikmuhs/ccache-action@v1.2.20 - - run: cmake --preset base + - run: cmake --preset ci-linux - run: cmake --build --preset build - run: ctest --preset test - - run: python -m pip install -r requirements/asv.txt + - run: python -c 'import scipp' + - run: python -m pip install -r requirements/asv.txt -r requirements/test.txt - run: | asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' asv update From be9b8dbf27e217caf4afda804d15108c78ff9d59 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 11:14:41 +0100 Subject: [PATCH 3/8] Refactor ASV benchmark execution in workflow Refactor ASV benchmark steps in CI workflow to use a named step for clarity. --- .github/workflows/asv.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 6943e303..6501211c 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -37,9 +37,12 @@ jobs: - run: cmake --preset ci-linux - run: cmake --build --preset build - run: ctest --preset test - - run: python -c 'import scipp' - - run: python -m pip install -r requirements/asv.txt -r requirements/test.txt - - run: | + - name: Run ASV benchmarks + env: + PYTHONPATH: ${{ github.workspace }}/install + run: | + python -c 'import scipp' + python -m pip install -r requirements/asv.txt -r requirements/test.txt asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' asv update asv run -v -m cloud-container -e --environment existing:python --set-commit-hash HEAD From 0f1ca1f55d0a71e1cdf0acb5354a3ae146371290 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 11:23:08 +0100 Subject: [PATCH 4/8] Update ASV benchmarks workflow configuration Removed PYTHONPATH environment variable from ASV benchmarks step and added installation command for scipp. --- .github/workflows/asv.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 6501211c..3866f1f1 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -38,9 +38,9 @@ jobs: - run: cmake --build --preset build - run: ctest --preset test - name: Run ASV benchmarks - env: - PYTHONPATH: ${{ github.workspace }}/install run: | + # Install scipp into the conda environment so ASV subprocesses can find it + cp -r install/scipp "$(python -c 'import site; print(site.getsitepackages()[0])')/" python -c 'import scipp' python -m pip install -r requirements/asv.txt -r requirements/test.txt asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' From 138598168567bd98ab0b4007342f4c3fcc1ab01a Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 11:28:22 +0100 Subject: [PATCH 5/8] Update CI workflow to remove ASV benchmarks Removed ASV benchmark steps and replaced with editable tox environment. --- .github/workflows/asv.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 3866f1f1..294677c2 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -37,17 +37,8 @@ jobs: - run: cmake --preset ci-linux - run: cmake --build --preset build - run: ctest --preset test - - name: Run ASV benchmarks - run: | - # Install scipp into the conda environment so ASV subprocesses can find it - cp -r install/scipp "$(python -c 'import site; print(site.getsitepackages()[0])')/" - python -c 'import scipp' - python -m pip install -r requirements/asv.txt -r requirements/test.txt - asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' - asv update - asv run -v -m cloud-container -e --environment existing:python --set-commit-hash HEAD - asv publish - # - run: tox -e asv + - run: tox -e editable + - run: tox -e asv - uses: stefanzweifel/git-auto-commit-action@v4 with: From c8ebd6cad3290f76dc4a913b37c7b618db076190 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 11:34:34 +0100 Subject: [PATCH 6/8] Update ASV benchmark setup in workflow Replace tox commands with ASV benchmark commands and install requirements. --- .github/workflows/asv.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 294677c2..2901ee55 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -37,8 +37,17 @@ jobs: - run: cmake --preset ci-linux - run: cmake --build --preset build - run: ctest --preset test - - run: tox -e editable - - run: tox -e asv + - run: python -m pip install -r requirements/asv.txt + - name: Run ASV benchmarks + working-directory: scipp-benchmarks + env: + PYTHONPATH: ${{ github.workspace }}/install + LD_LIBRARY_PATH: ${{ github.workspace }}/install/lib + run: | + asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' + asv update + asv run -v -m cloud-container -e --environment existing:python --set-commit-hash HEAD + asv publish - uses: stefanzweifel/git-auto-commit-action@v4 with: From 0b25620b11cc861255583ad6b2cf2d912675e120 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 26 Jan 2026 11:38:13 +0100 Subject: [PATCH 7/8] Update ASV benchmarks workflow configuration Removed working-directory from ASV benchmarks step. --- .github/workflows/asv.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 2901ee55..69d11e1c 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -39,7 +39,6 @@ jobs: - run: ctest --preset test - run: python -m pip install -r requirements/asv.txt - name: Run ASV benchmarks - working-directory: scipp-benchmarks env: PYTHONPATH: ${{ github.workspace }}/install LD_LIBRARY_PATH: ${{ github.workspace }}/install/lib From ffd1213448cd9f29e401a55575e1cd86eb6d60c3 Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Tue, 8 Sep 2026 17:11:09 +0200 Subject: [PATCH 8/8] Update asv.yml --- .github/workflows/asv.yml | 68 ++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 69d11e1c..2dd3209f 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -4,56 +4,58 @@ on: schedule: - cron: '0 0 * * 0' workflow_dispatch: - pull_request: + pull_request: + +permissions: + contents: write jobs: build: name: Build and run benchmarks runs-on: ubuntu-24.04 - defaults: - run: - shell: bash -l {0} # required for conda env + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: - repository: 'scipp/scipp' + repository: scipp/scipp + ref: main submodules: true - fetch-depth: 0 # history required so cmake can determine version + fetch-depth: 0 - - name: Setup conda environment - uses: mamba-org/setup-micromamba@v2 + - uses: actions/checkout@v7 with: - micromamba-version: 2.5.0-1 - environment-file: .buildconfig/ci-linux.yml - cache-environment: true - create-args: python=3.11 + path: scipp-benchmarks - - uses: actions/checkout@v4 + - uses: prefix-dev/setup-pixi@v0.10.2 with: - path: 'scipp-benchmarks' - - - uses: hendrikmuhs/ccache-action@v1.2.20 - - - run: cmake --preset ci-linux - - run: cmake --build --preset build - - run: ctest --preset test - - run: python -m pip install -r requirements/asv.txt - - name: Run ASV benchmarks - env: - PYTHONPATH: ${{ github.workspace }}/install - LD_LIBRARY_PATH: ${{ github.workspace }}/install/lib - run: | - asv machine --machine cloud-container --os "Ubuntu" --arch 'x86_64' --cpu "2 Core CPU" --num_cpu 2 --ram '7GB' - asv update - asv run -v -m cloud-container -e --environment existing:python --set-commit-hash HEAD - asv publish - - - uses: stefanzweifel/git-auto-commit-action@v4 + pixi-version: v0.76.0 + environments: benchmark + frozen: true + + - name: Register benchmark machine + run: > + pixi run --frozen -e benchmark asv machine --yes + --machine github-ubuntu-24.04-pixi-py312 + + - name: Run benchmarks + run: > + pixi run --frozen -e benchmark bench + --machine github-ubuntu-24.04-pixi-py312 + + - name: Generate benchmark site + run: pixi run --frozen -e benchmark asv publish + + - name: Commit benchmark results + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: stefanzweifel/git-auto-commit-action@v4 with: repository: scipp-benchmarks + branch: main file_pattern: results/* + commit_message: Update benchmark results - name: Deploy benchmark results + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' uses: JamesIves/github-pages-deploy-action@v4.8.0 with: branch: gh_pages