1
0
Fork 0

[A] Added travis

This commit is contained in:
seleznevae 2018-03-09 10:45:23 +03:00
parent 603c6e6241
commit 0b7abf6e0a
1 changed files with 83 additions and 0 deletions

83
.travis.yml Normal file
View File

@ -0,0 +1,83 @@
language: C
sudo: false
matrix:
include:
- os: linux
compiler: gcc
env: GCC_BUILD=ON
before_script:
- pip install --user cpp-coveralls
after_success:
- coveralls --build-root build --include src --include tests --gcov-options '\-lp'
# - os: linux
# compiler: clang
# env: GCC_BUILD=OFF
script:
# Print all environment variables to aid in CI development
- printenv
# Print version and available CMake generators to aid in CI development
- cmake --version
- cmake --help
# Build cmocka
- cd tests/cmocka-1.1.0/build
- ls
- cmake ..
- make
- cd ../../..
- ls
# # Perform out-of-source build(CMake backend generation, build, and test)
# # Test build without optimizations
# - cd build
# - cmake .. -DCERAII_TEST_BUILD=ON -DCERAII_GCC_BUILD=${GCC_BUILD} -DCERAII_PERF_OPTIMIZED_BUILD=OFF
# - cmake --build . --target all
# - ls
# - ./test_basic
# - ./test_multithread
# # Test build with optimizations
# - cd ..
# - rm -r build/*
# - cd build
# - cmake .. -DCERAII_TEST_BUILD=ON -DCERAII_GCC_BUILD=${GCC_BUILD} -DCERAII_PERF_OPTIMIZED_BUILD=ON
# - cmake --build . --target all
# - ls
# - ./test_basic
# - ./test_multithread
# # Production build without optimizations
# - cd ..
# - rm -r build/*
# - cd build
# - cmake .. -DCERAII_TEST_BUILD=OFF -DCERAII_GCC_BUILD=${GCC_BUILD} -DCERAII_PERF_OPTIMIZED_BUILD=OFF
# - cmake --build . --target all
# - ls
# - ./test_basic
# - ./test_multithread
# # Production build with optimizations
# - cd ..
# - rm -r build/*
# - cd build
# - cmake .. -DCERAII_TEST_BUILD=OFF -DCERAII_GCC_BUILD=${GCC_BUILD} -DCERAII_PERF_OPTIMIZED_BUILD=ON
# - cmake --build . --target all
# - ls
# - ./test_basic
# - ./test_multithread
# # Build for coveralls
# - cd ..
# # - rm -r build/*
# - cd build
# - if [ ${GCC_BUILD} == 'ON' ];
# then
# cd .. ;
# rm -r build/* ;
# cd build ;
# cmake .. -DCERAII_COVERALLS_BUILD=ON -DCERAII_TEST_BUILD=ON -DCERAII_GCC_BUILD=${GCC_BUILD} -DCERAII_PERF_OPTIMIZED_BUILD=OFF ;
# cmake --build . --target all ;
# ls ;
# ./test_basic ;
# ./test_multithread ;
# fi
# - cd ..