Unverified Commit 1a7e2583 authored by Michał Karzyński's avatar Michał Karzyński Committed by GitHub

Add OS X to Travis (#1527)

parent e6dad531
......@@ -26,7 +26,7 @@ COPY . /root/ngraph
RUN mkdir /root/ngraph/build
WORKDIR /root/ngraph/build
RUN cmake .. -L -DNGRAPH_CPU_ENABLE=FALSE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE -DCMAKE_INSTALL_PREFIX="~/ngraph_dist"
RUN cmake .. -L -DNGRAPH_CPU_ENABLE=FALSE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE
RUN make -j"$(nproc)"
RUN make install
......
FROM ubuntu:16.04
#buildtype argument
ARG buildtype=regular
# nGraph dependencies
RUN apt-get update && apt-get install -y \
build-essential \
......@@ -28,6 +25,7 @@ RUN apt-get update && apt-get install -y \
python3-dev \
python-pip && \
apt-get clean autoclean && apt-get autoremove -y
RUN pip install --upgrade pip setuptools wheel
RUN pip install tox
......@@ -35,15 +33,8 @@ RUN pip install tox
COPY . /root/ngraph
RUN mkdir /root/ngraph/build
WORKDIR /root/ngraph/build
RUN if [ "$buildtype" = "interpreter" ] ; then \
cmake .. -DNGRAPH_CPU_ENABLE=FALSE -DNGRAPH_USE_PREBUILT_LLVM=TRUE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE\
-DCMAKE_INSTALL_PREFIX="~/ngraph_dist";\
else \
cmake .. -DNGRAPH_USE_PREBUILT_LLVM=TRUE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE -DCMAKE_INSTALL_PREFIX="~/ngraph_dist" ;\
fi
RUN make
RUN cmake .. -DNGRAPH_CPU_ENABLE=FALSE -DNGRAPH_USE_PREBUILT_LLVM=TRUE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE -DCMAKE_INSTALL_PREFIX="~/ngraph_dist"
RUN make -j"$(nproc)"
RUN make install
# Prepare nGraph Python API
......
sudo: required
language: cpp
services:
- docker
git:
depth: false
env:
- TASK=cpp_test OS=ubuntu
- TASK=cpp_test OS=centos
- TASK=python2_test OS=ubuntu
- TASK=python3_test OS=ubuntu
before_install:
- |
if [ "TASK" == "cpp_test" ]; then
docker build -t test_ngraph -f .ci/travis/$OS/Dockerfile .
else
docker build -t test_ngraph -f .ci/travis/$OS/Dockerfile --build-arg buildtype=interpreter .
fi
install: true
matrix:
include:
- os: linux
sudo: required
services: docker
env: TASK=python2_test OS=ubuntu
- os: linux
sudo: required
services: docker
env: TASK=python3_test OS=ubuntu
- os: linux
sudo: required
services: docker
env: TASK=cpp_test OS=ubuntu
- os: linux
sudo: required
services: docker
env: TASK=cpp_test OS=centos
- os: osx
env: TASK=cpp_test OS=osx
install:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker build -t test_ngraph -f .ci/travis/$OS/Dockerfile .
fi
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
mkdir $TRAVIS_BUILD_DIR/build
cd $TRAVIS_BUILD_DIR/build
cmake .. -DNGRAPH_CPU_ENABLE=FALSE \
-DNGRAPH_USE_PREBUILT_LLVM=TRUE \
-DNGRAPH_ONNX_IMPORT_ENABLE=TRUE \
-DCMAKE_INSTALL_PREFIX="~/ngraph_dist"
make -j 2
fi
script:
- .ci/travis/run_test.sh
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
.ci/travis/run_test.sh
fi
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
cd $TRAVIS_BUILD_DIR/build
make unit-test-check
fi
branches:
only:
- "master"
- "master"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment