image: oarteam/batsim_ci:2017-09-12 variables: GIT_SUBMODULE_STRATEGY: normal # The before_script part above is done in order to push Batsim's code doc # onto the gforge website. # Information found on https://docs.gitlab.com/ee/ci/ssh_keys/README.html before_script: # Install ssh-agent if not already installed, it is required by Docker. # (change apt-get to yum if you use a CentOS-based image) - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' # Run ssh-agent (inside the build environment) - eval $(ssh-agent -s) # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store - ssh-add <(echo "$SSH_PRIVATE_KEY") # For Docker builds disable host key checking. Be aware that by adding that # you are suspectible to man-in-the-middle attacks. # WARNING: Use this only with the Docker executor, if you use it with shell # you will overwrite your user's SSH config. - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config' build_clang: stage: build script: - export CC=/usr/bin/clang - export CXX=/usr/bin/clang++ - mkdir /builds/batsim/batsim/build - cd /builds/batsim/batsim/build - cmake .. -DCMAKE_BUILD_TYPE=Debug -Dtreat_warnings_as_errors=ON - make artifacts: paths: - /builds/batsim/batsim/build build_gcc: stage: build script: - export CC=/usr/bin/gcc - export CXX=/usr/bin/g++ - mkdir /builds/batsim/batsim/build - cd /builds/batsim/batsim/build - cmake .. -DCMAKE_BUILD_TYPE=Debug -Dtreat_warnings_as_errors=ON - make build_batsched: stage: build script: - cd /builds/batsim/batsim/schedulers - mkdir batsched_build - cd batsched_build - cmake /builds/batsim/batsim/schedulers/batsched - make artifacts: paths: - /builds/batsim/batsim/schedulers/batsched_build test_doc: stage: test script: - cd /builds/batsim/batsim/doc - doxygen - cat doxygen_warnings.log # The next line fails if doxygen generated warnings - eval "[ $(wc -c doxygen_warnings.log | cut -d ' ' -f1) -eq 0 ]" artifacts: paths: - /builds/batsim/batsim/doc/doxygen_doc/html test_test: stage: test script: # Let's run the redis server - | redis-server>/dev/null & while ! nc -z localhost 6379; do sleep 1 done - cd /builds/batsim/batsim/build - make install - cd /builds/batsim/batsim/schedulers/batsched_build - make install - cd /builds/batsim/batsim/build - ctest --output-on-failure -E 'remote|smpi' dependencies: - build_clang - build_batsched deploy_code_doc: stage: deploy script: - cd /builds/batsim/batsim/doc - rsync -rlgoDz --delete doxygen_doc/html/ mpoquet@scm.gforge.inria.fr:/home/groups/batsim/htdocs dependencies: - test_doc