Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/test_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,16 @@ jobs:
- name: Check if benchopt is compatible with this benchmark
id: check_min_version
run: |
min_version=$(grep -Po 'min_benchopt_version = "\K[^"]*' ${{ inputs.benchmark_dir }}/objective.py || echo "0.0")
if [[ "$BENCHOPT_VERSION" == "git" ]]
# Delegate the version comparison to benchopt (>=1.10.0). Old
# benchopt without `info --version` falls through to compatible=true
# so the test runs instead of being silently skipped.
if [[ "$BENCHOPT_VERSION" == "git" ]] \
|| ! benchopt info --help | grep -q -- '--version' \
|| benchopt info ${{ inputs.benchmark_dir }} --version
then
# Always test dev version
benchopt_version="99.0"
echo "compatible=true" >> $GITHUB_OUTPUT
else
benchopt_version=$(benchopt --version)
fi
echo "$benchopt_version and $min_version"
if [[ "$benchopt_version" < "$min_version" ]]
then
echo "not compatible"
echo "compatible=false" >> $GITHUB_OUTPUT
else
echo "compatible"
echo "compatible=true" >> $GITHUB_OUTPUT
fi

- name: Test
Expand Down
Loading