File: .travis.yml

package info (click to toggle)
rust-base64 0.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 448 kB
  • sloc: makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,605 bytes parent folder | download | duplicates (6)
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
---
language: rust
dist: trusty
sudo: required

matrix:
  include:
    - rust: 1.34.0
    # cfg(doctest) is experimental in 1.39 but ignored with 1.34.0, and that snuck in when 1.39.0 wasn't tested
    - rust: 1.39.0
    - rust: stable
    - rust: beta
    - rust: nightly
      addons:
        apt:
          packages:
            # cargo-tarpaulin needs this
            - libssl-dev
      install:
        # For test coverage. In install step so that it can use cache.
        - cargo tarpaulin --version || RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force cargo-tarpaulin
        - cargo +nightly install cargo-fuzz

    # no_std
    - rust: stable
      env: TARGET="--target thumbv6m-none-eabi" FEATURES="--no-default-features --features alloc"
      install:
        - rustup target add thumbv6m-none-eabi

cache: cargo

env:
  # prevent cargo fuzz list from printing with color
  - TERM=dumb

script:
  - cargo build --verbose $TARGET --no-default-features 
  - cargo build --verbose $TARGET $FEATURES
  - 'if [[ -z "$TARGET" ]]; then cargo test --verbose; fi'
  - 'if [[ -z "$TARGET" ]]; then cargo doc --verbose; fi'
  - 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo bench --no-run; fi'
  # run for just a second to confirm that it can build and run ok
  - 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1; fi'

after_success: |
  if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then
    # Calculate test coverage
    cargo tarpaulin --out Xml
    bash <(curl -s https://codecov.io/bash)
  fi