forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (100 loc) · 3.58 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
99
100
101
102
103
104
105
106
107
108
109
110
111
# This Travis-CI file is for testing the state of the MOM6 source code.
# It does NOT test MOM6 solutions.
# This is a not a c-language project but we use the same environment.
language: c
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- tcsh pkg-config netcdf-bin libnetcdf-dev libnetcdff-dev openmpi-bin libopenmpi-dev gfortran
- doxygen graphviz flex bison cmake
# Stages occur sequentially. Within each stage jobs run concurrently.
stages:
- check and compile
- tests
- cleanup
cache:
directories:
- build
# Compilation and testing is controlled by the "configure" and "Makefile" in
# .testing/ but they operate from the root directory. We copy them into place
# so that they can remain hidden from users.
install:
- echo "Install step"
- cp .testing/{configure,Makefile} .
before_script:
- ls -l
- ls build
# This avoids caching files we do not need between stages
before_cache:
- rm -f build/*.o build/*.mod
jobs:
include:
# Checks and compilation ###################################################
# - stage: check and compile
# script:
# - echo "Blank environment - this is where we would compile if we wanted to reuse executables in multiple tests"
# #- touch build/comp_nothing
- stage: check and compile
env: JOB="Code style compliance"
script:
- ./.testing/trailer.py -e TEOS10 -l 120 src config_src
- stage: check and compile
env: JOB="Doxygen"
script:
- cd docs && doxygen Doxyfile_nortd
- grep -v "config_src/solo_driver/coupler_types.F90" doxygen.log | tee doxy_errors
- test ! -s doxy_errors
- &compile-code
stage: check and compile
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric REPRO=1"
script:
- make $MAKEARGS compile
- touch build/comp_${MAKEARGS//\ /_}
- <<: *compile-code
env: MAKEARGS="MEMORY_SHAPE=dynamic REPRO=1"
- <<: *compile-code
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric DEBUG=1"
- <<: *compile-code
env: MAKEARGS="MEMORY_SHAPE=dynamic DEBUG=1"
# - <<: *compile-code
# env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric OPENMP=1"
# Run tests ################################################################
# The default "test" job is automatically invoked for each of the matrix environments
# The "test" jobs executes "./configure && make && make test"
# - stage: tests
# script:
# - echo "Placeholder for generic text using blank environment"
- &compile
stage: tests
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric REPRO=1"
script:
- ./configure && make -j && make test
- <<: *compile
env: MAKEARGS="MEMORY_SHAPE=dynamic REPRO=1"
- <<: *compile
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric DEBUG=1"
- <<: *compile
env: MAKEARGS="MEMORY_SHAPE=dynamic DEBUG=1"
# - <<: *compile
# env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric OPENMP=1"
# Clean up #################################################################
# We only want the cache directory to exist between stages so we manually
# clean out the cache, i.e. build/
- &clean-build
stage: cleanup
script:
- rm -rf build/*
- ls -l
# - <<: *clean-build
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric REPRO=1"
- <<: *clean-build
env: MAKEARGS="MEMORY_SHAPE=dynamic REPRO=1"
- <<: *clean-build
env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric DEBUG=1"
- <<: *clean-build
env: MAKEARGS="MEMORY_SHAPE=dynamic DEBUG=1"
# - <<: *clean-build
# env: MAKEARGS="MEMORY_SHAPE=dynamic_symmetric OPENMP=1"