Permalink
Browse files

Switch Travis build to Meson+Ninja

  • Loading branch information...
1 parent 9f96db7 commit bcb8f7599539248c53051b06b81c3d4f3b327f94 @Nikratio Nikratio committed Jan 12, 2017
Showing with 74 additions and 22 deletions.
  1. +7 −22 .travis.yml
  2. +53 −0 test/travis-build.sh
  3. +14 −0 test/travis-install.sh
View
@@ -1,33 +1,18 @@
sudo: required
+dist: trusty
+
language:
- - python
- c
-python: "3.5"
-compiler:
- - gcc
- - clang
-env:
- - CC=gcc-6
- - CC=clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- doxygen
- - libtool
- valgrind
- - automake
- - autoconf
+ - clang
+ - gcc
- gcc-6
-install:
- - sudo python -m pip install pytest
-script:
- - $CC --version
- - libtool --version
- - valgrind --version
- - ./makeconf.sh
- - ./configure
- - CFLAGS="-fsanitize=address,undefined -g -O1 -Wall -Werror" make
- - doxygen doc/Doxyfile
- - make test
+install: test/travis-install.sh
+script: test/travis-build.sh
+
View
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+set -e
+
+export CFLAGS="-Werror"
+export CC
+
+# Standard build
+for CC in gcc gcc-6 clang; do
+ mkdir build-${CC}; cd build-${CC}
+ if [ ${CC} == 'gcc-6' ]; then
+ build_opts='-D b_lundef=false'
+ else
+ build_opts=''
+ fi
+ meson ${build_opts} ../
+ ninja
+
+ sudo chown root:root util/fusermount3
+ sudo chmod 4755 util/fusermount3
+ ninja tests
+ cd ..
+done
+(cd build-$CC; sudo ninja install)
+
+# Sanitized build
+CC=clang
+for san in undefined; do
+ mkdir build-${san}; cd build-${san}
+ # b_lundef=false is required to work around clang
+ # bug, cf. https://groups.google.com/forum/#!topic/mesonbuild/tgEdAXIIdC4
+ meson -D b_sanitize=${san} -D b_lundef=false ..
+ ninja
+
+ # Test as root and regular user
+ sudo ninja tests
+ sudo chown root:root util/fusermount3
+ sudo chmod 4755 util/fusermount3
+ ninja tests
+ cd ..
+done
+
+# Autotools build
+CC=gcc
+./makeconf.sh
+./configure
+make
+sudo python3 -m pytest test/
+sudo make install
+
+# Documentation
+doxygen doc/Doxyfile
+
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+sudo ln -svf $(which python3) /usr/bin/python3
+sudo python3 -m pip install pytest meson
+wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
+unzip ninja-linux.zip
+chmod 755 ninja
+sudo chown root:root ninja
+sudo mv -fv ninja /usr/local/bin
+valgrind --version
+ninja --version
+meson --version

0 comments on commit bcb8f75

Please sign in to comment.