Adding MacOS py38 builds.
PiperOrigin-RevId: 294918602 Change-Id: I97f02fff5dc25d23f068df29fe3626a61fdd8a33
This commit is contained in:
parent
5bad62a486
commit
d545a37ebd
@ -307,6 +307,9 @@ tensorflow/tools/ci_build/release/macos/cpu_py37_full/nonpip_v1.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py37_full/pip.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py37_full/pip_v1.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py37_full/release.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py38_full/nightly_release.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py38_full/nonpip.sh
|
||||
tensorflow/tools/ci_build/release/macos/cpu_py38_full/pip.sh
|
||||
tensorflow/tools/ci_build/release/ubuntu_16/cpu_py2_full/nightly_release.sh
|
||||
tensorflow/tools/ci_build/release/ubuntu_16/cpu_py2_full/nonpip.sh
|
||||
tensorflow/tools/ci_build/release/ubuntu_16/cpu_py2_full/nonpip_v1.sh
|
||||
|
@ -0,0 +1,72 @@
|
||||
#!/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
|
||||
|
||||
# Pick a version of xcode
|
||||
export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer
|
||||
sudo xcode-select -s "${DEVELOPER_DIR}"
|
||||
|
||||
install_macos_pip_deps sudo pip3.8
|
||||
|
||||
# For python3 path on Mac
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
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 python3.8)
|
||||
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
|
||||
|
||||
# test the whl pip package
|
||||
chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh
|
||||
./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${f}
|
||||
RETVAL=$?
|
||||
|
||||
# Upload the PIP package if whl test passes.
|
||||
if [ ${RETVAL} -eq 0 ]; then
|
||||
echo "Basic PIP test PASSED, Uploading package: ${f}"
|
||||
twine upload -r pypi-warehouse "${f}" || echo
|
||||
else
|
||||
echo "Basic PIP test FAILED, will not upload ${f} package"
|
||||
return 1
|
||||
fi
|
||||
done
|
@ -0,0 +1,53 @@
|
||||
#!/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
|
||||
export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer
|
||||
sudo xcode-select -s "${DEVELOPER_DIR}"
|
||||
python -m virtualenv tf_build_env --system-site-packages
|
||||
source tf_build_env/bin/activate
|
||||
|
||||
# Install macos pip dependencies
|
||||
install_macos_pip_deps sudo pip3.8
|
||||
|
||||
# Run configure.
|
||||
export TF_NEED_CUDA=0
|
||||
export CC_OPT_FLAGS='-mavx'
|
||||
export TF2_BEHAVIOR=1
|
||||
export PYTHON_BIN_PATH=$(which python3.8)
|
||||
yes "" | "$PYTHON_BIN_PATH" configure.py
|
||||
|
||||
tag_filters="-no_oss,-oss_serial,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
|
||||
# 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 \
|
||||
--action_env=TF2_BEHAVIOR="${TF2_BEHAVIOR}" \
|
||||
--build_tag_filters="${tag_filters}" \
|
||||
--test_tag_filters="${tag_filters}" -- \
|
||||
${DEFAULT_BAZEL_TARGETS} \
|
||||
-//tensorflow/lite/...
|
55
tensorflow/tools/ci_build/release/macos/cpu_py38_full/pip.sh
Normal file
55
tensorflow/tools/ci_build/release/macos/cpu_py38_full/pip.sh
Normal file
@ -0,0 +1,55 @@
|
||||
#!/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
|
||||
export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer
|
||||
sudo xcode-select -s "${DEVELOPER_DIR}"
|
||||
|
||||
# Install macos pip dependencies
|
||||
install_macos_pip_deps sudo pip3.8
|
||||
|
||||
# Export required variables for running pip_new.sh
|
||||
export OS_TYPE="MACOS"
|
||||
export CONTAINER_TYPE="CPU"
|
||||
export TF_PYTHON_VERSION='python3.8'
|
||||
export TF_BUILD_BOTH_CPU_PACKAGES=1
|
||||
|
||||
# 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_py38,-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
|
Loading…
x
Reference in New Issue
Block a user