Skip to content

Commit

Permalink
CI: Print Python version first (#3718)
Browse files Browse the repository at this point in the history
* Print first version of Python.
* Print also Git version which we use during build (when available and it is available in the CI).
* Print GRASS versions last because they actually need the build to be successful and this purposefully runs even for failures.
  • Loading branch information
wenzeslaus authored May 19, 2024
1 parent 0a16d5d commit 25961a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/print_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

# Print versions, esp. versions of dependencies.

# fail on non-zero return code from a subprocess
set -e
python --version
python3 --version

# We use Git during build.
git --version

# This will fail if the build failed.
grass --version
grass --tmp-location XY --exec g.version -e
# Detailed Python version info (in one line thanks to echo)
grass --tmp-location XY --exec bash -c "echo Python: \$(\$GRASS_PYTHON -c 'import sys; print(sys.version)')"
python3 --version
python --version

0 comments on commit 25961a8

Please sign in to comment.