Skip to content

Commit

Permalink
ci: Print version info for Ubuntu and CentOS runs (#1832)
Browse files Browse the repository at this point in the history
To clearly show what version was installed and what dependencies are used, this prints version info at the end of Ubuntu and CentOS workflows (regardless of build status so possibly failing when GRASS GIS does not build correctly). This includes dependencies and extended Python version info using the Python set in the GRASS_PYTHON variable.
  • Loading branch information
wenzeslaus committed Aug 31, 2021
1 parent f4f6285 commit 2b9a3ec
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/centos.yml
Expand Up @@ -56,3 +56,8 @@ jobs:
run: |
source $CONDA_ACTIVATE
.github/workflows/test_simple.sh
- name: Print installed versions
if: always()
run: |
source $CONDA_ACTIVATE
.github/workflows/print_versions.sh
13 changes: 13 additions & 0 deletions .github/workflows/print_versions.sh
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Print versions, esp. versions of dependencies.

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

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
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu.yml
Expand Up @@ -59,3 +59,7 @@ jobs:
name: testreport-${{ matrix.os }}
path: testreport
retention-days: 3

- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh

0 comments on commit 2b9a3ec

Please sign in to comment.