1
0
Fork 0
libfort/.travis.yml

117 lines
2.5 KiB
YAML
Raw Normal View History

2018-03-09 08:45:23 +01:00
language: C
matrix:
include:
- os: linux
2018-03-17 19:33:48 +01:00
sudo: false
2018-03-09 08:45:23 +01:00
compiler: gcc
before_script:
- pip install --user cpp-coveralls
after_success:
- coveralls --build-root build --include src --include tests --gcov-options '\-lp'
2018-03-09 09:03:03 +01:00
- os: linux
2018-03-17 19:33:48 +01:00
sudo: required # to prevent fail of executables build with clang and sanitizers
2018-03-09 09:03:03 +01:00
compiler: clang
env: CC=clang
# Linux / GCC
- os: linux
sudo: false
compiler: gcc
env:
- FORT_C_COMPILER=gcc-4.9
- FORT_CXX_COMPILER=g++-4.9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9']
- os: linux
sudo: false
compiler: gcc
env:
- FORT_C_COMPILER=gcc-5
- FORT_CXX_COMPILER=g++-5
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5']
- os: linux
sudo: false
compiler: gcc
env:
- FORT_C_COMPILER=gcc-6
- FORT_CXX_COMPILER=g++-6
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6']
- os: linux
sudo: required
compiler: gcc
env:
- FORT_C_COMPILER=gcc-7
- FORT_CXX_COMPILER=g++-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7']
2018-03-17 19:33:48 +01:00
2018-03-09 08:45:23 +01:00
script:
# make sure CC is correctly set
- if [[ "${FORT_C_COMPILER}" != "" ]];
then
export CC=${FORT_C_COMPILER};
export CXX=${FORT_CXX_COMPILER};
fi
2018-03-09 08:45:23 +01:00
# Print all environment variables to aid in CI development
- printenv
# Print version and available CMake generators to aid in CI development
- cmake --version
2018-03-09 09:03:03 +01:00
# Perform out-of-source build(CMake backend generation, build, and test)
2018-03-18 17:02:53 +01:00
# Test build without optimizations and with asan
2018-03-09 09:03:03 +01:00
- mkdir -p build
- cd build
2018-03-18 17:02:53 +01:00
- cmake .. -DFORT_BUILD_TYPE=asan
2018-03-09 09:03:03 +01:00
- cmake --build . --target all
- ls
2018-03-17 19:36:24 +01:00
- ./libfort_example
- ./libfort_test
2018-03-09 09:03:03 +01:00
2018-03-18 17:02:53 +01:00
# Test build without optimizations and with ubsan
- if [ "${CC}" == 'gcc-7' ];
then
cd .. ;
rm -r build/* ;
cd build ;
cmake .. -DFORT_BUILD_TYPE=ubsan ;
cmake --build . --target all ;
ls ;
./libfort_example ;
./libfort_test ;
fi
2018-03-18 17:02:53 +01:00
# Build for coveralls
- if [ "${CC}" == 'gcc' ];
2018-03-18 13:32:02 +01:00
then
cd .. ;
rm -r build/* ;
cd build ;
2018-03-18 17:02:53 +01:00
cmake .. -DFORT_BUILD_TYPE=coveralls ;
2018-03-18 13:32:02 +01:00
cmake --build . --target all ;
ls ;
./libfort_test ;
fi
- cd ..
2018-03-09 09:03:03 +01:00
2018-03-18 17:02:53 +01:00