forked from wdv4758h/cargo-arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (113 loc) · 4.23 KB
/
.travis.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
language: rust
cache: cargo
env:
global:
# This will be part of the release tarball
- CRATE_NAME=cargo-arch
# AFAICT There are a few ways to set up the build jobs. This one is not the DRYest but I feel is the
# easiest to reason about.
# NOTE Make *sure* you don't remove a reference (&foo) if you are going to dereference it (*foo)
matrix:
include:
- os: linux
rust: nightly
env: TARGET=aarch64-unknown-linux-gnu
# need Trusty because the glibc in Precise is too old and doesn't support 64-bit arm
dist: trusty
sudo: required
# Extra packages only for this job
addons:
apt:
packages: &aarch64_unknown_linux_gnu
# Transparent emulation
- qemu-user-static
- binfmt-support
- os: linux
rust: nightly
env: TARGET=armv7-unknown-linux-gnueabihf
# sudo is needed for binfmt_misc, which is needed for transparent user qemu emulation
sudo: required
addons:
apt:
packages: &armv7_unknown_linux_gnueabihf
# Cross compiler and cross compiled C libraries
- gcc-arm-linux-gnueabihf
- libc6-armhf-cross
- libc6-dev-armhf-cross
# Transparent emulation
- qemu-user-static
- binfmt-support
- os: linux
rust: nightly
env: TARGET=i686-unknown-linux-gnu
addons:
apt:
packages: &i686_unknown_linux_gnu
# Cross compiler and cross compiled C libraries
- gcc-multilib
- os: linux
rust: nightly
env: TARGET=i686-unknown-linux-musl
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-musl
allow_failures:
- os: linux
rust: nightly
env: TARGET=aarch64-unknown-linux-gnu
# need Trusty because the glibc in Precise is too old and doesn't support 64-bit arm
dist: trusty
sudo: required
# Extra packages only for this job
addons:
apt:
packages: &aarch64_unknown_linux_gnu
# Transparent emulation
- qemu-user-static
- binfmt-support
- os: linux
rust: nightly
env: TARGET=i686-unknown-linux-musl
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-musl
before_install:
- export PATH="$PATH:$HOME/.cargo/bin"
install:
- bash ci/install.sh
script:
- bash ci/script.sh
before_deploy:
- bash ci/before_deploy.sh
deploy:
provider: releases
# - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the
# `public_repo` scope enabled
# - Call `travis encrypt $github_token` where $github_token is the token you got in the previous
# step and `travis` is the official Travis CI gem (see https://rubygems.org/gems/travis/)
# - Enter the "encrypted value" below
api_key:
secure: "eLtG57L0Qng/zGlarJ1jgE1SRi/0dTyIIlZ2Gtf7M0N7hERrAuVI732Z6KqT0V7y8wfD+YyEu5lnhydv3QtBON/F3nEH48ELovW+IbezoI2O+3eqEOZLVRdpF3EPdC1QAMzn2bUcC7o0QSOvVA9Hs7DOcQIYoi0irZBOOgFWwR0KE0FPKAsF+PE/OA80O+Gr/OkCb44HBlQ4plKxX5ZfVbRCB6UIwCMKYvchwZ7gv6QCZFsTRtvfqWcMKQIEcIYpHiRIH0yRN3E+5BqwsxkVHPzw0VIu6HOxl1jArvl/7uOX5cKyPtYDGHyBhnYvksERyc5B2xpnZla5TWo5u2EpNnZGCwS78rGjg2PVsac7IrzjTo9CLvrAE01S/ox7hpW0DUs0bVIrQhoII+pANxzL2LKJCIR6ANi6JhlR6m3jmrGimi8m8Fm3eFvJFRzhnye8Pm7Nq6pl39vfw6k7OX62Vkieym8QXnQLnGpIOj63cJ4wyQ2IvlBJ3gXOQi/gJwUpJk1KitZhHqI6LZHzzXmS8B6R1lkUHsoS0RpiW4rOxjbkGXWSyFgXNeXBKJQ1imsHD3o3lFyntlayvbn8Yy/0HviOtTFKDGF6snoInkVw4bhvMAXSGeojo0raGUOc3/flWRse3Pf8X4i2ijx2uDnqFcPE87s6iH3lZOY5ZIjnWYo="
file_glob: true
file: ${CRATE_NAME}-${TRAVIS_TAG}-${TARGET}.*
# don't delete the artifacts from previous phases
skip_cleanup: true
# deploy when a new tag is pushed
on:
# channel to use to produce the release artifacts
# NOTE make sure you only release *once* per target
condition: $TRAVIS_RUST_VERSION = nightly
tags: true
branches:
only:
# Pushes and PR to the master branch
- master
# IMPORTANT Ruby regex to match tags. Required, or travis won't trigger deploys when a new tag
# is pushed. This regex matches semantic versions like v1.2.3-rc4+2016.02.22
- /^v\d+\.\d+\.\d+.*$/
notifications:
email:
on_success: never