ci: make CI builds fail on compilation warnings
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 13 Aug 2017 08:03:46 +0000 (09:03 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 13 Aug 2017 18:40:59 +0000 (19:40 +0100)
Fio currently builds without warnings using its default options on at
least the platforms where CI is run (Linux, macOS, Windows).
Unfortunately it's easy to overlook changes that start generating
warnings on a platform you don't use regularly. Make this problem more
visible by changing appveyor/travis CI builds to fail when compilation
warnings are produced (but don't make this change for normal manual
builds).

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
.travis.yml
appveyor.yml

index e84e61f..4cdda12 100644 (file)
@@ -26,3 +26,5 @@ matrix:
 before_install:
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq -y libaio-dev libnuma-dev libz-dev; fi
+script:
+  - ./configure --extra-cflags="-Werror" && make && make test
index 7543393..39f50a8 100644 (file)
@@ -13,7 +13,7 @@ environment:
 
 build_script:
   - SET PATH=%CYG_ROOT%\bin;%PATH%
-  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && ./configure ${CONFIGURE_OPTIONS} && make.exe'
+  - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && ./configure --extra-cflags=\"-Werror\" ${CONFIGURE_OPTIONS} && make.exe'
 
 after_build:
   - cd os\windows && dobuild.cmd %BUILD_ARCH%