From bf1596025c13be38707013e8bcff423d23d8e9e8 Mon Sep 17 00:00:00 2001 From: Faruk D Date: Thu, 1 Mar 2018 17:50:01 +0100 Subject: [PATCH] add script to test ubuntu builds --- .travis.yml | 15 ++------------- test-builds/test-ubuntu.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100755 test-builds/test-ubuntu.sh diff --git a/.travis.yml b/.travis.yml index ece831b..a9e8ca4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: before_install: - docker pull ubuntu:xenial - - docker run -itd --name ubuntu-build ubuntu:xenial + - docker run -itd -v "${TRAVIS_BUILD_DIR}:/travis/workdir" --name ubuntu-build ubuntu:xenial script: - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) @@ -24,16 +24,5 @@ script: - docker exec ubuntu-build apt-get update -y - docker exec ubuntu-build apt-get install -y git cmake g++ pkg-config libcfitsio-bin libcfitsio-dev libopenblas-base libopenblas-dev wcslib-dev wcslib-tools libglib2.0-dev libcasa-casa2 casacore-dev casacore-data casacore-tools - | - docker exec --env BRANCH=$BRANCH ubuntu-build \ - echo "Building SageCal" && \ - echo "Branch --> $BRANCH" && \ - cd ~/ && \ - mkdir test && cd test && \ - git clone -b $BRANCH https://github.com/nlesc-dirac/sagecal.git && \ - cd sagecal && \ - mkdir build && cd build && \ - cmake .. -DENABLE_CUDA=OFF && \ - make -j4 && \ - ls -alsrt ./dist/bin && \ - ./dist/bin/sagecal + docker exec --env BRANCH=$BRANCH /bin/bash -c "/travis/workdir/test-builds/test-ubuntu.sh" diff --git a/test-builds/test-ubuntu.sh b/test-builds/test-ubuntu.sh new file mode 100755 index 0000000..7b76101 --- /dev/null +++ b/test-builds/test-ubuntu.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Building SageCal" && \ +echo "Branch --> $BRANCH" && \ +cd /travis/workdir && \ +mkdir build && cd build && \ +cmake .. -DENABLE_CUDA=OFF && \ +make -j4 && \ +ls -alsrt ./dist/bin && \ +./dist/bin/sagecal +