Skip to content
Snippets Groups Projects
Forked from The Tor Project / Core / Tor
8034 commits behind the upstream repository.
.travis.yml 11.75 KiB
language: c

cache:
  ccache: true
  ## cargo: true
  directories:
    - $HOME/.cargo
    ## caching CARGO_TARGET_DIR actually slows down the build over time,
    ## because old build products are never deleted.
    ## where we point CARGO_TARGET_DIR in all our cargo invocations
    #- $TRAVIS_BUILD_DIR/src/rust/target

compiler:
  - gcc

os:
  - linux

## We don't use the build matrix cross-product, because it makes too many jobs
## Instead, we list each job under matrix: include:
env:
  global:
    ## The Travis CI environment allows us two cores, so let's use both.  Also,
    ## let's use the "-k" flag so that we get all of the compilation failures,
    ## not just the first one.
    - MAKEFLAGS="-k -j 2"
    ## We turn on hardening by default
    ## Also known as --enable-fragile-hardening in 0.3.0.3-alpha and later
    - HARDENING_OPTIONS="--enable-expensive-hardening"
    ## We turn off asciidoc by default, because it's slow
    - ASCIIDOC_OPTIONS="--disable-asciidoc"
    ## Turn off tor's sandbox in chutney, until we fix sandbox errors that are
    ## triggered by Ubuntu Xenial and Bionic. See #32722.
    - CHUTNEY_TOR_SANDBOX="0"
  matrix:
    ## This matrix entry is required, but it doesn't actually create any jobs
    -

matrix:
  ## include creates builds with gcc, linux, unless we override those defaults
  include:
    ## We run chutney on macOS, because macOS Travis has IPv6
    - env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
      os: osx

    ## We also run basic tests on macOS
    - compiler: clang
      os: osx
      ## Turn off some newer features, turn on clang's -Wtypedef-redefinition
      env: C_DIALECT_OPTIONS="-std=gnu99"

    ## We run chutney on Linux, because it's faster than chutney on macOS
    ## Chutney is a fast job, clang is slower on Linux, so we do Chutney clang
    - env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
      compiler: clang

    ## We check asciidoc with distcheck, to make sure we remove doc products
    - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes"

    ## We check disable module dirauth
    - env: MODULES_OPTIONS="--disable-module-dirauth"

    ## We run rust on Linux, because it's faster than rust on macOS
    ## We check rust offline
    - env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true

    ## We check NSS
    ## Use -std=gnu99 to turn off some newer features, and maybe turn on some
    ## extra gcc warnings?
    - env: NSS_OPTIONS="--enable-nss" C_DIALECT_OPTIONS="-std=gnu99"