Skip to content

Commit

Permalink
Travis: update .travis.yml
Browse files Browse the repository at this point in the history
Fix warnings and an error, use build-aux/travis-build.sh to support building
with ASAN properly.

Get brew packages using Travis config, not from command line.

Use default version of osx.
  • Loading branch information
rrthomas committed Jul 29, 2020
1 parent 583e9e8 commit 7e8fa6e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 15 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -12,7 +12,6 @@ Makefile
Makefile.in
/aclocal.m4
/autom4te.cache
/build-aux
/compile
/configure
/config.*
Expand Down
29 changes: 15 additions & 14 deletions .travis.yml
@@ -1,5 +1,5 @@
os: linux
language: cpp

dist: bionic

addons:
Expand All @@ -17,27 +17,28 @@ addons:
- libunittest++-dev
- hunspell-fr
- libnuspell-dev
homebrew:
# Note: aspell should work on macOS, but has been removed because one of
# the tests fails; see https://github.com/Homebrew/homebrew-core/issues/4097
packages:
- glib
- dbus-glib
- hspell
- hunspell
- libvoikko
- unittest-cpp
update: true

env:
global:
- VERBOSE=1 # Get test logs in Travis logs

matrix:
jobs:
include:
- os: linux
env:
- CONFIGURE_ARGS=("CFLAGS=\"-g3 -fsanitize=address -fsanitize=undefined\"" "LDFLAGS=\"-fsanitize=address -fsanitize=undefined\"")
- ASAN=yes
- os: osx

before_install:
# Note: aspell should work on macOS, but has been removed from the next
# line because one of the tests fails; see
# https://github.com/Homebrew/homebrew-core/issues/40976
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install dbus-glib hspell hunspell libvoikko unittest-cpp ; fi

script:
- ./bootstrap
- ./configure --enable-relocatable --with-zemberek=check "${CONFIGURE_ARGS[@]}"
- make
- make distcheck
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo locale-gen fr_FR.UTF-8; env LANG=fr_FR.UTF-8 make check ; fi
- ./build-aux/travis-build.sh
15 changes: 15 additions & 0 deletions build-aux/.gitignore
@@ -0,0 +1,15 @@
/bootstrap.in
/compile
/config.guess
/config.sub
/depcomp
/extract-trace
/funclib.sh
/inline-source
/install-sh
/ltmain.sh
/mdate-sh
/missing
/options-parser
/test-driver
/texinfo.tex
17 changes: 17 additions & 0 deletions build-aux/travis-build.sh
@@ -0,0 +1,17 @@
#!/bin/bash
# Build on Travis
# Written by Reuben Thomas 2020.
# This file is in the public domain.

set -e

./bootstrap
CONFIGURE_ARGS=(--enable-relocatable --with-zemberek=check)
if [[ "$ASAN" == "yes" ]]; then
CONFIGURE_ARGS+=(CFLAGS="-g3 -fsanitize=address -fsanitize=undefined" LDFLAGS="-fsanitize=address -fsanitize=undefined")
fi
./configure --enable-silent-rules "${CONFIGURE_ARGS[@]}"
make
make distcheck

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo locale-gen fr_FR.UTF-8; env LANG=fr_FR.UTF-8 make check ; fi

0 comments on commit 7e8fa6e

Please sign in to comment.