exiv2/ci/run.sh
Luis Diaz Mas 8ba9422ba3 travis: Enable coverage reports in gcc build
* I also had to update the conan version to fix some issues in CI.
* Codecov reports are now added to the README.md and to each PR.
2018-07-31 23:43:46 +02:00

39 lines
900 B
Bash
Executable File

#!/bin/bash
set -e
set -x
if [[ "$(uname -s)" == 'Linux' ]]; then
source conan/bin/activate
else
export PYENV_VERSION=$PYTHON
export PATH="/Users/travis/.pyenv/shims:${PATH}"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate conan
fi
mkdir build && cd build
conan install .. --build missing --profile release
cmake ${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_CXX_FLAGS="-fsanitize=address" \
-DCMAKE_C_FLAGS="-fsanitize=address" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" \
-DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" ..
make -j2 VERBOSE=1
#On most systems, you can set the TZ environment variable to set the timezone for a process. It's a POSIX feature.
export TZ=UTC
make tests
make install
cd bin
./unit_tests
if [ -n "$COVERAGE" ]; then
cd ..
bash <(curl -s https://codecov.io/bash)
fi