Skip to content

Commit 681e607

Browse files
committed
Add system info in CI workflows run on self-hosted runners
fixes #1002
1 parent 534071e commit 681e607

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

.github/scripts/get_system_info.sh

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2023 Intel Corporation
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
8+
# get_system_info.sh - Script for printing system info
9+
10+
function check_L0_version {
11+
if command -v dpkg &> /dev/null; then
12+
dpkg -l | grep level-zero && return
13+
fi
14+
15+
if command -v rpm &> /dev/null; then
16+
rpm -qa | grep level-zero && return
17+
fi
18+
19+
if command -v zypper &> /dev/null; then
20+
zypper se level-zero && return
21+
fi
22+
23+
echo "level-zero not installed"
24+
}
25+
26+
function system_info {
27+
echo "**********system_info**********"
28+
cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*"
29+
cat /proc/version
30+
echo "**********SYCL-LS**********"
31+
source /opt/intel/oneapi/setvars.sh
32+
sycl-ls
33+
echo "**********VGA**********"
34+
lspci | grep VGA
35+
echo "**********CUDA Version**********"
36+
if command -v nvidia-smi &> /dev/null; then
37+
nvidia-smi
38+
else
39+
echo "CUDA not installed"
40+
fi
41+
echo "**********L0 Version**********"
42+
check_L0_version
43+
echo "**********ROCm Version**********"
44+
if command -v rocminfo &> /dev/null; then
45+
rocminfo
46+
else
47+
echo "ROCm not installed"
48+
fi
49+
echo "**********/proc/cmdline**********"
50+
cat /proc/cmdline
51+
echo "**********CPU info**********"
52+
lscpu
53+
echo "**********/proc/meminfo**********"
54+
cat /proc/meminfo
55+
echo "**********build/bin/urinfo**********"
56+
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo || true
57+
echo "******OpenCL*******"
58+
# The driver version of OpenCL Graphics is the compute-runtime version
59+
clinfo || echo "OpenCL not installed"
60+
echo "**********list-environment**********"
61+
echo "PATH=$PATH"
62+
echo
63+
echo "CPATH=$CPATH"
64+
echo
65+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
66+
echo
67+
echo "LIBRARY_PATH=$LIBRARY_PATH"
68+
echo
69+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
70+
echo
71+
echo "******list-build-system-versions*******"
72+
gcc --version 2>/dev/null || true
73+
echo
74+
clang --version 2>/dev/null || true
75+
echo
76+
make --version 2>/dev/null || true
77+
echo "**********/proc/modules**********"
78+
cat /proc/modules
79+
echo "***************installed-packages***************"
80+
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
81+
zypper se --installed-only 2>/dev/null || true
82+
apt list --installed 2>/dev/null || true
83+
yum list installed 2>/dev/null || true
84+
}
85+
86+
# Call the function above to print system info.
87+
system_info

.github/workflows/cmake.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ jobs:
221221
working-directory: ${{github.workspace}}/build
222222
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
223223

224+
- name: Get information about platform
225+
if: ${{ always() }}
226+
run: .github/scripts/get_system_info.sh
227+
224228
examples-build-hw:
225229
name: Build - examples on HW
226230
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
@@ -273,6 +277,10 @@ jobs:
273277
cat ${HOME}/.profile || true
274278
rm ${HOME}/.profile || true
275279
280+
- name: Get information about platform
281+
if: ${{ always() }}
282+
run: .github/scripts/get_system_info.sh
283+
276284
windows-build:
277285
name: Build - Windows
278286
strategy:

0 commit comments

Comments
 (0)