提交 c8f33b75 编写于 作者: M Mihai Maruseac

Remove py2 macos scripts

上级 f08d79be
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
set_bazel_outdir
# Install dependencies
install_macos_pip_deps sudo
sudo pip install twine
./tensorflow/tools/ci_build/update_version.py --nightly
# Run configure.
export TF_NEED_CUDA=0
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python2)
yes "" | "$PYTHON_BIN_PATH" configure.py
# Build the pip package
bazel build --config=opt --config=v2 tensorflow/tools/pip_package:build_pip_package
mkdir pip_pkg
./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag
# Copy and rename to tf_nightly
for f in $(ls pip_pkg/tf_nightly_cpu-*dev*macosx*.whl); do
copy_to_new_project_name "${f}" tf_nightly
done
# Upload the built packages to pypi.
for f in $(ls pip_pkg/tf_nightly*dev*macosx*.whl); do
echo "Uploading package: ${f}"
twine upload -r pypi-warehouse "${f}" || echo
done
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
bazel version
set_bazel_outdir
# Pick a more recent version of xcode
sudo xcode-select --switch /Applications/Xcode_10.3.app/Contents/Developer
python -m virtualenv tf_build_env --system-site-packages
source tf_build_env/bin/activate
# Install macos pip dependencies
install_macos_pip_deps sudo
# Run configure.
export TF_NEED_CUDA=0
export CC_OPT_FLAGS='-mavx'
export TF2_BEHAVIOR=1
export PYTHON_BIN_PATH=$(which python2)
yes "" | "$PYTHON_BIN_PATH" configure.py
# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/PRESUBMIT_BUILD_TARGETS.sh
tag_filters="-no_oss,-oss_serial,-nomac,-no_mac,-no_oss_py2,-v1only,-gpu,-tpu,-benchmark-test"
# Run tests
bazel test --test_output=errors --config=opt \
--action_env=TF2_BEHAVIOR="${TF2_BEHAVIOR}" \
--build_tag_filters="${tag_filters}" \
--test_tag_filters="${tag_filters}" -- \
${DEFAULT_BAZEL_TARGETS} \
-//tensorflow/lite/...
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
bazel version
set_bazel_outdir
# Pick a more recent version of xcode
sudo xcode-select --switch /Applications/Xcode_9.2.app/Contents/Developer
# Install pip dependencies
python -m virtualenv tf_build_env --system-site-packages
source tf_build_env/bin/activate
install_macos_pip_deps sudo
# Run configure.
export TF_NEED_CUDA=0
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python2)
yes "" | "$PYTHON_BIN_PATH" configure.py
# TODO(b/122370901): Fix nomac, no_mac inconsistency.
tag_filters="-no_oss,-oss_serial,-nomac,-no_mac,-no_oss_py2"
# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/PRESUBMIT_BUILD_TARGETS.sh
# Run tests
bazel test --test_output=errors --config=opt \
--incompatible_depset_union=false \
--build_tag_filters="${tag_filters}" \
--test_tag_filters="${tag_filters}" -- \
${DEFAULT_BAZEL_TARGETS} \
-//tensorflow/lite/...
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
bazel version
set_bazel_outdir
# Pick a more recent version of xcode
sudo xcode-select --switch /Applications/Xcode_10.3.app/Contents/Developer
# Install macos pip dependencies
install_macos_pip_deps sudo
# Export required variables for running pip.sh
export OS_TYPE="MACOS"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python2'
# Run configure.
export TF_NEED_CUDA=0
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py
# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=opt --config=v2"
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
export TF_TEST_TARGETS="//tensorflow/python/..."
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
export TF_TEST_FILTER_TAGS='-nomac,-no_mac,-no_oss,-oss_serial,-no_oss_py2,-v1only,-gpu,-tpu,-benchmark-test'
export IS_NIGHTLY=0 # Not nightly
export TF_PROJECT_NAME="tensorflow"
export TF_PIP_TEST_ROOT="pip_test"
./tensorflow/tools/ci_build/builds/pip_new.sh
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
bazel version
set_bazel_outdir
# Install pip dependencies
install_macos_pip_deps sudo
# Export required variables for running pip.sh
export OS_TYPE="MACOS"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python2'
# Run configure.
export TF_NEED_CUDA=0
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py
# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=opt"
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going"
export TF_TEST_TARGETS="//tensorflow/python/..."
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
export TF_TEST_FILTER_TAGS='-nomac,-no_mac,-no_oss,-oss_serial,-no_oss_py2'
export IS_NIGHTLY=0 # Not nightly
export TF_PROJECT_NAME="tensorflow"
export TF_PIP_TEST_ROOT="pip_test"
./tensorflow/tools/ci_build/builds/pip_new.sh
# Copy and rename to tensorflow_cpu
for WHL_PATH in $(ls ${TF_ARTIFACTS_DIR}/tensorflow/${TF_PIP_TEST_ROOT}/whl/tensorflow*.whl); do
copy_to_new_project_name "${WHL_PATH}" tensorflow_cpu
done
#!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Install latest bazel
update_bazel_macos
which bazel
# Pick a more recent version of xcode
sudo xcode-select --switch /Applications/Xcode_9.2.app/Contents/Developer
# Set bazel temporary directory to avoid space issues.
export TEST_TMPDIR=/tmpfs/bazel_tmp
mkdir "${TEST_TMPDIR}"
source tensorflow/tools/ci_build/builds/builds_common.sh
# Do the pyenv shim thing to avoid build breakages.
export PATH=$(echo "$PATH" | sed "s#${HOME}/.pyenv/shims:##g")
# Fix numpy version
sudo pip2 install numpy==1.12.1
sudo pip2 install grpcio
sudo pip2 install --upgrade setuptools==39.1.0
py_ver="2"
bazel clean
export TF_ENABLE_XLA=1
export TF_NEED_GCP=1
export TF_NEED_HDFS=1
export TF_NEED_S3=1
export PYTHON_BIN_PATH=$(which python"${py_ver}")
yes "" | "$PYTHON_BIN_PATH" configure.py
tag_filters="-no_oss,-oss_serial,-benchmark-test,-nomac,-no_mac,-no_oss_py2"
bazel test --test_output=errors -c opt \
--test_tag_filters="${tag_filters}" \
--build_tag_filters="${tag_filters}" \
--distinct_host_configuration=false --build_tests_only \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 \
--test_timeout 300,450,1200,3600 -- \
//tensorflow/... -//tensorflow/compiler/...
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册