|
1 |
| -# |
2 |
| -# Operating Environment |
3 |
| -# |
4 |
| -language: rust |
5 |
| -sudo: false |
| 1 | +# Based on the "trust" template v0.1.1 |
| 2 | +# https://github.com/japaric/trust/tree/v0.1.1 |
| 3 | + |
6 | 4 | dist: trusty
|
7 |
| -services: |
8 |
| - - docker |
9 |
| -addons: |
10 |
| - apt: |
11 |
| - packages: |
12 |
| - - gcc-multilib |
13 |
| - - libcurl4-openssl-dev |
14 |
| - - libelf-dev |
15 |
| - - libdw-dev |
16 |
| - - binutils-dev |
17 |
| - |
18 |
| -rust: |
19 |
| - - 1.7.0 # Oldest supported version |
20 |
| - - stable |
21 |
| - - beta |
22 |
| - - nightly |
23 |
| - |
24 |
| -# |
25 |
| -# Environment Variables and Build Matrix |
26 |
| -# |
| 5 | +language: rust |
| 6 | +services: docker |
| 7 | +sudo: required |
| 8 | + |
| 9 | +# This is the Rust channel that build jobs will use by default but can be |
| 10 | +# overridden on a case by case basis down below |
| 11 | +rust: 1.13.0 |
| 12 | + |
27 | 13 | env:
|
28 | 14 | global:
|
29 |
| - - PATH=$HOME/.local/bin:$PATH |
30 |
| - - TRAVIS_CARGO_NIGHTLY_FEATURE="" |
31 |
| - matrix: |
32 |
| - - ARCH=x86_64 |
33 |
| - - ARCH=i686 |
| 15 | + - CRATE_NAME=nix |
| 16 | + - CARGO_TEST_THREADS=1 |
34 | 17 |
|
35 |
| -os: # OSX included in build matrix explicitly |
36 |
| - - linux |
| 18 | + # default job |
| 19 | + - TARGET=x86_64-unknown-linux-gnu |
37 | 20 |
|
38 |
| -# Failures on nightly shouldn't fail the overall build. |
39 | 21 | matrix:
|
40 |
| - fast_finish: true |
| 22 | + # These are all the build jobs. Adjust as necessary. Comment out what you |
| 23 | + # don't need |
41 | 24 | include:
|
42 |
| - # 32-bit and 64-bit OSX builds on oldest/stable |
43 |
| - - os: osx |
44 |
| - env: ARCH=x86_64 |
45 |
| - rust: stable |
46 |
| - - os: osx |
47 |
| - env: ARCH=i686 |
48 |
| - rust: stable |
49 |
| - # Docker builds for other targets |
50 |
| - - os: linux |
51 |
| - env: TARGET=aarch64-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:arm |
52 |
| - rust: 1.7.0 |
53 |
| - sudo: true |
54 |
| - - os: linux |
55 |
| - env: TARGET=arm-unknown-linux-gnueabihf DOCKER_IMAGE=posborne/rust-cross:arm |
56 |
| - rust: 1.7.0 |
57 |
| - sudo: true |
58 |
| - - os: linux |
59 |
| - env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips |
60 |
| - rust: 1.7.0 |
61 |
| - sudo: true |
62 |
| - - os: linux |
63 |
| - env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips |
64 |
| - rust: 1.7.0 |
65 |
| - sudo: true |
66 |
| - - os: linux |
67 |
| - env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android |
68 |
| - rust: 1.7.0 |
69 |
| - sudo: true |
70 |
| - allow_failures: |
71 |
| - - rust: nightly |
72 |
| - # We need to upgrade the lowest supported version. However, the build |
73 |
| - # infrastructure for arm/mips/android is not ready yet. |
74 |
| - - rust: 1.7.0 |
75 |
| - - env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips |
76 |
| - - env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips |
77 |
| - - env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android |
| 25 | + # Linux |
| 26 | + - env: TARGET=i686-unknown-linux-gnu |
| 27 | + - env: TARGET=i686-unknown-linux-musl |
| 28 | + # - env: TARGET=x86_64-unknown-linux-gnu # this is the default job |
| 29 | + - env: TARGET=x86_64-unknown-linux-musl |
| 30 | + |
| 31 | + # OSX |
| 32 | + - env: TARGET=i686-apple-darwin |
| 33 | + os: osx |
| 34 | + - env: TARGET=x86_64-apple-darwin |
| 35 | + os: osx |
| 36 | + |
| 37 | + # *BSD |
| 38 | + - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 |
| 39 | + - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 |
| 40 | + - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 |
| 41 | + |
| 42 | + # Other architectures |
| 43 | + - env: TARGET=aarch64-unknown-linux-gnu |
| 44 | + - env: TARGET=armv7-unknown-linux-gnueabihf |
| 45 | + - env: TARGET=mips-unknown-linux-gnu |
| 46 | + # - env: TARGET=mips64-unknown-linux-gnuabi64 |
| 47 | + # - env: TARGET=mips64el-unknown-linux-gnuabi64 |
| 48 | + - env: TARGET=mipsel-unknown-linux-gnu |
| 49 | + - env: TARGET=powerpc-unknown-linux-gnu |
| 50 | + # - env: TARGET=powerpc64-unknown-linux-gnu |
| 51 | + # - env: TARGET=powerpc64le-unknown-linux-gnu |
| 52 | + # - env: TARGET=s390x-unknown-linux-gnu |
| 53 | + - env: TARGET=arm-unknown-linux-gnueabi |
| 54 | + # - env: TARGET=arm-unknown-linux-musleabi |
78 | 55 |
|
| 56 | + # Testing beta on main targets |
| 57 | + - env: TARGET=x86_64-unknown-linux-gnu |
| 58 | + rust: beta |
| 59 | + - env: TARGET=x86_64-apple-darwin |
| 60 | + os: osx |
| 61 | + rust: beta |
79 | 62 |
|
80 |
| -# |
81 |
| -# Build/Test/Deploy Steps |
82 |
| -# |
83 |
| -before_script: |
84 |
| - - pip install 'travis-cargo<0.2' --user |
| 63 | + # Testing nightly on main targets (allowed to fail) |
| 64 | + - env: TARGET=x86_64-unknown-linux-gnu |
| 65 | + rust: nightly |
| 66 | + - env: TARGET=x86_64-apple-darwin |
| 67 | + os: osx |
| 68 | + rust: nightly |
| 69 | + |
| 70 | + # Testing nightlies on main targets. These might fail because of issues |
| 71 | + # with the compiler, so we allow failures here. |
| 72 | + allow_failures: |
| 73 | + # Failures for nightlies may be because of compiler bugs, so don't fail the |
| 74 | + # build if these fail. |
| 75 | + - env: TARGET=x86_64-unknown-linux-gnu |
| 76 | + rust: nightly |
| 77 | + - env: TARGET=x86_64-apple-darwin |
| 78 | + os: osx |
| 79 | + rust: nightly |
| 80 | + # FIXME: targets that should pass but are currently failing |
| 81 | + - env: TARGET=i686-unknown-linux-musl |
| 82 | + - env: TARGET=x86_64-unknown-linux-musl |
| 83 | + - env: TARGET=mips-unknown-linux-gnu |
| 84 | + - env: TARGET=mipsel-unknown-linux-gnu |
| 85 | + - env: TARGET=powerpc-unknown-linux-gnu |
| 86 | + |
| 87 | +install: |
| 88 | + - sh ci/install.sh |
| 89 | + - source ~/.cargo/env || true |
85 | 90 |
|
86 | 91 | script:
|
87 |
| - - bash ci/run-travis.sh |
88 |
| - - | |
89 |
| - if [ "$TRAVIS_OS_NAME" = "linux" ]; then |
90 |
| - travis-cargo --only stable doc |
91 |
| - fi |
92 |
| -
|
93 |
| -after_success: |
94 |
| - - | |
95 |
| - if [ "$TRAVIS_OS_NAME" = "linux" ] && \ |
96 |
| - [ "$TRAVIS_RUST_VERSION" = "stable" ] && \ |
97 |
| - [ "$ARCH" = "x86_64" ]; then |
98 |
| - # Upload docs for stable (on master) to gh-pages |
99 |
| - travis-cargo --only stable doc-upload |
100 |
| - # Measure code coverage using kcov and upload to coveralls.io |
101 |
| - travis-cargo coveralls --no-sudo --verify |
102 |
| - fi |
| 92 | + - bash ci/script.sh |
| 93 | + |
| 94 | +before_deploy: |
| 95 | + - sh ci/before_deploy.sh |
| 96 | + |
| 97 | +deploy: |
| 98 | + # TODO update `api_key.secure` |
| 99 | + # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new |
| 100 | + # - Encrypt it: `travis encrypt GH_TOKEN=0123456789012345678901234567890123456789` |
| 101 | + # - Paste the output down here |
| 102 | + api_key: |
| 103 | + secure: S1ktt0eqmfrEHnYPf4WO7mZtatz/FWfYWBp8nwdc0nd8H6UNZ9Dwy3tJpVe0N9rpB9vAFnkdw6R4jdkIcgxfory2F3F8k/mh8cWn0mkvh2N34YjHMYLnuVzOoFrWai7IcPfROpdlY0tGBlwNj5KMkeBnHUJzd2q4j/4j/tlrfmg= |
| 104 | + file_glob: true |
| 105 | + file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* |
| 106 | + on: |
| 107 | + # Here you can pick which targets will generate binary releases |
| 108 | + # In this example, there are some targets that are tested using the stable |
| 109 | + # and nightly channels. This condition makes sure there is only one release |
| 110 | + # for such targets and that's generated using the stable channel |
| 111 | + # |
| 112 | + # Here we make it so we never generate binary releases |
| 113 | + condition: $DEPLOY = never |
| 114 | + tags: true |
| 115 | + provider: releases |
| 116 | + skip_cleanup: true |
| 117 | + |
| 118 | +cache: cargo |
| 119 | +before_cache: |
| 120 | + # Travis can't cache files that are not readable by "others" |
| 121 | + - chmod -R a+r $HOME/.cargo |
| 122 | + |
| 123 | +branches: |
| 124 | + only: |
| 125 | + # release tags |
| 126 | + - /^v\d+\.\d+\.\d+.*$/ |
| 127 | + - master |
| 128 | + |
| 129 | +notifications: |
| 130 | + email: |
| 131 | + on_success: never |
0 commit comments