CleverRaven/Cataclysm-DDA:.travis.yml@67a8556
# this file is HEAVILY influenced by https://github.com/boostorg/hana/blob/master/.travis.yml
dist: xenial
language: c++
cache: ccache
notifications:
email: false
git:
depth: 5
addons:
# these apt sources will be referenced later (by using *name)
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
config:
retries: true
compiler: gcc
os: linux
# We have branch builds disabled globally to prevent double-builds of PRs.
# This re-enables just the master branch.
branches:
only:
- master
- development
# Overall strategy for what sorts of builds to include:
# We want a build for each compiler and each platform.
# For PRs, we lessen the "each compiler" requirement to just covering the newest
# and oldest relevant version of each compiler.
# We also want to ensure that each of the following tweaks are covered in at
# least one PR build:
# - TILES=1
# - SOUND=1
# - RELEASE=1
# - CMAKE=1
# - LOCALIZE=0
# - Tests with important mods enabled (Magiclysm)
# We try to minimize the number of builds subject to those constraints.
#
# The following used to be here but became too slow to run on Travis and have
# been moved to GitHub Actions:
# - A clang-tidy run
# - SANITIZE=address,undefined
# To see what toolchains are available, consult the following:
# https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json
# https://launchpad.net/%7Eubuntu-toolchain-r/+archive/ubuntu/test/+index
jobs:
include:
# Initial test stage, if this fails everything else is canceled.
- stage: Test plus platforms
# Clang is consistently the fastest to build, so use it for the initial test.
env: CLANG=clang++-3.8 TEST_STAGE=1 CXXFLAGS="-Wno-error=unused-command-line-argument -D__extern_always_inline='extern __always_inline'"
name: "Clang 3.8 Make build with curses and style check"
compiler: clang
addons: &clang38
apt:
packages: ["clang-3.8"]
sources: [*apt_sources]
# MXE variant using alternate repository http://mirror.mxe.cc/repos/apt
- env: COMPILER=g++ LDFLAGS="-static-libgcc -static-libstdc++" MXE_TARGET="i686-w64-mingw32.static" WINE="wine" TILES=1 SOUND=1
name: "Mingw-w64 Make cross-compile to Windows with Tiles and Sound"
compiler: gcc
addons: &gcc
apt:
packages: ["wine"]
- env: CLANG=clang++ OSX_MIN=10.13 TILES=1 SOUND=1
name: "Xcode 10.2 Make build with Tiles and sound (macOS)"
os: osx
osx_image: xcode10.2
compiler: clang
# Then build different configurations and targets in parallel.
- stage: "Main Compilers"
env: COMPILER=g++ MODS=--mods=magiclysm LOCALIZE=0
name: "GCC 5.3 Make build with curses, Magiclysm, and no Localization"
compiler: gcc
addons: &gcc53
apt:
packages: ["g++-5=5.3.1-14ubuntu2", "libstdc++-5-dev=5.3.1-14ubuntu2", "gcc-5=5.3.1-14ubuntu2", "gcc-5-base=5.3.1-14ubuntu2", "cpp-5=5.3.1-14ubuntu2", "libgcc-5-dev=5.3.1-14ubuntu2", "libasan2=5.3.1-14ubuntu2", "libmpx0=5.3.1-14ubuntu2"]
sources: [*apt_sources]
- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" TILES=1 SOUND=1
name: "GCC 8 Make build with Tiles, Sound"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: *apt_sources
- env: CLANG=clang++-10
name: "Clang 10 Make build"
compiler: clang
dist: bionic
addons: &clang10
apt:
packages:
- clang-10
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- stage: "Platforms"
env: NATIVE=android COMPILER=gcc
name: "Android build"
if: type != pull_request
language: android
android:
components:
- build-tools-28.0.1
- android-28
cache:
# The ccache feature in Travis doesn't work for language: android, so
# do it ourselves.
directories:
- $HOME/.ccache
# Finally check the compiler variants
- stage: compilers
# GCC 5.4 is default on Xenial
env: COMPILER=g++
name: "GCC 5.4 Make build with Curses"
if: type != pull_request
- env: COMPILER=g++-6 CODE_COVERAGE=true
name: "GCC 6 Make build with Curses and Code Coverage"
if: type != pull_request
compiler: gcc
addons: &gcc6
apt:
packages: ["g++-6", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"]
sources: *apt_sources
- env: COMPILER=g++-7 CXXFLAGS='-Wno-implicit-fallthrough -D_GLIBCXX_DEBUG'
name: "GCC 7 Make build with Curses and GLIBCXX_DEBUG"
if: type != pull_request
compiler: gcc
addons: &gcc7
apt:
packages: ["g++-7", "g++-7-multilib", "libc6-dbg", "libc6-dbg:i386", "lcov"]
sources: *apt_sources
- env: CLANG=clang++-3.9 CXXFLAGS='-Wno-error=unused-command-line-argument -D__extern_always_inline="extern __always_inline"'
name: "Clang 3.9 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang39
apt:
packages: ["clang-3.9"]
sources: *apt_sources
- env: CLANG=clang++-4.0 CXXFLAGS=-Wno-error=unused-command-line-argument
name: "Clang 4 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang40
apt:
packages: ["clang-4.0"]
# Luckily the Trusty install Just Works on Xenial
sources: [*apt_sources, llvm-toolchain-trusty-4.0]
- env: CLANG=clang++-5.0 CXXFLAGS=-Wno-error=unused-command-line-argument
name: "Clang 5 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang50
apt:
packages: ["clang-5.0"]
sources: [*apt_sources, llvm-toolchain-xenial-5.0]
- env: CLANG=clang++-6.0 TILES=1 SOUND=1 CXXFLAGS=-Wno-error=unused-command-line-argument CMAKE=1 RELEASE=1
name: "Clang 6 CMake build with tiles and sound"
if: type != pull_request
compiler: clang
addons: &clang60
apt:
packages: ["clang-6.0", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: [*apt_sources, llvm-toolchain-xenial-6.0]
- env: CLANG=clang++-7
name: "Clang 7 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang7
apt:
packages: ["clang-7"]
sources: [*apt_sources, llvm-toolchain-xenial-7]
- env: CLANG=clang++-8
name: "Clang 8 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang8
apt:
packages: ["clang-8"]
sources: [*apt_sources, llvm-toolchain-xenial-8]
- env: CLANG=clang++-9
name: "Clang 9 Make build with Curses"
if: type != pull_request
compiler: clang
dist: bionic
addons: &clang9
apt:
packages:
- clang-9
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
before_script:
- if [ -n "${CLANG}" ]; then COMPILER="$CLANG"; fi
- ${COMPILER} --version
- CXX="$COMPILER"
- source build-scripts/requirements.sh
script:
- build-scripts/build.sh
after_success:
- if [ -n "${CODE_COVERAGE}" ]; then coveralls -b . -i src -e tests --gcov /usr/bin/gcov-6; fi
- if [ -n "${CODE_COVERAGE}" ]; then bash <(curl -s https://codecov.io/bash); fi
Build Config
{
"rvm": [
"1.9.2",
"1.9.3"
],
"script": "rspec spec",
"language": "ruby"
}