forked from svalinn/DAGMC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
82 lines (82 loc) · 4.4 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
language: c++
sudo: required
notifications:
email:
recipients:
slack: cnerg:d48My26ZXfvHlg0On2WwNQFi
services:
- docker
matrix:
include:
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=true COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=master
if: type != pull_request
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=master
if: type != pull_request
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=master
if: type != pull_request
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=master
if: type != pull_request
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=develop
if: type != pull_request
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=develop
if: type != pull_request
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=develop
if: type != pull_request
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=develop
if: type != pull_request
fast_finish: true
allow_failures:
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=master
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=master
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=master
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=master
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=develop
- env: UBUNTU_VERSION=16.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=develop
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=develop
- env: UBUNTU_VERSION=18.04 HOUSEKEEPING_ONLY=false COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=develop
before_install:
# Set some local variables
- docker_image=svalinn/dagmc-ci-ubuntu-${UBUNTU_VERSION}
- dagmc_build_dir=/root/build/${COMPILER}/DAGMC-moab-${MOAB_VERSION}-hdf5-${HDF5_VERSION}
- script_dir=${dagmc_build_dir}/DAGMC/docker
- docker_env=${script_dir}/env.sh
- travis_env=~/travis_env
# Create a file which contains variables needed by Docker
- |
printf "COMPILER=${COMPILER}
HDF5_VERSION=${HDF5_VERSION}
MOAB_VERSION=${MOAB_VERSION}
TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}
TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
MW_REG_TEST_MODELS_URL=${MW_REG_TEST_MODELS_URL}
docker_env=${docker_env}" > ${travis_env}
# Get the docker image
- docker pull ${docker_image}
# Make the build directory
- docker run --env-file ${travis_env} ${docker_image} /bin/bash -c "mkdir -p ${dagmc_build_dir}"
- commit_id=$(docker ps -lq | tail -n1)
- docker commit ${commit_id} ${docker_image}
# Copy the repo in the docker instance
- docker cp ../DAGMC ${commit_id}:${dagmc_build_dir}
- commit_id=$(docker ps -lq | tail -n1)
- docker commit ${commit_id} ${docker_image}
install:
# Build DAGMC
- if [ "${HOUSEKEEPING_ONLY}" == "false" ]; then
docker run --env-file ${travis_env} ${docker_image} /bin/bash -c "${script_dir}/travis.install.sh";
fi
- commit_id=$(docker ps -lq | tail -n1)
- docker commit ${commit_id} ${docker_image}
script:
# Run tests
- if [ "${HOUSEKEEPING_ONLY}" == "true" ]; then
docker run --env-file ${travis_env} ${docker_image} /bin/bash -c "${script_dir}/travis.housekeeping.sh";
else
docker run --env-file ${travis_env} ${docker_image} /bin/bash -c "${script_dir}/travis.tests.sh";
fi