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 ...@@ -26,7 +26,7 @@ COPY . /root/ngraph
RUN mkdir /root/ngraph/build RUN mkdir /root/ngraph/build
WORKDIR /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 -j"$(nproc)"
RUN make install RUN make install
......
FROM ubuntu:16.04 FROM ubuntu:16.04
#buildtype argument
ARG buildtype=regular
# nGraph dependencies # nGraph dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
build-essential \ build-essential \
...@@ -28,6 +25,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -28,6 +25,7 @@ RUN apt-get update && apt-get install -y \
python3-dev \ python3-dev \
python-pip && \ python-pip && \
apt-get clean autoclean && apt-get autoremove -y apt-get clean autoclean && apt-get autoremove -y
RUN pip install --upgrade pip setuptools wheel RUN pip install --upgrade pip setuptools wheel
RUN pip install tox RUN pip install tox
...@@ -35,15 +33,8 @@ RUN pip install tox ...@@ -35,15 +33,8 @@ RUN pip install tox
COPY . /root/ngraph COPY . /root/ngraph
RUN mkdir /root/ngraph/build RUN mkdir /root/ngraph/build
WORKDIR /root/ngraph/build WORKDIR /root/ngraph/build
RUN cmake .. -DNGRAPH_CPU_ENABLE=FALSE -DNGRAPH_USE_PREBUILT_LLVM=TRUE -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE -DCMAKE_INSTALL_PREFIX="~/ngraph_dist"
RUN if [ "$buildtype" = "interpreter" ] ; then \ RUN make -j"$(nproc)"
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 make install RUN make install
# Prepare nGraph Python API # Prepare nGraph Python API
......
sudo: required
language: cpp language: cpp
services:
- docker
git: git:
depth: false depth: false
env: matrix:
- TASK=cpp_test OS=ubuntu include:
- TASK=cpp_test OS=centos - os: linux
- TASK=python2_test OS=ubuntu sudo: required
- TASK=python3_test OS=ubuntu services: docker
env: TASK=python2_test OS=ubuntu
before_install: - os: linux
- | sudo: required
if [ "TASK" == "cpp_test" ]; then services: docker
docker build -t test_ngraph -f .ci/travis/$OS/Dockerfile . env: TASK=python3_test OS=ubuntu
else - os: linux
docker build -t test_ngraph -f .ci/travis/$OS/Dockerfile --build-arg buildtype=interpreter . sudo: required
fi services: docker
env: TASK=cpp_test OS=ubuntu
install: true - 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: 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: branches:
only: 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