From 1fc3fe57dacda7402738c27e2e7dc306d1f8a041 Mon Sep 17 00:00:00 2001 From: A5rocks Date: Sun, 1 Sep 2024 10:45:17 +0900 Subject: [PATCH] Is it a problem in `ci.sh`? --- ci.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/ci.sh b/ci.sh index 419889ad0..8d3f51fd4 100755 --- a/ci.sh +++ b/ci.sh @@ -1,18 +1,38 @@ -#!/bin/bash - -set -ex -o pipefail +# disable warnings about pyright being out of date +# used in test_exports and in check.sh +export PYRIGHT_PYTHON_IGNORE_WARNINGS=1 # Log some general info about the environment +echo "::group::Environment" uname -a env | sort +echo "::endgroup::" +# Curl's built-in retry system is not very robust; it gives up on lots of +# network errors that we want to retry on. Wget might work better, but it's +# not installed on azure pipelines's windows boxes. So... let's try some good +# old-fashioned brute force. (This is also a convenient place to put options +# we always want, like -f to tell curl to give an error if the server sends an +# error response, and -L to follow redirects.) +function curl-harder() { + for BACKOFF in 0 1 2 4 8 15 15 15 15; do + sleep $BACKOFF + if curl -fL --connect-timeout 5 "$@"; then + return 0 + fi + done + return 1 +} ################################################################ # We have a Python environment! ################################################################ +echo "::group::Versions" python -c "import sys, struct, ssl; print('python:', sys.version); print('version_info:', sys.version_info); print('bits:', struct.calcsize('P') * 8); print('openssl:', ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO)" +echo "::endgroup::" +echo "::group::Install dependencies" python -m pip install -U pip uv -c test-requirements.txt python -m pip --version python -m uv --version