language: c group: edge os: linux dist: bionic before_script: - export -f travis_fold script: - "bash -ex .travis-ci.sh" addons: apt: packages: &base_build # This is the absolute minimum for configure to pass # Non C++ based tasks use it so they can run make builtfiles - ccache packages: &core_build # This is all the bits we need to enable all options - *base_build - libasound2-dev - libevdev-dev - libola-dev - libjack-jackd2-dev - liblua5.3-dev - python3-dev - libssl-dev - lintian packages: &core_build_gpp_latest - *core_build - gcc-8 - g++-8 packages: &core_build_clang_latest - *core_build - clang-6.0 packages: &core_build_windows - *core_build - mingw-w64 jobs: fast_finish: true include: - os: linux dist: bionic compiler: clang env: TASK='compile' addons: apt: packages: - *core_build_clang_latest - os: linux dist: bionic compiler: gcc env: TASK='compile' addons: apt: packages: - *core_build_gpp_latest - os: linux dist: bionic compiler: mingw32-gcc env: - TASK='windows' - CC='x86_64-w64-mingw32-gcc' addons: apt: packages: - *core_build_windows - os: linux dist: bionic compiler: clang env: TASK='sanitize' addons: apt: packages: - *core_build_clang_latest - os: linux dist: bionic env: TASK='spellintian' addons: apt: packages: - *core_build - moreutils - os: linux dist: bionic env: TASK='spellintian-duplicates' addons: apt: packages: - *core_build - moreutils - os: linux dist: bionic env: TASK='codespell' addons: apt: packages: - *core_build - moreutils - os: osx osx_image: xcode10.2 compiler: clang env: - TASK='compile' - os: osx osx_image: xcode10.2 compiler: gcc env: - TASK='compile' - os: osx osx_image: xcode10.2 compiler: clang env: - TASK='sanitize' allow_failures: - os: linux dist: bionic env: TASK='spellintian-duplicates' - os: linux dist: bionic env: TASK='codespell' env: global: # No colours in terminal (to reduce log file size) - TERM=dumb # Parallel make build - MAKEFLAGS="-j 2" cache: apt: true directories: - $HOME/.ccache # ccache cache before_cache: - ccache -s # see how many hits ccache got install: - if [ "$TASK" = "codespell" ]; then pip install --user git+https://github.com/codespell-project/codespell.git; fi before_install: # Travis clones with --branch, which omits tags. Since we use them for the version string at build time, fetch them - git pull --tags - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi # 'brew install' sometimes returns non-zero for some arcane reason. Executing 'true' resets the exit code and allows Travis to continue building... - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ola lua openssl jack python3; true; fi # OpenSSL is not a proper install due to some Apple bull, so provide additional locations via the environment... # Additionally, newer versions of this "recipe" seem to use the name 'openssl@1.1' instead of plain 'openssl' and there seems to be # no way to programmatically get the link and include paths. Genius! Hardcoding the new version for the time being... - export CFLAGS="$CFLAGS -I/usr/local/opt/openssl@1.1/include" - export LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl@1.1/lib" - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/ccache/libexec:$PATH; fi # Use ccache on Mac too - if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "sanitize" \) -a "$CC" = "gcc" ]; then export CC="ccache gcc-8"; export CXX="ccache g++-8"; fi #Use the latest clang if we're compiling with clang - if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" = "clang" ]; then export CC="clang-6.0"; export CXX="clang-6.0"; fi #Report the compiler versions - $CC --version #OS X uses something other than $CXX variable - if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "sanitize" \) ]; then $CXX --version; fi # Download libraries to link with on Windows - if [ "$TASK" == "windows" ]; then mkdir libs; wget "https://downloads.sourceforge.net/project/luabinaries/5.3.5/Windows%20Libraries/Dynamic/lua-5.3.5_Win64_dllw6_lib.zip" -O lua53.zip; unzip lua53.zip lua53.dll; mv lua53.dll libs; fi deploy: provider: releases file_glob: true token: $GITHUB_TOKEN file: ./deployment/* skip_cleanup: true draft: true on: tags: true