File tree 3 files changed +52
-2
lines changed
3 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,11 @@ install:
47
47
# Maybe get and clean and patch source
48
48
- |
49
49
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
50
- clean_code $REPO_DIR develop
50
+ clean_code_local $REPO_DIR develop
51
51
else
52
- clean_code $REPO_DIR $OPENBLAS_COMMIT
52
+ clean_code_local $REPO_DIR $OPENBLAS_COMMIT
53
53
fi
54
+ echo done install step
54
55
55
56
script :
56
57
# Build library and collect into libs subdirectory
Original file line number Diff line number Diff line change @@ -24,6 +24,34 @@ function before_build {
24
24
fi
25
25
}
26
26
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
+ echo in $repo_dir
42
+ git fetch origin --tags
43
+ echo after git fetch origin
44
+ git checkout $build_commit
45
+ echo after git checkout $build_commit
46
+ git clean -fxd
47
+ echo after git clean
48
+ git reset --hard
49
+ echo after git reset
50
+ git submodule update --init --recursive
51
+ echo after git submodule update
52
+ popd
53
+ }
54
+
27
55
function get_plat_tag {
28
56
# Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC
29
57
Original file line number Diff line number Diff line change @@ -37,6 +37,27 @@ function install_virtualenv {
37
37
pip install virtualenv
38
38
}
39
39
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
+
40
61
function build_openblas {
41
62
if [[ -z VIRTUAL_ENV ]]; then
42
63
echo " must be run in a virtualenv"
You can’t perform that action at this time.
0 commit comments