forked from nerves-project/nerves_system_rpi3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (80 loc) · 2.35 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
language: erlang
otp_release:
- 19.0
# It would be possible to use the container-based infrastructure if
# it ran trusty. However, it doesn't and wget is too old to use for
# HTTPS to buildroot.net.
sudo: required
dist: trusty
# Install dependencies
addons:
apt:
packages:
- bc
- libssl-dev
notifications:
webhooks:
urls:
- $GITTER_WEBHOOK_URL
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
# Cache downloaded files between builds
cache:
directories:
- $HOME/.nerves/cache/buildroot
env:
- NERVES_TARGET=rpi3 CI_SYSTEM_NAME=nerves_system_$NERVES_TARGET REPO=nerves-project/$CI_SYSTEM_NAME NERVES_SYSTEM_CACHE=none NERVES_SYSTEM_COMPILER=local NERVES_PACKAGE=`pwd`
before_install:
- git clone https://github.com/elixir-lang/elixir
- cd elixir
- git checkout v1.3
- make clean
- make
- cd ..
before_script:
- export PATH=`pwd`/elixir/bin:$PATH
script:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix archive.install https://github.com/nerves-project/archives/raw/master/nerves_bootstrap.ez --force
- mix compile
- export NERVES_SYSTEM=$NERVES_PACKAGE/_build/dev/nerves/system
- export NERVES_TOOLCHAIN=$NERVES_PACKAGE/_build/dev/nerves/toolchain
- git clone https://github.com/nerves-project/nerves-examples
- cd nerves-examples/hello_gpio
- MIX_ENV=travis mix deps.get
- MIX_ENV=travis mix compile
- MIX_ENV=travis mix firmware
# Deploy the build products
before_deploy:
- cd $NERVES_PACKAGE
- mix compress.nerves_system
- $NERVES_PACKAGE/deps/nerves_system_br/scripts/ci-deploy.sh
deploy:
# Deploy tagged releases to GitHub
- provider: releases
api_key: $GITHUB_API_KEY
file:
- "artifacts/$CI_SYSTEM_NAME-$TRAVIS_TAG.tar.gz"
- "artifacts/$CI_SYSTEM_NAME-$TRAVIS_TAG.fw"
skip_cleanup: true
overwrite: true
on:
repo: $REPO
tags: true
- provider: s3
access_key_id: $S3_ID
secret_access_key: $S3_KEY
bucket: $S3_BUCKET
skip_cleanup: true
local_dir: artifacts
upload-dir: test
acl: public_read
on:
repo: $REPO
all_branches: true
# Display build log on failure
after_failure:
- tail -n 1000 $NERVES_PACKAGE/build.log