File: .travis.yml

package info (click to toggle)
rust-atty 0.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 108 kB
  • sloc: makefile: 2
file content (73 lines) | stat: -rw-r--r-- 2,048 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
sudo: false
language: rust
matrix:
  fast_finish: true
  include:
    - rust: nightly
    - rust: nightly
      os: osx
    - rust: beta
    - rust: beta
      os: osx
    - rust: stable
    - rust: stable
      os: osx
  allow_failures:
    - rust: nightly

before_cache:
  # Travis can't cache files that are not readable by "others"
  - chmod -R a+r $HOME/.cargo

before_install:
  # install kcov
  - >
    if [ ! -d "$HOME/.kcov/bin" ]; then
      wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
      tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
      cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/.kcov .. && make && make install && cd ../..
    fi
  - export PATH=$HOME/.kcov/bin:$PATH

script:
  - cargo build

cache:
  cargo: true
  apt: true
  directories:
  - target/debug/deps
  - target/debug/build

addons:
  apt:
    packages:
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev
      - binutils-dev
      - libiberty-dev

after_success:
  - '[ $TRAVIS_RUST_VERSION = stable ] &&
    [ $TRAVIS_BRANCH = master ] &&
    [ $TRAVIS_PULL_REQUEST = false ] &&
    (ls target/debug &&
    RUSTFLAGS="-C link-dead-code" cargo test --no-run &&
    for file in target/debug/atty-*; do
       if [[ "${file: -2}" != ".d" ]]; then
         mkdir -p "target/cov/$(basename $file)";
         kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
       fi;
    done &&
    kcov --coveralls-id=$COVERALLS_REPO_TOKEN --merge target/cov target/cov/* &&
    echo "covered") || true'
  - '[ $TRAVIS_RUST_VERSION = stable ] &&
    [ $TRAVIS_BRANCH = master ] &&
    [ $TRAVIS_PULL_REQUEST = false ]
    && cargo doc --no-deps &&
    echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d / -f 2`/index.html>" > target/doc/index.html &&
    pip install --user ghp-import &&
    /home/travis/.local/bin/ghp-import -n target/doc &&
    git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages &&
    echo "documented"'