123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- language: c
- cache:
- ccache: true
-
- directories:
- - $HOME/.cargo
-
-
-
-
- compiler:
- - gcc
- - clang
- os:
- - linux
- - osx
- env:
- global:
-
- - MAKEFLAGS="-j 2"
-
-
- - HARDENING_OPTIONS="--enable-expensive-hardening"
-
- - ASCIIDOC_OPTIONS="--disable-asciidoc"
- matrix:
-
-
-
-
- -
-
- - RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
- matrix:
-
- include:
-
- - env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS=""
-
-
-
-
-
- - env: DISTCHECK="yes" ASCIIDOC_OPTIONS=""
-
- - env: TEST_STEM="yes"
-
- - env: DISTCHECK="yes" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
-
- - env: MODULES_OPTIONS="--disable-module-dirauth" RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
- - env: MODULES_OPTIONS="--disable-module-dirauth"
-
- - env: NSS_OPTIONS="--enable-nss"
-
-
-
-
-
-
-
-
-
-
- allow_failures:
-
- - env: TEST_STEM="yes"
- exclude:
-
- - compiler: gcc
- os: osx
-
-
- - compiler: gcc
- os: linux
- env:
-
-
- - compiler: gcc
- os: linux
-
- env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS=""
- dist: trusty
- addons:
-
- apt:
- packages:
-
- - libevent-dev
-
-
- - zlib1g-dev
-
- - libcap-dev
- - liblzma-dev
- - libnss3-dev
- - libscrypt-dev
- - libseccomp-dev
-
-
- - shellcheck
-
-
- - asciidoc
- - docbook-xsl
- - docbook-xml
- - xmlto
-
-
- - timelimit
-
- homebrew:
- packages:
-
- - libevent
-
- - openssl
-
-
-
-
- - libscrypt
- - xz
- - zstd
-
-
- - pkg-config
-
- - ccache
- - shellcheck
-
-
- - asciidoc
- - xmlto
-
-
- - timelimit
- before_install:
-
- - if [[ "$RUST_OPTIONS" == "" ]]; then mkdir -p $HOME/.cargo $TRAVIS_BUILD_DIR/src/rust/target; fi
- install:
-
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
-
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OPENSSL_OPTIONS=--with-openssl-dir=`brew --prefix openssl`; fi
-
-
- - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi
-
- - if [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"; fi
-
- - if [[ "$RUST_OPTIONS" != "" ]]; then curl -Ssf -o rustup.sh https://sh.rustup.rs; fi
-
- - if [[ "$RUST_OPTIONS" != "" ]]; then sh rustup.sh -y --default-toolchain nightly; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi
-
- - if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi
- - if [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; fi
-
-
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
-
- - if [[ "$RUST_OPTIONS" != "" ]]; then which rustup; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then which rustc; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then which cargo; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then rustup --version; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi
- - if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi
-
- - python --version
-
- - if [[ "$TEST_STEM" != "" ]]; then pushd stem; python -c "from stem import stem; print(stem.__version__);"; git log -1; popd; fi
- script:
-
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TOR_SKIP_TEST_REBIND=true; fi
- - ./autogen.sh
- - CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $MODULES_OPTIONS $NSS_OPTIONS $OPENSSL_OPTIONS $RUST_OPTIONS --enable-fatal-warnings --disable-silent-rules"
- - echo "Configure flags are $CONFIGURE_FLAGS"
- - ./configure $CONFIGURE_FLAGS
-
- - if [[ "$DISTCHECK" == "" && "$TEST_STEM" == "" ]]; then make check; fi
-
- - if [[ "$TEST_STEM" != "" ]]; then make src/app/tor; timelimit -p -t 540 -s USR1 -T 30 -S ABRT python3 "$STEM_SOURCE_DIR"/run_tests.py --tor src/app/tor --integ --log notice --target RUN_ALL; fi
- - if [[ "$DISTCHECK" != "" && "$TEST_STEM" == "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi
-
- - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p' || echo "Coverage failed"; fi
- after_failure:
-
-
- - tail -1000 config.log || echo "tail failed"
-
- - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log || echo "cat failed"; fi
-
- - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make failed"; fi
- - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-core || echo "make failed"; fi
- - if [[ "$TEST_STEM" != "" ]]; then cat "$STEM_SOURCE_DIR"/test/data/tor_log || echo "cat failed"; fi
- before_cache:
-
- - if [[ "$COVERAGE_OPTIONS" != "" ]]; then make reset-gcov; fi
-
-
- - rm -rf $HOME/.cargo/registry
- notifications:
- irc:
- channels:
- - "irc.oftc.net#tor-ci"
- template:
- - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
- - "Build #%{build_number} %{result}. Details: %{build_url}"
- on_success: change
- on_failure: change
- email:
- on_success: never
- on_failure: change
|