From d1f7e9900a9bb5a82d8d3002f36682502550022f Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 4 Jun 2024 10:29:24 +0200 Subject: [PATCH 1/5] Add benchmarks to ci. --- .github/workflows/ci.yaml | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 07cabab..0372785 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,3 +55,60 @@ jobs: python-version: "3.10" - name: Run pre-commit checks uses: pre-commit/action@v3.0.0 + + asv-benchmarks: + name: ASV benchmarks + runs-on: ubuntu-latest + + defaults: + run: + # see https://github.com/conda-incubator/setup-miniconda/#important + shell: bash -l {0} + + steps: + - name: Checkout branch + uses: actions/checkout@v3 + + - name: Fetch git history + run: git fetch --prune --unshallow + + - name: Set up Conda env + uses: mamba-org/setup-micromamba@v1 + with: + micromamba-version: '1.5.6-0' + environment-file: environment.yml + cache-environment: true + init-shell: bash + create-args: python=3.10 asv + + # https://github.com/airspeed-velocity/asv/pull/1403 + - name: Downgrade conda + run: conda install -n base -c conda-forge -y conda=23 + + # - name: Add micromamba to GITHUB_PATH + # run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" + + # # https://stackoverflow.com/questions/77617946/solve-conda-libmamba-solver-libarchive-so-19-error-after-updating-conda-to-23 + # - name: force mamba reinstall + # run: conda install -n base libarchive -c main --force-reinstall --solver classic -y + + # - name: Install repository + # run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e . + + # - name: Run ASV benchmarks + # run: | + # asv machine --machine github-runner --yes + # export OPENBLAS_NUM_THREADS=1 + # asv --config asv.conf.json run -m github-runner --quick --python=same + # asv --config asv.conf.json publish + + # - name: Upload ASV results + # uses: actions/upload-artifact@v4 + # with: + # name: asv-results + # path: html + + - name: asv continuous + run: | + asv machine --machine github-runner --yes + asv continuous origin/main HEAD --factor 1.2 --machine github-runner --config asv.conf.json -v From d61e5e39b886fad2526c2c57d5c8749b7ff0ec30 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 4 Jun 2024 10:39:48 +0200 Subject: [PATCH 2/5] -e --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0372785..d46b23a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -111,4 +111,4 @@ jobs: - name: asv continuous run: | asv machine --machine github-runner --yes - asv continuous origin/main HEAD --factor 1.2 --machine github-runner --config asv.conf.json -v + asv continuous origin/main HEAD --factor 1.2 --machine github-runner --config asv.conf.json -v -e From 87b9ea0554ee0e868c626db2018a67d4c06423de Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 4 Jun 2024 10:43:55 +0200 Subject: [PATCH 3/5] Try again. --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d46b23a..5af42e6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,6 +68,8 @@ jobs: steps: - name: Checkout branch uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} - name: Fetch git history run: git fetch --prune --unshallow @@ -111,4 +113,4 @@ jobs: - name: asv continuous run: | asv machine --machine github-runner --yes - asv continuous origin/main HEAD --factor 1.2 --machine github-runner --config asv.conf.json -v -e + asv continuous origin/main HEAD -e --factor 1.2 --machine github-runner --config asv.conf.json From 31d68d83c0e5a718355cb09d04bcab5effe2b2ee Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 4 Jun 2024 10:46:09 +0200 Subject: [PATCH 4/5] Add -v back in. --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5af42e6..81e077e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -113,4 +113,4 @@ jobs: - name: asv continuous run: | asv machine --machine github-runner --yes - asv continuous origin/main HEAD -e --factor 1.2 --machine github-runner --config asv.conf.json + asv continuous origin/main HEAD -e -v --factor 1.2 --machine github-runner --config asv.conf.json From 1f6fbe7b98a276a8be6bafb21c43c5882321f742 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 4 Jun 2024 11:03:56 +0200 Subject: [PATCH 5/5] cd benchmarks. --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81e077e..e68b78b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -112,5 +112,6 @@ jobs: - name: asv continuous run: | + cd benchmarks asv machine --machine github-runner --yes asv continuous origin/main HEAD -e -v --factor 1.2 --machine github-runner --config asv.conf.json