diff --git a/benchmarks/linear_programming/utils/get_datasets.py b/benchmarks/linear_programming/utils/get_datasets.py index 2879cff2b..b89a16f54 100644 --- a/benchmarks/linear_programming/utils/get_datasets.py +++ b/benchmarks/linear_programming/utils/get_datasets.py @@ -16,6 +16,8 @@ import os import argparse import urllib.request +import urllib.parse +import ssl import subprocess @@ -662,7 +664,14 @@ def download(url, dst): if os.path.exists(dst): return print(f"Downloading {url} into {dst}...") - response = urllib.request.urlopen(url) + # Bypass SSL verification for plato.asu.edu URLs + if "plato.asu.edu" in url: + context = ssl.create_default_context() + context.check_hostname = False + context.verify_mode = ssl.CERT_NONE + response = urllib.request.urlopen(url, context=context) + else: + response = urllib.request.urlopen(url) data = response.read() with open(dst, "wb") as fp: fp.write(data) diff --git a/ci/thirdparty-testing/run_cvxpy_tests.sh b/ci/thirdparty-testing/run_cvxpy_tests.sh index 523b2fea3..6c5662877 100755 --- a/ci/thirdparty-testing/run_cvxpy_tests.sh +++ b/ci/thirdparty-testing/run_cvxpy_tests.sh @@ -17,6 +17,16 @@ set -e -u -o pipefail echo "building 'cvxpy' from source" + +PYTHON_VERSION=$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +PYTHON_MAJOR=$(echo "$PYTHON_VERSION" | cut -d. -f1) +PYTHON_MINOR=$(echo "$PYTHON_VERSION" | cut -d. -f2) + +if [ "$PYTHON_MAJOR" -lt 3 ] || { [ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -lt 11 ]; }; then + echo "Skipping cvxpy tests: Python version is less than 3.11 (found $PYTHON_VERSION)" + exit 0 +fi + git clone https://github.com/cvxpy/cvxpy.git pushd ./cvxpy || exit 1 pip wheel \