Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(perf-check): improved python support #129

Merged
merged 5 commits into from
Mar 15, 2021
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
12 changes: 9 additions & 3 deletions scripts/check_performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ echo "Prerequisites"
echo -n "Python version >= 3.8 ..... "

# Need python3
command -v python3 >/dev/null 2>&1 || { echo "python3 required. Please install first"; exit 1; }
if command -v python3.8 >/dev/null 2>&1
then
PYTHON=python3.8
else
PYTHON=python3
fi
command -v $PYTHON >/dev/null 2>&1 || { echo "python3 required. Please install first"; exit 1; }

if ! python3 -c 'import sys; assert sys.version_info >= (3,8)' > /dev/null 2>&1; then
if ! $PYTHON -c 'import sys; assert sys.version_info >= (3,8)' > /dev/null 2>&1; then
echo "Python version 3.8 or higher required."
exit 1
fi
Expand All @@ -36,4 +42,4 @@ fi
echo

# Run the check
python3 .maintain/bench-check/bench_check.py $*
$PYTHON .maintain/bench-check/bench_check.py $*