summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..864b7cd
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,27 @@
+language: c
+
+compiler:
+ - gcc
+ - clang
+
+addons:
+ apt:
+ packages:
+ - xutils-dev
+ - xserver-xorg-dev
+ - libx11-dev
+ - libxi-dev
+ - libxrandr-dev
+ - libxinerama-dev
+ - libudev-dev
+
+env:
+ - CFLAGS="-Werror -Wall -Wextra -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=cast-qual"
+
+script:
+ # We don't want our CFLAGS (especially -Werror) to apply at `configure`
+ # time so short-circuit our environment at that moment and provide the
+ # flags to `make` instead. Not doing so results in an incorrect config:
+ # 'checking for rint in -lm... no' because of a builtin-declaration-mismatch
+ # warning (error) in the auto-generated feature test.
+ - CFLAGS="" ./autogen.sh && make CFLAGS="$CFLAGS" && make check