Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source
RUN bash /install/ubuntu_install_cmake_source.sh

COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh /googletest

ENV TVM_VENV /venv/apache-tvm-py3.7
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
Expand Down
21 changes: 12 additions & 9 deletions docker/install/ubuntu_install_googletest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ set -e
set -u
set -o pipefail

tmpdir=$(mktemp -d)
if [ $# -eq 0 ]; then
tmpdir=$(mktemp -d)

cleanup()
{
rm -rf "$tmpdir"
}
cleanup()
{
rm -rf "$tmpdir"
}

trap cleanup 0
trap cleanup 0
else
tmpdir=$1
mkdir -p "$tmpdir"
fi

# GoogleTest uses a Live-at-Head philosophy:
# https://github.com/google/googletest#live-at-head
Expand All @@ -38,16 +43,14 @@ repo_revision="830fb567285c63ab5b5873e2e8b02f2249864916"

archive_name="${repo_revision}.tar.gz"
archive_url="${repo_url}/archive/${archive_name}"
archive_folder="googletest-${repo_revision}"
archive_hash="10f10ed771efc64a1d8234a7e4801838a468f8990e5d6d8fcf63e89f8d1455c4f9c5adc0bb829669f381609a9abf84e4c91a7fdd7404630f375f38fb485ef0eb"

cd "$tmpdir"

curl -sL "${archive_url}" -o "${archive_name}"
echo "$archive_hash" ${archive_name} | sha512sum -c
tar xf "${archive_name}"
tar xf "${archive_name}" --strip-components=1

cd ${archive_folder}
mkdir build
cd build

Expand Down