Skip to content

Commit f919b4b

Browse files
xinyazhangpruthvistony
authored andcommitted
Fixes CI build script (#1350)
* Fix the parsing of /etc/os-release The old code parses OS_DISTRO as 'PRETTY_Ubuntu' on Ubuntu and thus never links to libtinfo correctly. * Configurable CMAKE_PREFIX_PATH in CI script.
1 parent 3842431 commit f919b4b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.ci/pytorch/build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ else
8080
elif [[ -v ANACONDA_PYTHON_VERSION ]]; then
8181
export CMAKE_PREFIX_PATH="/opt/conda/envs/py_${ANACONDA_PYTHON_VERSION}"
8282
else
83-
# already checked by `! which conda`
84-
CMAKE_PREFIX_PATH="$(conda info --base)"
85-
export CMAKE_PREFIX_PATH
83+
export CMAKE_PREFIX_PATH="$(conda info --base)"
8684
fi
8785

8886
# Workaround required for MKL library linkage

cmake/Dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,11 +1001,11 @@ if(USE_ROCM)
10011001
set(DISTRO_VERSION "")
10021002
foreach(line ${OS_RELEASE})
10031003
string(REGEX MATCH "^NAME=" DISTRO_NAME_MATCH ${line})
1004-
if(NOT DISTRO_NAME_MATCH STREQUAL "")
1004+
if (NOT DISTRO_NAME_MATCH STREQUAL "")
10051005
string(REGEX REPLACE "^NAME=\"(.*)\"" "\\1" DISTRO_NAME ${line})
10061006
endif()
10071007
string(REGEX MATCH "^VERSION_ID=" DISTRO_VERSION_MATCH ${line})
1008-
if(NOT DISTRO_VERSION_MATCH STREQUAL "")
1008+
if (NOT DISTRO_VERSION_MATCH STREQUAL "")
10091009
string(REGEX REPLACE "^VERSION_ID=\"(.*)\"" "\\1" DISTRO_VERSION ${line})
10101010
endif()
10111011
endforeach()

0 commit comments

Comments
 (0)