-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |