-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.travis.yml
87 lines (78 loc) · 2.95 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
# This configuration file is used by Travis CI to build/test TECA.
language: c++
sudo: required
services:
- docker
os:
- linux
# disable osx
# - osx
osx_image:
- xcode12.2
env:
global:
- BUILD_TYPE=Debug
- TECA_DIR=/travis_teca_dir
- TECA_PYTHON_VERSION=3
- TECA_DATA_REVISION=163
jobs:
- DOCKER_IMAGE=ubuntu IMAGE_VERSION=22.04 IMAGE_NAME=ubuntu_22_04 REQUIRE_NETCDF_MPI=TRUE
- DOCKER_IMAGE=ubuntu IMAGE_VERSION=22.04 IMAGE_NAME=ubuntu_22_04 REQUIRE_NETCDF_MPI=FALSE
- DOCKER_IMAGE=fedora IMAGE_VERSION=37 IMAGE_NAME=fedora_37 REQUIRE_NETCDF_MPI=TRUE
- DOCKER_IMAGE=fedora IMAGE_VERSION=37 IMAGE_NAME=fedora_37 REQUIRE_NETCDF_MPI=FALSE
- NO_DOCKER=TRUE
jobs:
exclude:
- os: osx
env: DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_22_04 REQUIRE_NETCDF_MPI=TRUE
- os: osx
env: DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_22_04 REQUIRE_NETCDF_MPI=FALSE
- os: osx
env: DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_37 REQUIRE_NETCDF_MPI=TRUE
- os: osx
env: DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_37 REQUIRE_NETCDF_MPI=FALSE
- os: linux
env: NO_DOCKER=TRUE
before_install:
- >
sudo systemctl stop docker.service && sudo systemctl stop docker.socket
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
yes | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin;
if [[ "${TRAVIS_OS_NAME}" == "linux" ]];
then
docker pull ${DOCKER_IMAGE}:${IMAGE_VERSION} &&
docker run -t -v ${TRAVIS_BUILD_DIR}:${TECA_DIR} -w ${TECA_DIR} --security-opt seccomp=unconfined
--name teca_${DOCKER_IMAGE}_${IMAGE_VERSION} -d ${DOCKER_IMAGE}:${IMAGE_VERSION};
fi
install:
- >
if [[ "${TRAVIS_OS_NAME}" == "osx" ]];
then
./test/travis_ci/install_osx.sh;
elif [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
docker exec teca_${DOCKER_IMAGE}_${IMAGE_VERSION} /bin/bash -c
"export TECA_PYTHON_VERSION=${TECA_PYTHON_VERSION} &&
export TECA_DATA_REVISION=${TECA_DATA_REVISION} &&
export REQUIRE_NETCDF_MPI=${REQUIRE_NETCDF_MPI} &&
${TECA_DIR}/test/travis_ci/install_${IMAGE_NAME}.sh";
fi
script:
- >
if [[ "${TRAVIS_OS_NAME}" == "osx" ]];
then
./test/travis_ci/ctest_osx.sh;
elif [[ "${TRAVIS_OS_NAME}" == "linux" ]];
then
docker exec teca_${DOCKER_IMAGE}_${IMAGE_VERSION} /bin/bash -c
"export TRAVIS_BRANCH=${TRAVIS_BRANCH} &&
export TECA_PYTHON_VERSION=${TECA_PYTHON_VERSION} &&
export BUILD_TYPE=${BUILD_TYPE} &&
export DOCKER_IMAGE=${DOCKER_IMAGE} &&
export IMAGE_VERSION=${IMAGE_VERSION} &&
export REQUIRE_NETCDF_MPI=${REQUIRE_NETCDF_MPI} &&
${TECA_DIR}/test/travis_ci/ctest_linux.sh";
fi