-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
32 lines (26 loc) · 1.51 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
services:
- docker
git:
depth: false
before_install:
- docker pull ldumas/sirius_dockerfile:sirius_build
- docker pull ldumas/sirius_dockerfile:sirius_pages
before_script:
- if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD; fi
- export SRCDIR=/data
- export SIRIUS_BUILD_DIR=.build
- export INSTALL_DIR=/opt/sirius
- SIRIUS_VERSION=$(git describe 2> /dev/null); if [ "x${SIRIUS_VERSION}" = "x" ]; then SIRIUS_VERSION="0.0.0"; fi; export SIRIUS_VERSION;
script:
- docker run -v $TRAVIS_BUILD_DIR/:/data ldumas/sirius_dockerfile:sirius_build /bin/sh -c "source /opt/rh/devtoolset-6/enable; cd $SRCDIR; .travis/create_cmake_project.sh $SIRIUS_BUILD_DIR $INSTALL_DIR $SIRIUS_VERSION $TRAVIS_COMMIT; cd $SIRIUS_BUILD_DIR; make -j4 build_tests && make -j4 && make install; cd ..; mv $SIRIUS_BUILD_DIR/html doxy_html; mv $SIRIUS_BUILD_DIR/xml doxy_xml; rm -rf $SIRIUS_BUILD_DIR"
- CID=$(docker ps --latest --quiet)
- if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then docker commit --change "ENV PATH $PATH:/opt/sirius/bin" $CID sirius_built; fi
- if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then docker tag sirius_built ldumas/sirius_dockerfile:sirius_built; fi
- if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then docker push ldumas/sirius_dockerfile:sirius_built; fi
deploy:
provider: script
script: if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then .travis/deploy.sh; fi
on:
branch: master
after_success:
- if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]; then .travis/on_success.sh; fi