Skip to content
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

Removing dead code. #950

Merged
merged 2 commits into from
Jan 27, 2020
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
68 changes: 0 additions & 68 deletions tools/ci_build/builds/builds_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
# Common Bash functions used by build scripts

COLOR_NC='\033[0m'
COLOR_BOLD='\033[1m'
COLOR_LIGHT_GRAY='\033[0;37m'
COLOR_GREEN='\033[0;32m'
COLOR_RED='\033[0;31m'

Expand All @@ -32,16 +30,6 @@ die() {
exit 1
}

num_cpus() {
# Get the number of CPUs
N_CPUS=$(grep -c ^processor /proc/cpuinfo)
if [[ -z ${N_CPUS} ]]; then
die "ERROR: Unable to determine the number of CPUs"
fi

echo ${N_CPUS}
}

# List files changed (i.e., added, or revised) from
# the common ancestor of HEAD and the latest master branch.
# Usage: get_changed_files_from_master_branch
Expand All @@ -63,19 +51,6 @@ get_bazel_files_to_check() {
fi
}

# List python files changed that still exist,
# i.e., not removed.
# Usage: get_py_files_to_check [--incremental]
get_py_files_to_check() {
if [[ "$1" == "--incremental" ]]; then
get_changed_files_from_master_branch -- '*.py'
elif [[ -z "$1" ]]; then
find . -name '*.py'
else
die "Found unsupported args: $@ for get_py_files_to_check."
fi
}

# List .h|.cc files changed that still exist,
# i.e., not removed.
# Usage: get_clang_files_to_check [--incremental]
Expand All @@ -88,46 +63,3 @@ get_clang_files_to_check() {
die "Found unsupported args: $@ for get_clang_files_to_check."
fi
}

realpath() {
# Get the real path of a file
# Usage: realpath <file_path>

if [[ $# != "1" ]]; then
die "realpath: incorrect usage"
fi

[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}

to_lower () {
# Convert string to lower case.
# Usage: to_lower <string>

echo "$1" | tr '[:upper:]' '[:lower:]'
}

calc_elapsed_time() {
# Calculate elapsed time. Takes nanosecond format input of the kind output
# by date +'%s%N'
#
# Usage: calc_elapsed_time <START_TIME> <END_TIME>

if [[ $# != "2" ]]; then
die "calc_elapsed_time: incorrect usage"
fi

START_TIME=$1
END_TIME=$2

if [[ ${START_TIME} == *"N" ]]; then
# Nanosecond precision not available
START_TIME=$(echo ${START_TIME} | sed -e 's/N//g')
END_TIME=$(echo ${END_TIME} | sed -e 's/N//g')
ELAPSED="$(expr ${END_TIME} - ${START_TIME}) s"
else
ELAPSED="$(expr $(expr ${END_TIME} - ${START_TIME}) / 1000000) ms"
fi

echo ${ELAPSED}
}
2 changes: 0 additions & 2 deletions tools/ci_build/install/ci_requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions tools/ci_build/install/install_ci_dependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ if [[ ! -d "tensorflow_addons" ]]; then
exit 1
fi

# Install python dependencies:
CI_REQUIREMENT="$SCRIPT_DIR/ci_requirements.txt"
pip install ${QUIET_FLAG} -r ${CI_REQUIREMENT}

# Download buildifier.
wget ${QUIET_FLAG} https://github.com/bazelbuild/buildtools/releases/download/0.4.5/buildifier
chmod +x buildifier
Expand Down