-
Notifications
You must be signed in to change notification settings - Fork 32
/
travis.yml
63 lines (56 loc) · 2.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
language: rust
rust: nightly-2020-03-19
os:
- linux
- osx
- windows
matrix:
include:
- env: JOB=rustfmt
os: linux
install:
rustup component add rustfmt
script:
cargo fmt --all -- --check
allow_failures:
- os: windows
before_install:
- |
set -e
# fail loudly when force-pushed
git diff --name-only $TRAVIS_COMMIT_RANGE > /dev/null
# waiting for native solution https://github.com/travis-ci/travis-ci/issues/6301
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^docs)/'; then
echo "Only docs were updated, stopping build process."
exit
fi
- |
rust_toolchain="$(cat rust-toolchain)"
travis_yml="$(grep '^rust: ' .travis.yml | head -n 1 | sed -E 's/^rust: //')"
if [[ $travis_yml != $rust_toolchain ]]; then
echo "error: the rust version in travis is different from the one in rust-toolchain!" 1>&2
exit 1
fi
install:
- bash ./scripts/install.sh
script:
- make
- make build-semihosting
- "[[ ${TRAVIS_OS_NAME} != 'windows' ]] && make bloat || true"
before_deploy:
- git config --local user.name "Andreas Heider"
- git config --local user.email "andreas@heider.io"
- git tag "$(date +'%Y-%m-%d')-$TRAVIS_BUILD_NUMBER-${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}-$(git log --format=%h -1)"
branches:
except:
- /^\d+-\d+-\d+-.*/
deploy:
on:
condition: "${TRAVIS_OS_NAME} == 'linux'"
provider: releases
api_key:
secure: "hSYihrRGZNCwdZQkmQoIlPHsUYewhaKJpui45vR8vYyUg3S1l2lGPTkIffA5VILZ/ozZiB/uynYNJlRxGG0+ZyZzZRsHEUS8dY/GpYHEjEvAMVJE/JkG4gKcXD7q9Tvwdik7huzzilAjbw4wAdkY3IiIXMQhpoPc3Dele7RTUdilpWzi3UtZyvrs0k0f2Gfovu2yXkkpXsC5Pwm17Pe0sGa+ilB1OlZ1lWrCA8zHtSBH+V4IztgKf1c7kPr5nWG8uLvMYmlun9l0/ahymh8SJyAOm0EHkhfZYCX/EG2JG0NYTAQJ88Ags+xbDWaoGtNo+R+yzAUG5PfcaAXKAj6I10Rsg6/ckCSFlliDtKi6qrV2+YmbnXchy97PqlJM0zZKWzpvncXlhJ46O3DoMm4L5btj9hCahagqfJpNEZ8olnLlVhzFTGBGPyQVvMudPXcFSDMHLGejNPxua5lq+LOlEH2gSezDc9Qzm96tpiYu1lKt8Ousz7lAin9BS/7+ES7W2Fx2I5cQ7965kxARGzyhHCQXOkGPrj/M6tW6qlec3AS6yM+oxTvQnKJPhbERaClio46NukUbIG4CZ+Hwi2jtb8tLQ6g1J7fbA2ac3faiw3MmZDNmGSW0DGaOUkv/EGuoHc5sTNR6fITYTbkH2g24G1iYnsg3kLNiseSkODJxySo="
file:
- "target/thumbv7m-none-eabi/release/anne-key"
- "anne-key.dfu"
skip_cleanup: true