sudo: required language: c env: - BUILD_OPTS= - BUILD_OPTS="CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread' - BUILD_OPTS="CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread' services: - docker before_install: - docker pull fedora - export CONTAINER=$(docker run -d fedora sleep 1800) - docker exec $CONTAINER dnf -y install 'dnf-command(builddep)' - docker exec $CONTAINER dnf -y builddep p11-kit - docker exec $CONTAINER dnf -y install gettext-devel libtool make - docker exec $CONTAINER dnf -y install libasan libubsan - docker exec $CONTAINER useradd user - docker exec $CONTAINER mkdir /builddir - docker exec $CONTAINER chown -R user /builddir install: - docker cp . $CONTAINER:/srcdir # FIXME: This is needed because some files are included in distribution # and need to be generated in $srcdir rather than $builddir - docker exec $CONTAINER chown -R user /srcdir script: - docker exec $CONTAINER sh -c "cd /srcdir && NOCONFIGURE=1 ./autogen.sh" - docker exec $CONTAINER su - user sh -c "cd /builddir && ../srcdir/configure --prefix=/usr --libdir=/usr/lib64 --enable-strict CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBS=\"$LIBS\"" - docker exec $CONTAINER su - user sh -c "cd /builddir && make V=1 && make check V=1"