Skip to content

Commit 63c82b0

Browse files
committed
try to fix coverage
1 parent 516f5b1 commit 63c82b0

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

scripts/ci_build_and_test_in_container.sh

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,38 @@ elif [ -f /usr/lib/x86_64-linux-gnu/libblas.so ]; then
88
BLAS_LIB=/usr/lib/x86_64-linux-gnu/libblas.so
99
LAPACK_LIB=/usr/lib/x86_64-linux-gnu/liblapack.so
1010
else
11-
echo "BLAS/LAPACK not found"; exit 1
11+
echo "BLAS/LAPACK not found";
12+
if [ -f /etc/os-release ]; then
13+
. /etc/os-release
14+
if [[ "$ID" == "ubuntu" || "$ID_LIKE" == "debian" ]]; then
15+
PACKAGE_MANAGER="apt"
16+
elif [[ "$ID" == "rhel" || "$ID_LIKE" == "rocky" ]]; then
17+
PACKAGE_MANAGER="yum"
18+
else
19+
echo "Unsupported OS: $ID"
20+
exit 1
21+
fi
22+
else
23+
echo "/etc/os-release not found. Unable to determine OS."
24+
exit 1
25+
fi
26+
27+
echo "Using package manager: $PACKAGE_MANAGER"
28+
29+
if [ "$PACKAGE_MANAGER" == "apt" ]; then
30+
apt update && apt-get install -y libblas-dev liblapack-dev
31+
elif [ "$PACKAGE_MANAGER" == "yum" ]; then
32+
yum update && yum install -y blas lapack
33+
fi
34+
1235
fi
1336

1437

15-
# if [ -f /etc/os-release ]; then
16-
# . /etc/os-release
17-
# if [[ "$ID" == "ubuntu" || "$ID_LIKE" == "debian" ]]; then
18-
# PACKAGE_MANAGER="apt"
19-
# elif [[ "$ID" == "rhel" || "$ID_LIKE" == "rhel fedora rocky centos" ]]; then
20-
# PACKAGE_MANAGER="yum"
21-
# else
22-
# echo "Unsupported OS: $ID"
23-
# exit 1
24-
# fi
25-
# else
26-
# echo "/etc/os-release not found. Unable to determine OS."
27-
# exit 1
28-
# fi
2938

3039

3140

32-
# echo "Using package manager: $PACKAGE_MANAGER"
3341

34-
# if [ "$PACKAGE_MANAGER" == "apt" ]; then
35-
# apt update && apt-get install -y libblas-dev liblapack-dev texlive-full
36-
# elif [ "$PACKAGE_MANAGER" == "yum" ]; then
37-
# yum update && yum install -y blas lapack
38-
# fi
42+
3943

4044
# The or_die function run the passed command line and
4145
# exits the program in case of non zero error code

0 commit comments

Comments
 (0)