This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
203 lines (197 loc) · 6.65 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# timemory Travis CI file
language: python
# The apt packages here install our compiled code dependencies.
jobs:
fast_finish: true
include:
# ------------------------------------------------------------------------ #
#
# Python 3.8 / macOS
#
# ------------------------------------------------------------------------ #
- os: osx
osx_image: xcode12
language: c++
python: "3.8"
env:
- TRAVIS_PYTHON_VERSION=3.8
- CONDA_OS=MacOSX
- BUILD_ARGS='--minimal --build-libs shared --cxx-standard=17'
- CONFIG_ARGS='-DTIMEMORY_BUILD_PYTHON_HATCHET=OFF -DTIMEMORY_BUILD_PYTHON_LINE_PROFILER=OFF -DTIMEMORY_USE_SANITIZER=ON -DSANITIZER_TYPE=address'
#- CONDA_EXTRA='cxx-compiler compiler-rt pybind11-abi'
# addons:
# homebrew:
# casks:
# - anaconda
# update: true
# ------------------------------------------------------------------------ #
#
# Python 3.6 / Python 3.7 / Linux
#
# ------------------------------------------------------------------------ #
# Clang 7
- os: linux
dist: bionic
python: "3.7"
addons:
apt:
sources:
- llvm-toolchain-bionic-7
- ubuntu-toolchain-r-test
packages:
- clang-7
- build-essential
- libmpich-dev
- mpich
- ccache
env:
- CC=clang-7
- CXX=clang++-7
- BUILD_ARGS='--minimal --build-libs shared static --python --mpi --gotcha --stats --tools mallocp mpip ompt --cxx-standard=17'
- CONFIG_ARGS='-DTIMEMORY_CCACHE_BUILD=ON'
# Clang 8.0
- os: linux
dist: bionic
python: "3.7"
addons:
apt:
sources:
- llvm-toolchain-bionic-8
- ubuntu-toolchain-r-test
packages:
- clang-8
- build-essential
- ccache
env:
- CC=clang-8
- CXX=clang++-8
- BUILD_ARGS='--minimal --build-libs shared static --stats --tools kokkos-config timem --cxx-standard=14'
- CONFIG_ARGS='-DTIMEMORY_CCACHE_BUILD=ON'
# GCC 6
- os: linux
dist: bionic
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- gfortran-6
- build-essential
- libtbb-dev
- ccache
env:
- CC=gcc-6
- CXX=g++-6
- FC=gfortran-6
- BUILD_TYPE=RelWithDebInfo
- BUILD_ARGS='--minimal --build-libs shared --python --stats --cxx-standard=14'
- CONFIG_ARGS='-DTIMEMORY_CCACHE_BUILD=ON'
# GCC 7
- os: linux
dist: bionic
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- gfortran-7
- build-essential
- libmpich-dev
- mpich
- libpapi-dev
- papi-tools
- lcov
env:
- CC=gcc-7
- CXX=g++-7
- FC=gfortran-7
- BUILD_ARGS='--minimal --build-libs shared --mpi --papi --gotcha --tools mpip --stats --cxx-standard=17 --coverage'
#
# GCC 8
- os: linux
dist: bionic
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
- gfortran-8
- build-essential
- libopenmpi-dev
- openmpi-bin
- openmpi-common
- libfabric-dev
- ccache
env:
- CC=gcc-8
- CXX=g++-8
- FC=gfortran-8
- BUILD_TYPE=RelWithDebInfo
- BUILD_ARGS='--minimal --build-libs shared --mpi --stats --tools compiler --cxx-standard=17'
- CONFIG_ARGS='-DTIMEMORY_CCACHE_BUILD=ON'
before_install:
# - if [ -d /Library/Developer ]; then sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* ; fi
- if [ "${CC}" != "" ]; then which -a ${CC}; fi
- if [ "${CXX}" != "" ]; then which -a ${CXX}; fi
- if [ -f /usr/bin/${CC} ]; then export CC=/usr/bin/${CC}; fi
- if [ -f /usr/bin/${CXX} ]; then export CXX=/usr/bin/${CXX}; fi
- if [ -d /usr/local/anaconda3/bin ]; then export PATH=/usr/local/anaconda3/bin:$PATH ; fi
- env
- export TIMEMORY_SOURCE_DIRECTORY=${PWD}
- if [ -z "${CONDA_OS}" ]; then CONDA_OS=Linux; fi
- if [ -z "$(which conda)" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p ${HOME}/miniconda;
export PATH="${HOME}/miniconda/bin:${PATH}";
fi;
conda config --set always_yes yes --set changeps1 no
install:
- conda create -c conda-forge -c defaults -n pyctest python=${TRAVIS_PYTHON_VERSION} pyctest scikit-build cmake pip pydot ${CONDA_EXTRA}
- source activate
- conda activate pyctest
- python -m pip install -r requirements.txt
- python -m pip install pytest
- if [ -n "$(which mpicc)" ]; then
python -m pip install mpi4py;
fi
script:
- if [ -z "${BUILD_TYPE}" ]; then BUILD_TYPE=RelWithDebInfo; fi
- export BASE_ARGS="-SF --pyctest-model=Continuous --pyctest-site=Travis -j 1 --compile-time-perf ${HOME}/ctp"
- export CTEST_ARGS="-V --output-on-failure ${CTEST_ARGS}"
- export CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=${HOME}/timemory-install ${CONFIG_ARGS}"
- export PYCTEST_ARGS="${BASE_ARGS} -cc ${CC} -cxx ${CXX} --pyctest-build-type=${BUILD_TYPE} ${BUILD_ARGS}"
- echo -e "Running command:\npython ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}"
# main command
- python ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}
# cd into build directory
- if [ "${CONDA_OS}" = "Linux" ]; then
cd build-timemory/Linux;
else
cd build-timemory/Darwin;
fi
# make install and check that cmake configures from installation and at least one of them builds
- make install -j
# if python install test file exists, run it
- if [ -f "tests/test-python-install-import.cmake" ]; then
cmake -P tests/test-python-install-import.cmake;
if [ -d "timemory/hatchet" ]; then
ln -s timemory/hatchet hatchet;
PYTHONPATH=. $(which pytest);
fi;
cd;
export PYTHON_PATH=${HOME}/timemory-install/lib/python${TRAVIS_PYTHON_VERSION}/site-packages:${PYTHONPATH};
python${TRAVIS_PYTHON_VERSION} -c "import timemory";
fi
- cd ${TIMEMORY_SOURCE_DIRECTORY}/examples && mkdir build-examples && cd build-examples
- cmake -DTIMEMORY_BUILD_C_EXAMPLES=ON .. && make ex_array_of_bundles
after_success:
- echo "Testing is Done"