From 22f9ebd7edeeea4ecf1549dd7e3c848277034fef Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sun, 24 Sep 2017 20:22:25 +0900 Subject: [PATCH] Use CentOS 6 (instead of 7) on Travis CI, whenever possible --- .travis.yml | 24 ++++++++++++++++++++++-- README.md | 7 ++++++- ci/install-travis.sh | 20 ++++++++++++-------- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 051f81512e6..1ea9e1bc153 100644 --- a/.travis.yml +++ b/.travis.yml @@ -351,7 +351,7 @@ matrix: - jdk: oraclejdk8 os: linux - env: PROJ=opencv,chilitags,flandmark,openblas,mxnet,hdf5,caffe OS=linux-x86 + env: PROJ=opencv,flandmark,openblas,hdf5,caffe OS=linux-x86 install: true script: ./ci/install-travis.sh - jdk: oraclejdk8 @@ -394,6 +394,11 @@ matrix: env: PROJ=artoolkitplus OS=linux-x86 install: true script: ./ci/install-travis.sh + - jdk: oraclejdk8 + os: linux + env: PROJ=chilitags OS=linux-x86 + install: true + script: ./ci/install-travis.sh - jdk: oraclejdk8 os: linux env: PROJ=mkl OS=linux-x86 @@ -424,6 +429,11 @@ matrix: env: PROJ=cuda OS=linux-x86 install: true script: ./ci/install-travis.sh + - jdk: oraclejdk8 + os: linux + env: PROJ=mxnet OS=linux-x86 + install: true + script: ./ci/install-travis.sh - jdk: oraclejdk8 os: linux env: PROJ=tensorflow OS=linux-x86 @@ -447,7 +457,7 @@ matrix: - jdk: oraclejdk8 os: linux - env: PROJ=opencv,chilitags,flandmark,openblas,mxnet,hdf5,caffe OS=linux-x86_64 + env: PROJ=opencv,flandmark,openblas,hdf5,caffe OS=linux-x86_64 install: true script: ./ci/install-travis.sh - jdk: oraclejdk8 @@ -490,6 +500,11 @@ matrix: env: PROJ=artoolkitplus OS=linux-x86_64 install: true script: ./ci/install-travis.sh + - jdk: oraclejdk8 + os: linux + env: PROJ=chilitags OS=linux-x86_64 + install: true + script: ./ci/install-travis.sh - jdk: oraclejdk8 os: linux env: PROJ=mkl OS=linux-x86_64 @@ -520,6 +535,11 @@ matrix: env: PROJ=cuda OS=linux-x86_64 install: true script: ./ci/install-travis.sh + - jdk: oraclejdk8 + os: linux + env: PROJ=mxnet OS=linux-x86_64 + install: true + script: ./ci/install-travis.sh - jdk: oraclejdk8 os: linux env: PROJ=tensorflow OS=linux-x86_64 diff --git a/README.md b/README.md index 9925a0ff779..1e29a9243bb 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,12 @@ Once everything installed and configured, simply execute ```bash $ mvn install --projects .,opencv,ffmpeg,flycapture,libdc1394,libfreenect,videoinput,artoolkitplus,etc. ``` -inside the directory containing the parent `pom.xml` file, by specifying only the desired child modules in the command, but **without the leading period "." in the comma-separated list of projects, the parent `poml.xml` file itself might not get installed.** Please refer to the comments inside the `pom.xml` file for further details. +inside the directory containing the parent `pom.xml` file, by specifying only the desired child modules in the command, but **without the leading period "." in the comma-separated list of projects, the parent `poml.xml` file itself might not get installed.** Please refer to the comments inside the `pom.xml` file for further details. From the "platform" subdirectory, we can also install the "platform" artifacts with a similar command: + +```bash +$ cd platform +$ mvn install --projects ../opencv/platform,../ffmpeg/platform,etc. -Djavacpp.platform.host +``` ### The `cppbuild.sh` scripts diff --git a/ci/install-travis.sh b/ci/install-travis.sh index 427de8e7035..211309978da 100755 --- a/ci/install-travis.sh +++ b/ci/install-travis.sh @@ -13,12 +13,16 @@ touch $HOME/vars.list if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ android ]]; then + CENTOS_VERSION=6 + if [[ "libfreenect2 librealsense chilitags llvm mxnet tensorflow skia " =~ "$PROJ " ]] || [[ "$OS" =~ android ]]; then + CENTOS_VERSION=7 + fi echo "Starting docker for x86_64 and x86 linux" - docker run -d -ti -e CI_DEPLOY_USERNAME -e CI_DEPLOY_PASSWORD -e "container=docker" -v $HOME:$HOME -v $TRAVIS_BUILD_DIR/../:$HOME/build -v /sys/fs/cgroup:/sys/fs/cgroup nvidia/cuda:8.0-cudnn6-devel-centos7 /usr/sbin/init > /dev/null + docker run -d -ti -e CI_DEPLOY_USERNAME -e CI_DEPLOY_PASSWORD -e "container=docker" -v $HOME:$HOME -v $TRAVIS_BUILD_DIR/../:$HOME/build -v /sys/fs/cgroup:/sys/fs/cgroup nvidia/cuda:8.0-cudnn6-devel-centos$CENTOS_VERSION /bin/bash > /dev/null DOCKER_CONTAINER_ID=$(docker ps | grep centos | awk '{print $1}') echo "Container id is $DOCKER_CONTAINER_ID please wait while updates applied" - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install epel-release" > /dev/null - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install clang gcc-c++ gcc-gfortran java-devel maven python numpy swig git file which wget unzip tar bzip2 gzip xz patch make cmake3 libtool perl nasm yasm alsa-lib-devel freeglut-devel glfw-devel gtk2-devel libusb-devel libusb1-devel zlib-devel SDL-devel" > /dev/null + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install centos-release-scl-rh epel-release" > /dev/null + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install devtoolset-3-toolchain maven30 clang gcc-c++ gcc-gfortran java-devel maven python numpy swig git file which wget unzip tar bzip2 gzip xz patch make cmake3 libtool perl nasm yasm alsa-lib-devel freeglut-devel glfw-devel gtk2-devel libusb-devel libusb1-devel zlib-devel SDL-devel" > /dev/null if [ "$OS" == "linux-x86" ]; then docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "rpm -qa | sed s/.x86_64$/.i686/ | xargs yum -y install > /dev/null" fi @@ -247,20 +251,20 @@ if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ a while true; do echo .; docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "tail -10 $HOME/build/javacpp-presets/buildlogs/$PROJ.log"; sleep 300; done & if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then echo "Not a pull request so attempting to deploy using docker" - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets; /opt/rh/maven30/root/usr/bin/mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? else echo "Pull request so install using docker" - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Dmaven.javadoc.skip=true -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets; /opt/rh/maven30/root/usr/bin/mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Dmaven.javadoc.skip=true -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? fi else if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then echo "Not a pull request so attempting to deploy using docker" - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets; /opt/rh/maven30/root/usr/bin/mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? if [ $BUILD_STATUS -eq 0 ]; then echo "Deploying platform" for i in ${PROJ//,/ } do - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cd $HOME/build/javacpp-presets/$i; mvn -U -f platform/pom.xml -Djavacpp.platform=$OS --settings ../ci/settings.xml deploy"; export BUILD_STATUS=$? + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cd $HOME/build/javacpp-presets/$i; /opt/rh/maven30/root/usr/bin/mvn -U -f platform/pom.xml -Djavacpp.platform=$OS --settings ../ci/settings.xml deploy"; export BUILD_STATUS=$? if [ $BUILD_STATUS -ne 0 ]; then echo "Build Failed" exit $BUILD_STATUS @@ -270,7 +274,7 @@ if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ a else echo "Pull request so install using docker" - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets; /opt/rh/maven30/root/usr/bin/mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \$BUILD_COMPILER \$BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? fi fi echo "Build status $BUILD_STATUS"