|
| 1 | +# Based on the "trust" template v0.1.1 |
| 2 | +# https://github.com/japaric/trust/tree/v0.1.1 |
| 3 | + |
| 4 | +dist: trusty |
1 | 5 | language: rust
|
2 |
| -cache: cargo |
| 6 | +services: docker |
| 7 | +sudo: required |
3 | 8 |
|
4 | 9 | env:
|
5 | 10 | global:
|
6 |
| - # This will be part of the release tarball |
7 |
| - # TODO change the project name |
8 |
| - - PROJECT_NAME=pickpocket |
9 |
| - # TODO comment out this variable if you don't want to build .deb packages on all the targets. |
10 |
| - - MAKE_DEB=yes |
11 |
| - # TODO update these two variables. They are part of the .deb package metadata |
12 |
| - - DEB_MAINTAINER="Bruno Tavares <@bltavares>" |
13 |
| - - DEB_DESCRIPTION="Pocket command line manager" |
14 |
| - |
15 |
| -# AFAICT There are a few ways to set up the build jobs. This one is not the DRYest but I feel is the |
16 |
| -# easiest to reason about. |
17 |
| -# TODO Feel free to remove the channels/targets you don't need |
18 |
| -# NOTE Make *sure* you don't remove a reference (&foo) if you are going to dereference it (*foo) |
| 11 | + - CRATE_NAME=pickpocket |
| 12 | + |
19 | 13 | matrix:
|
| 14 | + # TODO These are all the build jobs. Adjust as necessary. Comment out what you |
| 15 | + # don't need |
20 | 16 | include:
|
21 |
| - # Stable channel |
22 |
| - - os: osx |
23 |
| - rust: stable |
24 |
| - env: TARGET=i686-apple-darwin CFLAGS="-I/usr/local/opt/openssl/include $CFLAGS" LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS" |
25 |
| - - os: linux |
26 |
| - rust: stable |
27 |
| - env: TARGET=i686-unknown-linux-gnu |
28 |
| - addons: |
29 |
| - apt: |
30 |
| - packages: &i686_unknown_linux_gnu |
31 |
| - # Cross compiler and cross compiled C libraries |
32 |
| - - gcc-multilib |
33 |
| - # Added packages |
34 |
| - - libssl-dev:i386 |
35 |
| - - libcrypto++-dev:i386 |
36 |
| - - os: osx |
37 |
| - rust: stable |
38 |
| - env: TARGET=x86_64-apple-darwin CFLAGS="-I/usr/local/opt/openssl/include $CFLAGS" LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS" |
39 |
| - - os: linux |
40 |
| - rust: stable |
41 |
| - env: TARGET=x86_64-unknown-linux-gnu |
42 |
| - addons: |
43 |
| - apt: |
44 |
| - packages: |
45 |
| - # Added packages |
46 |
| - - libssl-dev |
47 |
| - - libcrypto++-dev |
48 |
| - |
49 |
| -before_install: |
50 |
| - - export PATH="$PATH:$HOME/.cargo/bin" |
| 17 | + # Linux |
| 18 | + - env: TARGET=i686-unknown-linux-gnu |
| 19 | + - env: TARGET=i686-unknown-linux-musl |
| 20 | + - env: TARGET=x86_64-unknown-linux-gnu |
| 21 | + - env: TARGET=x86_64-unknown-linux-musl |
| 22 | + |
| 23 | + # OSX |
| 24 | + - env: TARGET=i686-apple-darwin |
| 25 | + os: osx |
| 26 | + - env: TARGET=x86_64-apple-darwin |
| 27 | + os: osx |
| 28 | + |
| 29 | + # *BSD |
| 30 | + - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 |
| 31 | + - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 |
| 32 | + - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 |
| 33 | + |
| 34 | + # Other architectures |
| 35 | + - env: TARGET=aarch64-unknown-linux-gnu |
| 36 | + - env: TARGET=armv7-unknown-linux-gnueabihf |
| 37 | + - env: TARGET=mips-unknown-linux-gnu |
| 38 | + - env: TARGET=mips64-unknown-linux-gnuabi64 |
| 39 | + - env: TARGET=mips64el-unknown-linux-gnuabi64 |
| 40 | + - env: TARGET=mipsel-unknown-linux-gnu |
| 41 | + - env: TARGET=powerpc-unknown-linux-gnu |
| 42 | + - env: TARGET=powerpc64-unknown-linux-gnu |
| 43 | + - env: TARGET=powerpc64le-unknown-linux-gnu |
| 44 | + - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1 |
| 45 | + |
| 46 | + # Testing other channels |
| 47 | + - env: TARGET=x86_64-unknown-linux-gnu |
| 48 | + rust: nightly |
| 49 | + - env: TARGET=x86_64-apple-darwin |
| 50 | + os: osx |
| 51 | + rust: nightly |
| 52 | + |
| 53 | +before_install: set -e |
51 | 54 |
|
52 | 55 | install:
|
53 |
| - - bash scripts/install.sh |
| 56 | + - sh ci/install.sh |
| 57 | + - source ~/.cargo/env || true |
54 | 58 |
|
55 | 59 | script:
|
56 |
| - - bash scripts/script.sh |
| 60 | + - bash ci/script.sh |
| 61 | + |
| 62 | +after_script: set +e |
57 | 63 |
|
58 | 64 | before_deploy:
|
59 |
| - - bash scripts/before_deploy.sh |
| 65 | + - sh ci/before_deploy.sh |
60 | 66 |
|
61 | 67 | deploy:
|
62 |
| - provider: releases |
63 |
| - # TODO Regenerate this api_key for your project, this one won't work for you. Here's how: |
64 |
| - # - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the |
65 |
| - # `public_repo` scope enabled |
66 |
| - # - Call `travis encrypt $github_token` where $github_token is the token you got in the previous |
67 |
| - # step and `travis` is the official Travis CI gem (see https://rubygems.org/gems/travis/) |
68 |
| - # - Enter the "encrypted value" below |
69 | 68 | api_key:
|
70 | 69 | secure: "ICxMkUIseLvzdnE1JCqipkYQFa43pC2Sv44HA3CcI/8bgOHNbRD81d69CnHnbXZeOAdPbX6TiMKGI3UhDYpHS65sH8Z7npr51zwcC7VMHsCzOFvBcA0fWoXyEZ0CZErD6gYrzHZnfm2TDQs0p9z8x69ULY6OaQS3UUhTl6lFHtOdWXT14lirppar80HIq8+d3k8jbsxp71mTqHqcWyGV9T7Aq6wJU0c+0nNM2W6S+nVP1FUOjF4gNrtXrtBKyY6e1vTd7nz7ZGntdQeFFjAqDLOZz+0F3k3+RW2F8WJZA/nPvREFMaBiM1+ULD7JAafrh+c+CBbugPSOYpQfM7Oqn+TCdm3UFpMu4kicJFYuDj8GTw5vDi8tS9T93OfCeAYbGJsAAFv4VJYiRUxrhtm0JksEZpfT5fNo+oqi4SCmQhtz/DIcZ9FYrKEtb9A1XmcoYkmHHHIffXRtiBTQjgwoQoEA5qZPalsS/RBiSkXvlzezu1Hy08Fw+B9avxcmMWtKxzEJq9RPC6ucbBXjA09IxJjkDB3hdSx8ciQsC4QYI/U3Yhp90xzPnpOf1HU6/9xOg9zHIknPu5bB9/tk3CqThSrA8emc5oJJAsk05F/0X/ERZ3I5f3i2werevq+fp7RElzA0yPG1oFrklEPZOD2x/VAYXrrHyWNuX5kKDfjtOGE="
|
71 | 70 | file_glob: true
|
72 |
| - file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.* |
73 |
| - # don't delete the artifacts from previous phases |
74 |
| - skip_cleanup: true |
75 |
| - # deploy when a new tag is pushed |
| 71 | + file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* |
76 | 72 | on:
|
77 |
| - # channel to use to produce the release artifacts |
78 |
| - # NOTE make sure you only release *once* per target |
79 |
| - # TODO you may want to pick a different channel |
80 | 73 | condition: $TRAVIS_RUST_VERSION = stable
|
81 | 74 | tags: true
|
| 75 | + provider: releases |
| 76 | + skip_cleanup: true |
| 77 | + |
| 78 | +cache: cargo |
| 79 | +before_cache: |
| 80 | + - chmod -R a+r $HOME/.cargo |
82 | 81 |
|
83 | 82 | branches:
|
84 | 83 | only:
|
85 |
| - # Pushes and PR to the master branch |
86 |
| - - master |
87 |
| - # IMPORTANT Ruby regex to match tags. Required, or travis won't trigger deploys when a new tag |
88 |
| - # is pushed. This regex matches semantic versions like v1.2.3-rc4+2016.02.22 |
89 | 84 | - /^v\d+\.\d+\.\d+.*$/
|
| 85 | + - master |
90 | 86 |
|
91 | 87 | notifications:
|
92 | 88 | email:
|
|
0 commit comments