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
|
2018-03-18 14:56:14 +01:00
|
|
|
env: FORT_COMPILER=gcc
|
2018-03-09 08:45:23 +01:00
|
|
|
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
|
2018-03-18 14:56:14 +01:00
|
|
|
env: FORT_COMPILER=clang
|
2018-03-17 19:33:48 +01:00
|
|
|
|
|
|
|
|
2018-03-09 08:45:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
script:
|
|
|
|
# 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)
|
|
|
|
# Test build without optimizations
|
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2018-03-18 14:56:14 +01:00
|
|
|
- cmake .. -DFORT_BUILD_TYPE=asan -DFORT_COMPILER=${FORT_COMPILER}
|
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 13:32:02 +01:00
|
|
|
# Build for coveralls
|
|
|
|
- if [ ${GCC_BUILD} == 'ON' ];
|
|
|
|
then
|
|
|
|
cd .. ;
|
|
|
|
rm -r build/* ;
|
|
|
|
cd build ;
|
2018-03-18 14:56:14 +01:00
|
|
|
cmake .. -DFORT_COVERALLS_BUILD=ON -DFORT_BUILD_TYPE=asan -DFORT_COMPILER=${FORT_COMPILER} ;
|
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
|
|
|
|