forked from lanl/Draco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (87 loc) · 3.81 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#------------------------------------------------------------------------------#
# File: .travis.yml
# Author: Kelly Thompson <[email protected]>
# Date: Friday, Jul 13, 2018, 07:41 am
# Purpose: Instructions for Travis continuous integration testing on GitHub.
# This script wil be run to test pull requests
# Note: Copyright (C) 2018-2020 Triad National Security, LLC.
# All rights reserved.
#------------------------------------------------------------------------------#
language: cpp
sudo: required
services:
- docker
#------------------------------------------------------------------------------#
# Notes: Build docker container before running this script:
#
# 1. cd to directory contataining Dockerfile.
# 2. Build the docker container. This can take an hour or more. If you are
# starting from scratch, you will need to change the first line of the
# Dockerfile so that it starts from 'ubuntu' instead of 'draco-travis-ci'
#
# docker build --rm --pull --tag draco-travis-ci:latest .
#
# 3. Commit and upload the updated container:
#
# docker ps -a # find new container name
# docker commit -m "updated cmake version" -a <dockerhub moniker> \
# <container_name> kinetictheory/draco-travis-ci:latest
# docker login -u kinetictheory # must provide password to upload
# docker push
#
# 4. Optional: test the container with an interactive run (the -l is important!)
#
# docker run -it kinetictheory/draco-travis-ci /bin/bash -l
#
# or possibly
#
# docker run -it -v /path/to/draco:/home/travis/draco -w /home/travis/draco kinetictheory/draco-travis-ci /bin/bash -l -c "./.travis-run-tests.sh"
#
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Travis Environment:
#
# HOME=/home/travis
# PWD=/home/travis/build/lanl/Draco
# (starting directory for Travis, sources are here)
#
# Docker Environment:
#
# - The docker image mounts the PR sources (/home/travis/build/lanl/Draco) as
# /home/travis/Draco
# - The vendors are at /vendors/spack
# - Spack is already in the environment
#------------------------------------------------------------------------------#
env:
global:
- BUILD_DIR=/home/travis/Draco/build
- SOURCE_DIR=/home/travis/Draco
- T_SOURCE_DIR=/home/travis/build/lanl/Draco
- VENDOR_DIR=/vendors
- GCCVER=8
matrix:
- STYLE=ON
- WERROR=ON COVERAGE=ON DRACO_C4=SCALAR
- WERROR=ON COVERAGE=ON DRACO_C4=MPI
- WERROR=ON DRACO_C4=MPI AUTODOC=ON
jobs:
fast_finish: true
# matrix:
# allow_failures:
# - compiler: gcc
# env: DISTRO=ubuntu DRACO_C4=SCALAR WERROR=yes
# - compiler: gcc
# env: DISTRO=ubuntu STYLE=ON
# Coverage with Docker - https://docs.codecov.io/docs/testing-with-docker
#before_install:
# - pip install --upgrade --user pip
# - if [[ ${COVERAGE} ]]; then pip install --user codecov; fi
install:
- travis_retry timeout 540 docker pull kinetictheory/draco-ci-2019aug
script:
- if [[ ${COVERAGE:-OFF} == "ON" ]]; then ci_env=`/bin/bash <(curl -s https://codecov.io/env)`; fi
- docker run ${ci_env} -v ${T_SOURCE_DIR}:${SOURCE_DIR} -e VENDOR_DIR=${VENDOR_DIR} -e BUILD_DIR=${BUILD_DIR} -e SOURCE_DIR=${SOURCE_DIR} -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CI=${CI} -e TRAVIS=${TRAVIS} -e TRAVIS_BRANCH=${TRAVIS_BRANCH} -e GCCVER=${GCCVER} -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} kinetictheory/draco-ci-2019aug /bin/bash -l -c "${SOURCE_DIR}/tools/travis-run-tests.sh"
#------------------------------------------------------------------------------#
# See also:
# - Advanced used: https://github.com/laristra/flecsi/blob/master/.travis.yml
#------------------------------------------------------------------------------#