Skip to content

Commit

Permalink
Merge pull request pmem#5655 from grom72/ci-env-show
Browse files Browse the repository at this point in the history
test: print out build system version
  • Loading branch information
janekmi authored May 18, 2023
2 parents 9c975da + 4f29fd8 commit 23ec9c9
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
with:
fetch-depth: 50

- name: Get system information
run: ./$WORKDIR/get-system-info.sh

- name: Pull or rebuild the image
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
with:
fetch-depth: 50

- name: Get system information
run: ./$WORKDIR/get-system-info.sh

- name: Pull or rebuild the image
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh rebuild

Expand Down
47 changes: 47 additions & 0 deletions utils/docker/get-system-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2023, Intel Corporation

#
# get-system-info.sh - Script for printing system info
#

function system_info {
echo "********** system_info **********"
cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*"
uname -r
echo "libndctl: $(pkg-config --modversion libndctl || echo 'libndctl not found')"
echo "valgrind: $(pkg-config --modversion valgrind || echo 'valgrind not found')"
echo "*************** installed-packages ***************"
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
zypper se --installed-only 2>/dev/null || true
apt list --installed 2>/dev/null || true
yum list installed 2>/dev/null || true
echo "**********/proc/cmdline**********"
cat /proc/cmdline
echo "**********/proc/modules**********"
cat /proc/modules
echo "**********/proc/cpuinfo**********"
cat /proc/cpuinfo
echo "**********/proc/meminfo**********"
cat /proc/meminfo
echo "**********/proc/swaps**********"
cat /proc/swaps
echo "**********/proc/version**********"
cat /proc/version
echo "**********check-updates**********"
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
zypper list-updates 2>/dev/null || true
apt-get update 2>/dev/null || true
apt upgrade --dry-run 2>/dev/null || true
dnf check-update 2>/dev/null || true
echo "**********list-enviroment**********"
env
echo "******list-build-system-versions*******"
gcc --version 2>/dev/null || true
clang --version 2>/dev/null || true
make --version 2>/dev/null || true
}

# Call the function above to print system info.
system_info
4 changes: 4 additions & 0 deletions utils/gha-runners/get-system-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ function system_info {
ls -la /sys/bus/nd/devices/ndbus*/region*/pfn*/resource
ls -la /sys/bus/nd/devices/ndbus*/region*/namespace*/resource
ls -la /sys/bus/nd/devices/region*/deep_flush
echo "******list-build-system-versions*******"
gcc --version 2>/dev/null || true
clang --version 2>/dev/null || true
make --version 2>/dev/null || true
}

# Call the function above to print system info.
Expand Down

0 comments on commit 23ec9c9

Please sign in to comment.