Skip to content

Commit

Permalink
Enable Mac build for all ops (tests are skipped for now)
Browse files Browse the repository at this point in the history
Signed-off-by: Yong Tang <[email protected]>
  • Loading branch information
yongtang committed Feb 26, 2019
1 parent 5b13be7 commit 3e77165
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
6 changes: 1 addition & 5 deletions .travis/bazel.build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
set -e

if [[ $(uname) == "Darwin" ]]; then
NOBUILD="-//tensorflow_io/ignite:all -//tensorflow_io/kafka:all -//tensorflow_io/kinesis:all"
fi

bazel build \
--noshow_progress \
--noshow_loading_progress \
--verbose_failures \
--test_output=errors \
-- //tensorflow_io/... $NOBUILD
-- //tensorflow_io/...
2 changes: 1 addition & 1 deletion .travis/build.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export TFIO_DATAPATH="bazel-bin"

if [[ $(uname) == "Linux" ]]; then
apt-get -y -qq update
apt-get -y -qq install python python3 ffmpeg > /dev/null
apt-get -y -qq install python python3 ffmpeg
curl -sSOL https://bootstrap.pypa.io/get-pip.py
for entry in python3 python ; do
$entry get-pip.py -q
Expand Down
4 changes: 2 additions & 2 deletions .travis/wheel.configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ if [[ $(uname) == "Darwin" ]]; then
delocate-wheel --version
else
apt-get -y -qq update
apt-get -y -qq install software-properties-common apt-transport-https > /dev/null
apt-get -y -qq install software-properties-common apt-transport-https
add-apt-repository -y ppa:deadsnakes/ppa
apt-get -y -qq update
apt-get -y -qq install python3 python3.5 python3.6 > /dev/null
apt-get -y -qq install python3 python3.5 python3.6

# Install patchelf
curl -sSOL https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2
Expand Down
8 changes: 4 additions & 4 deletions .travis/wheel.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ run_test() {
# If Linux just assume testing both python and python3
if [[ $(uname) == "Linux" ]]; then
apt-get -y -qq update
apt-get -y -qq install python python3 ffmpeg >/dev/null
apt-get -y -qq install python python3 ffmpeg
curl -sSOL https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py -q
run_test python3
Expand All @@ -25,13 +25,13 @@ if [[ ( $(uname) == "Darwin" ) || ( $(python -c 'import tensorflow as tf; print(
exit 0
fi

DEBIAN_FRONTEND=noninteractive apt-get -y -qq install software-properties-common apt-transport-https > /dev/null
DEBIAN_FRONTEND=noninteractive apt-get -y -qq install software-properties-common apt-transport-https
DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran35/"
DEBIAN_FRONTEND=noninteractive apt-get -y -qq update
# Note: libpython-dev libpython3-dev are needed to for reticulate to see python binding (/usr/lib/libpython2.7.so)
DEBIAN_FRONTEND=noninteractive apt-get -y -qq install libpython-dev libpython3-dev > /dev/null
DEBIAN_FRONTEND=noninteractive apt-get -y -qq install r-base > /dev/null
DEBIAN_FRONTEND=noninteractive apt-get -y -qq install libpython-dev libpython3-dev
DEBIAN_FRONTEND=noninteractive apt-get -y -qq install r-base
echo "options(repos = c(CRAN='http://cran.rstudio.com'))" >> ~/.Rprofile
R -e 'install.packages(c("tensorflow"), quiet = TRUE)'
R -e 'install.packages(c("testthat", "devtools"), quiet = TRUE)'
Expand Down
7 changes: 4 additions & 3 deletions third_party/curl.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ cc_library(
],
defines = ["CURL_STATICLIB"],
includes = ["include"],
linkopts = [
"-lrt",
],
linkopts = select({
"@bazel_tools//src/conditions:darwin": [],
"//conditions:default": ["-lrt"],
}),
visibility = ["//visibility:public"],
deps = [
"@zlib//:zlib",
Expand Down

0 comments on commit 3e77165

Please sign in to comment.