Add tests with debug and release builds Only 1 test with autoconf
Unified · Split
| @@ -1,23 +1,34 @@ | ||
| 1 | 1 | language: c |
| 2 | 2 | |
| 3 | −sudo: required | |
| 4 | 3 | dist: xenial |
| 5 | 4 | |
| 6 | −before_install: | |
| 7 | − - sudo add-apt-repository ppa:ondrej/autotools -y # automake 1.15 | |
| 8 | − - sudo add-apt-repository ppa:cz.nic-labs/knot-dns -y # pkg-config 0.29.2 | |
| 9 | − - sudo apt-get update | |
| 10 | − - sudo apt-get install -y autoconf automake-1.15 pkg-config m4 libsndfile-dev libfftw3-dev libasound2-dev | |
| 5 | +jobs: | |
| 6 | + fast_finish: true | |
| 7 | + include: | |
| 8 | + - sudo: required | |
| 9 | + env: USING_AUTOTOOLS=yes | |
| 10 | + before_install: | |
| 11 | + - sudo add-apt-repository ppa:ondrej/autotools -y # automake 1.15 | |
| 12 | + - sudo add-apt-repository ppa:cz.nic-labs/knot-dns -y # pkg-config 0.29.2 | |
| 13 | + - sudo apt-get update | |
| 14 | + - sudo apt-get install -y autoconf automake-1.15 pkg-config m4 | |
| 15 | + script: | |
| 16 | + - ./autogen.sh && ./configure --enable-sndfile --enable-alsa && make distcheck | |
| 17 | + - cat src/config.h | |
| 18 | + | |
| 19 | +addons: | |
| 20 | + apt: | |
| 21 | + packages: [libsndfile-dev, libfftw3-dev, libasound2-dev] | |
| 11 | 22 | |
| 12 | 23 | env: |
| 13 | − - AUTOGEN=true CMAKE_SHARED=OFF | |
| 14 | − - AUTOGEN=false CMAKE_SHARED=ON | |
| 24 | + - CMAKE_SHARED=OFF BUILD_TYPE=Debug | |
| 25 | + - CMAKE_SHARED=ON BUILD_TYPE=Debug | |
| 26 | + - CMAKE_SHARED=OFF BUILD_TYPE=Release | |
| 27 | + - CMAKE_SHARED=ON BUILD_TYPE=Release | |
| 15 | 28 | |
| 16 | 29 | script: |
| 17 | − - if $AUTOGEN; then ./autogen.sh && ./configure --enable-sndfile --enable-alsa && make distcheck; fi | |
| 18 | 30 | - mkdir build |
| 19 | 31 | - cd build |
| 20 | − - cmake -DBUILD_SHARED_LIBS=$CMAKE_SHARED .. | |
| 32 | + - cmake -DBUILD_SHARED_LIBS=$CMAKE_SHARED -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_C_FLAGS="-Wall -Wextra -Werror" .. | |
| 21 | 33 | - cat config.h |
| 22 | − - make | |
| 23 | − - make test | |
| 34 | + - make && make test | |