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 e84e61fa0b0a8627da4349cd7bd0c272b95557bc..4cdda1299c803480d89c99d0fd45c4dcf39534fd 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 754339355e0fe4a6ee98f056ee3388432aa8a2c2..39f50a80cf169b9fbc5da5c4e0601cdeea35becb 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%