50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
language: C
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
sudo: false
|
|
compiler: gcc
|
|
env: FORT_COMPILER=gcc
|
|
before_script:
|
|
- pip install --user cpp-coveralls
|
|
after_success:
|
|
- coveralls --build-root build --include src --include tests --gcov-options '\-lp'
|
|
- os: linux
|
|
sudo: required # to prevent fail of executables build with clang and sanitizers
|
|
compiler: clang
|
|
env: FORT_COMPILER=clang
|
|
|
|
|
|
|
|
|
|
|
|
script:
|
|
# Print all environment variables to aid in CI development
|
|
- printenv
|
|
# Print version and available CMake generators to aid in CI development
|
|
- cmake --version
|
|
|
|
# Perform out-of-source build(CMake backend generation, build, and test)
|
|
# Test build without optimizations
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DFORT_BUILD_TYPE=asan -DFORT_COMPILER=${FORT_COMPILER}
|
|
- cmake --build . --target all
|
|
- ls
|
|
- ./libfort_example
|
|
- ./libfort_test
|
|
|
|
# Build for coveralls
|
|
- if [ ${GCC_BUILD} == 'ON' ];
|
|
then
|
|
cd .. ;
|
|
rm -r build/* ;
|
|
cd build ;
|
|
cmake .. -DFORT_COVERALLS_BUILD=ON -DFORT_BUILD_TYPE=asan -DFORT_COMPILER=${FORT_COMPILER} ;
|
|
cmake --build . --target all ;
|
|
ls ;
|
|
./libfort_test ;
|
|
fi
|
|
- cd ..
|
|
|