-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
109 lines (104 loc) · 3.3 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
language: c
matrix:
include:
- os: linux
python: 3.5
env:
- PIP='sudo pip3'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- os: osx
env:
- PYTHON=python3
env:
global:
- GOPATH: "$HOME/go"
- PYTHON=python3
before_script:
- mkdir -p ~/bin
- curl -L -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
- chmod +x ~/bin/gimme
- gimme 1.12
- source ~/.gimme/envs/go1.12.env
- sh "./tiny-firmware/protob/ci-scripts/install-${TRAVIS_OS_NAME}.sh" ;
# Define env vars for Linux builds
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export CHECK_PATH="$(pwd)/check-0.12.0" ;
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CHECK_PATH}/src" ;
export PATH="/usr/local/bin:$PATH" ;
echo "PATH=$PATH";
echo "PIP=$PIP";
fi
# Define env vars for osx builds
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
export CHECK_PATH="$(brew --prefix check)" ;
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${CHECK_PATH}/lib" ;
fi
# Install OS-specific test and build dependencies
- eval "./ci-scripts/install-${TRAVIS_OS_NAME}.sh"
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then export PATH="/opt/gcc-arm-none-eabi-6-2017-q2-update/bin:$PATH" ; fi
# Install linters
- make install-linters
- git submodule update --remote
# Install gcc 6 version, required for libskycoin
#FIXME $TRAVIS_TAG != ''
- if [[ $TRAVIS_TAG == 'osx' ]]; then
make setup-libskycoin;
./tiny-firmware/vendor/libskycoin/ci-scripts/install-travis-gcc.sh;
eval "CC=gcc-6 && CXX=g++-6";
fi
script:
- make check-protob
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then CLANG_FORMAT=clang-format-7 make lint; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then make lint; fi
- make -C tiny-firmware/protob build-c
- FIRMWARE_SIGNATURE_PUB_KEY1=0241d51e593f681006f9f3c4a0ec744d459c960601b4ed770d979c32ace63b0a7a make test
- make clean
- make emulator
- make clean
- make bootloader-mem-protect
- make bootloader-clean
- make full-firmware
- make clean
notifications:
# https://github.com/kvld/travisci-telegram TravisCI Telegram Bot integration
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
before_deploy:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
make release;
VERSION_BOOTLOADER=$(cat tiny-firmware/bootloader/VERSION);
ID_VENDOR=12602;
ID_PRODUCT=1;
export COMBINED_VERSION=${VERSION_BOOTLOADER}-${TRAVIS_TAG}-${ID_VENDOR}-${ID_PRODUCT}-1;
else
make release-emulator;
fi
deploy:
- provider: releases
api_key:
secure: TODO generate it using travis CLI
file:
- releases/skywallet-firmware-${TRAVIS_TAG}.bin
- releases/skywallet-bootloader-no-memory-protect-${VERSION_BOOTLOADER}.bin
- releases/skywallet-full-mem-protect-${COMBINED_VERSION}.bin
- releases/skywallet-bootloader-mem-protect-${VERSION_BOOTLOADER}.bin
- releases/emulator-$(uname -s)-${TRAVIS_TAG}
- releases/version.txt
skip_cleanup: true
draft: true
on:
repo: fibercrypto/skywallet-mcu
tags: true
- provider: releases
api_key:
secure: TODO generate it using travis CLI
file:
- releases/emulator-$(uname -s)-${TRAVIS_TAG}
skip_cleanup: true
draft: true
on:
repo: fibercrypto/skywallet-mcu
tags: true
condition: $TRAVIS_OS_NAME = "osx"