Skip to content

Commit 1a9f3dd

Browse files
committed
Install "libmambapy<2", pip and python in the benchmark workflow
Workaround airspeed-velocity/asv#1465. Signed-off-by: Julien Jerphanion <[email protected]>
1 parent 68d1f2a commit 1a9f3dd

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

.github/workflows/analysis_workflow.yml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
description: Specify regular expression for specific tests to be executed
2222
type: string
2323
default: ''
24-
24+
2525

2626
schedule: # Schedule the job to run at 12 a.m. daily
2727
- cron: '0 0 * * *'
@@ -33,29 +33,29 @@ on:
3333
jobs:
3434

3535
get_commits_to_benchmark:
36-
name: Get tag commits
36+
name: Get tag commits
3737
runs-on: ubuntu-22.04
38-
steps:
39-
- name: Checkout code
38+
steps:
39+
- name: Checkout code
4040
uses: actions/[email protected]
4141
with:
4242
fetch-depth: 0
4343
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }} # Note: This is dangerous if we run automatic CI on external PRs
4444

4545
- name: Get tags
4646
id: get_tags
47-
run: |
47+
run: |
4848
python3 build_tooling/get_commits_for_benchmark.py ${{ inputs.run_all_benchmarks == true && '--run_all_benchmarks' || ''}}
4949
outputs:
5050
matrix: ${{ steps.get_tags.outputs.commits }}
5151

5252

5353
benchmark_commits:
54-
needs: [get_commits_to_benchmark]
54+
needs: [get_commits_to_benchmark]
5555
strategy:
5656
fail-fast: false
57-
matrix:
58-
commits: ${{ fromJson(needs.get_commits_to_benchmark.outputs.matrix)}}
57+
matrix:
58+
commits: ${{ fromJson(needs.get_commits_to_benchmark.outputs.matrix)}}
5959
name: Benchmark commit ${{ matrix.commits }}
6060
uses: ./.github/workflows/benchmark_commits.yml
6161
secrets: inherit
@@ -67,7 +67,7 @@ jobs:
6767
suite_to_run: ${{ github.event_name == 'schedule' && 'ALL' || inputs.suite_to_run || 'LMDB'}}
6868
suite_overwrite: ${{ inputs.suite_overwrite || ''}}
6969

70-
publish_benchmark_results_to_gh_pages:
70+
publish_benchmark_results_to_gh_pages:
7171
name: Publish benchmark results to gh-pages
7272
if: ${{ github.event_name != 'pull_request_target' }} # only publish for the scheduled master builds
7373
needs: [benchmark_commits]
@@ -119,8 +119,8 @@ jobs:
119119
python build_tooling/transform_asv_results.py --mode extract
120120
python -m asv publish -v
121121
python -m asv gh-pages -v --rewrite
122-
123-
122+
123+
124124
run-asv-check-script:
125125
name: Executes asv tests checks
126126
timeout-minutes: 120
@@ -142,11 +142,11 @@ jobs:
142142
fetch-depth: 0
143143
submodules: recursive
144144
token: ${{ secrets.ARCTICDB_TEST_PAT }}
145-
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }} # Note: This is dangerous if we run automatic CI on external PRs
145+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }} # Note: This is dangerous if we run automatic CI on external PRs
146146

147147
- name: Configure sccache
148148
uses: mozilla-actions/[email protected]
149-
149+
150150
- name: Extra envs
151151
shell: bash -l {0}
152152
run: |
@@ -162,20 +162,31 @@ jobs:
162162
with:
163163
bucket: "arcticdb-asv-real-storage"
164164
aws_access_key: "${{ secrets.AWS_S3_ACCESS_KEY }}"
165-
aws_secret_key: "${{ secrets.AWS_S3_SECRET_KEY }}"
166-
165+
aws_secret_key: "${{ secrets.AWS_S3_SECRET_KEY }}"
166+
167+
# Workaround for https://github.com/airspeed-velocity/asv/issues/1465
168+
- name: Setup micromamba
169+
uses: mamba-org/setup-micromamba@v2
170+
with:
171+
micromamba-version: 2.1.0-0
172+
173+
- name: Install libmambapy
174+
shell: bash -el {0}
175+
run: |
176+
micromamba install -y -c conda-forge "libmambapy<2" pip python
177+
167178
- name: Install ASV
168179
shell: bash -el {0}
169180
run: |
170181
git config --global --add safe.directory .
171182
python -m pip install --upgrade pip
172-
pip install asv
183+
pip install asv
173184
asv machine --yes
174-
185+
175186
- name: Build project for ASV
176187
run: |
177188
python -m pip install -ve .[Testing]
178-
189+
179190
- name: Run ASV Tests Check script
180191
run: |
181192
python python/utils/asv_checks.py
@@ -222,8 +233,8 @@ jobs:
222233
# CMAKE_BUILD_PARALLEL_LEVEL: ${{vars.CMAKE_BUILD_PARALLEL_LEVEL}}
223234

224235
# - name: Prepare C++ compilation env
225-
# run: . build_tooling/prep_cpp_build.sh
226-
236+
# run: . build_tooling/prep_cpp_build.sh
237+
227238
# - name: CMake compile
228239
# # We are pinning the version to 10.6 because >= 10.7, use node20 which is not supported in the container
229240
# uses: lukka/[email protected]
@@ -234,7 +245,7 @@ jobs:
234245
# env:
235246
# ARCTICDB_DEBUG_FIND_PYTHON: ${{vars.ARCTICDB_DEBUG_FIND_PYTHON}}
236247
# python_impl_name: 'cp311'
237-
248+
238249
# - name: Run C++ Tests
239250
# shell: bash -l {0}
240251
# run: |
@@ -302,7 +313,7 @@ jobs:
302313
# with:
303314
# path: prev_coverage.txt
304315
# key: coverage
305-
316+
306317
# - name: Get and compare coverage if cache was restored
307318
# run: |
308319
# # if cache was restored, compare coverage

0 commit comments

Comments
 (0)