Skip to content

add debugging to clean_code step #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2025
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ install:
# Maybe get and clean and patch source
- |
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
clean_code $REPO_DIR develop
clean_code_local $REPO_DIR develop
else
clean_code $REPO_DIR $OPENBLAS_COMMIT
clean_code_local $REPO_DIR $OPENBLAS_COMMIT
fi
echo done install step

script:
# Build library and collect into libs subdirectory
Expand Down
28 changes: 28 additions & 0 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,34 @@ function before_build {
fi
}

function clean_code_local {
set -ex
# Copied from common_utils.sh, with added debugging
local repo_dir=${1:-$REPO_DIR}
local build_commit=${2:-$BUILD_COMMIT}
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
[ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
# The package $repo_dir may be a submodule. git submodules do not
# have a .git directory. If $repo_dir is copied around, tools like
# Versioneer which require that it be a git repository are unable
# to determine the version. Give submodule proper git directory
# XXX no need to do this
# fill_submodule "$repo_dir"
pushd $repo_dir
echo in $repo_dir
git fetch origin --tags
echo after git fetch origin
git checkout $build_commit
echo after git checkout $build_commit
git clean -fxd
echo after git clean
git reset --hard
echo after git reset
git submodule update --init --recursive
echo after git submodule update
popd
}

function get_plat_tag {
# Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC

Expand Down
21 changes: 21 additions & 0 deletions tools/local_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,27 @@ function install_virtualenv {
pip install virtualenv
}

function clean_code_local {
# Copied from common_utils.sh, with added debugging
local repo_dir=${1:-$REPO_DIR}
local build_commit=${2:-$BUILD_COMMIT}
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
[ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
# The package $repo_dir may be a submodule. git submodules do not
# have a .git directory. If $repo_dir is copied around, tools like
# Versioneer which require that it be a git repository are unable
# to determine the version. Give submodule proper git directory
# XXX no need to do this
# fill_submodule "$repo_dir"
pushd $repo_dir
git fetch origin --tags
git checkout $build_commit
git clean -fxd
git reset --hard
git submodule update --init --recursive
popd
}

function build_openblas {
if [[ -z VIRTUAL_ENV ]]; then
echo "must be run in a virtualenv"
Expand Down
Loading