File tree Expand file tree Collapse file tree 3 files changed +52
-2
lines changed Expand file tree Collapse file tree 3 files changed +52
-2
lines changed Original file line number Diff line number Diff 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
5556script :
5657 # Build library and collect into libs subdirectory
Original file line number Diff line number Diff line change @@ -24,6 +24,34 @@ 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+ 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+
2755function get_plat_tag {
2856 # Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC
2957
Original file line number Diff line number Diff 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+
4061function build_openblas {
4162 if [[ -z VIRTUAL_ENV ]]; then
4263 echo " must be run in a virtualenv"
You can’t perform that action at this time.
0 commit comments