Skip to content

Commit a92609c

Browse files
committed
add debugging to clean_code step
1 parent 696d68b commit a92609c

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ install:
4747
# Maybe get and clean and patch source
4848
- |
4949
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
50-
clean_code $REPO_DIR develop
50+
clean_code_local $REPO_DIR develop
5151
else
52-
clean_code $REPO_DIR $OPENBLAS_COMMIT
52+
clean_code_local $REPO_DIR $OPENBLAS_COMMIT
5353
fi
54+
echo done install step
5455
5556
script:
5657
# Build library and collect into libs subdirectory

tools/build_steps.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,28 @@ function before_build {
2424
fi
2525
}
2626

27+
function clean_code_local {
28+
set -ex
29+
# Copied from common_utils.sh, with added debugging
30+
local repo_dir=${1:-$REPO_DIR}
31+
local build_commit=${2:-$BUILD_COMMIT}
32+
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
33+
[ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
34+
# The package $repo_dir may be a submodule. git submodules do not
35+
# have a .git directory. If $repo_dir is copied around, tools like
36+
# Versioneer which require that it be a git repository are unable
37+
# to determine the version. Give submodule proper git directory
38+
# XXX no need to do this
39+
# fill_submodule "$repo_dir"
40+
pushd $repo_dir
41+
git fetch origin --tags
42+
git checkout $build_commit
43+
git clean -fxd
44+
git reset --hard
45+
git submodule update --init --recursive
46+
popd
47+
}
48+
2749
function get_plat_tag {
2850
# Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC
2951

tools/local_build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ function install_virtualenv {
3737
pip install virtualenv
3838
}
3939

40+
function clean_code_local {
41+
# Copied from common_utils.sh, with added debugging
42+
local repo_dir=${1:-$REPO_DIR}
43+
local build_commit=${2:-$BUILD_COMMIT}
44+
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
45+
[ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
46+
# The package $repo_dir may be a submodule. git submodules do not
47+
# have a .git directory. If $repo_dir is copied around, tools like
48+
# Versioneer which require that it be a git repository are unable
49+
# to determine the version. Give submodule proper git directory
50+
# XXX no need to do this
51+
# fill_submodule "$repo_dir"
52+
pushd $repo_dir
53+
git fetch origin --tags
54+
git checkout $build_commit
55+
git clean -fxd
56+
git reset --hard
57+
git submodule update --init --recursive
58+
popd
59+
}
60+
4061
function build_openblas {
4162
if [[ -z VIRTUAL_ENV ]]; then
4263
echo "must be run in a virtualenv"

0 commit comments

Comments
 (0)