Skip to content

Commit 89f69e5

Browse files
xinyazhangjithunnair-amd
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 981c14e commit 89f69e5

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
@@ -1022,11 +1022,11 @@ if(USE_ROCM)
10221022
set(DISTRO_VERSION "")
10231023
foreach(line ${OS_RELEASE})
10241024
string(REGEX MATCH "^NAME=" DISTRO_NAME_MATCH ${line})
1025-
if(NOT DISTRO_NAME_MATCH STREQUAL "")
1025+
if (NOT DISTRO_NAME_MATCH STREQUAL "")
10261026
string(REGEX REPLACE "^NAME=\"(.*)\"" "\\1" DISTRO_NAME ${line})
10271027
endif()
10281028
string(REGEX MATCH "^VERSION_ID=" DISTRO_VERSION_MATCH ${line})
1029-
if(NOT DISTRO_VERSION_MATCH STREQUAL "")
1029+
if (NOT DISTRO_VERSION_MATCH STREQUAL "")
10301030
string(REGEX REPLACE "^VERSION_ID=\"(.*)\"" "\\1" DISTRO_VERSION ${line})
10311031
endif()
10321032
endforeach()

0 commit comments

Comments
 (0)