From 3a694ec602ade241de948772adb598e19ef8cc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 7 Feb 2020 12:59:09 +0100 Subject: TravisCI: Add test build for homebrew GCC on OSX. The previous commit fixes building and testing libxcrypt on MacOSX. Thus we should do a test build with the default version of the homebrew GCC as well. --- .travis.yml | 7 +++++++ .travis_script.sh | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index 14443a7..1e246db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ addons: packages: - autoconf - automake + - gcc + - jq - libtool - pkg-config @@ -90,6 +92,11 @@ matrix: os: linux env: - CONF="--disable-shared --enable-hashes=all" + - name: "macOS, GCC (Homebrew), all hashes, obsolete API" + compiler: gcc + os: osx + env: + - CONF="--enable-obsolete-api --enable-hashes=all" - name: "macOS, Clang, all hashes, obsolete API" compiler: clang os: osx diff --git a/.travis_script.sh b/.travis_script.sh index 23911b8..8b1ee5f 100755 --- a/.travis_script.sh +++ b/.travis_script.sh @@ -97,6 +97,16 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CFLAGS="-O2 -g -arch i386 -arch x86_64 --coverage" export CXXFLAGS="$CFLAGS" export LDFLAGS="-arch i386 -arch x86_64" + if [[ "$CC" == "gcc" ]]; then + GCC_VER="$(curl -s https://formulae.brew.sh/api/formula/gcc.json | jq -r '.versions.stable' | cut -d. -f1)" + export CC="gcc-$GCC_VER" + export CPP="cpp-$GCC_VER" + export CXX="g++-$GCC_VER" + export AR="gcc-ar-$GCC_VER" + export NM="gcc-nm-$GCC_VER" + export RANLIB="gcc-ranlib-$GCC_VER" + $CC --version + fi elif [[ "$CODECOV" == "1" ]]; then export CFLAGS="-O0 -g --coverage" export CXXFLAGS="$CFLAGS" -- cgit v1.2.3