-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
64 lines (55 loc) · 1.72 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
#sudo: false
language: cpp
addons:
apt:
packages:
- libboost-all-dev
#- sdcc
- build-essential
- g++-arm-linux-gnueabihf
env:
global:
- SDCC=3.3.0
- SDCC_DIR=/tmp/sdcc-$SDCC
cache:
directories:
- $SDCC_DIR
before_install:
- export PATH=$PATH:$SDCC_DIR/bin
- chmod +x ./scripts/build-sdcc.sh
install:
- ./scripts/build-sdcc.sh
before_script:
- sdcc --version
script:
- (cd ./firmware/ver1 && make clean all)
- (cd ./firmware/ver2 && make clean all)
- (cd ./tool/test && make clean all)
- (cd ./tool && make clean all
&& (cd build_GCC
&& touch ${TRAVIS_COMMIT}.commit
&& tar zvcf ubuntu.$TRAVIS_BRANCH.tar.gz *.out *.commit) )
- (cd ./tool && BUILD_DIR=build_GCC_ARM CXX=arm-linux-gnueabihf-g++ make clean all
&& (cd build_GCC_ARM
&& touch ${TRAVIS_COMMIT}.commit
&& tar zvcf raspi.$TRAVIS_BRANCH.tar.gz *.out *.commit) )
before_deploy:
- (mkdir -p /tmp/artifacts/${TRAVIS_REPO_SLUG#*/}/tool \
&& cp -t /tmp/artifacts/${TRAVIS_REPO_SLUG#*/}/tool/ $(find ./tool -path "./tool/build_*" -a -name "*.tar.gz") )
deploy:
- provider: releases
token: $GITHUB_PERSONAL_TOKEN # Oauth token
file:
- ./firmware/ver1/build_by_sdcc/NinjaScanLight.hex
- ./firmware/ver1/build_by_sdcc/NinjaScanLight.omf
- ./firmware/ver2/build_by_sdcc/NinjaScanLight2.hex
- ./firmware/ver2/build_by_sdcc/NinjaScanLight2.omf
edge: true # opt in to dpl v2
#all_branches: true # https://github.com/travis-ci/travis-ci/issues/1675
on:
tags: true
overwrite: true
- provider: script
script: bash scripts/deploy-to-archives.sh
on:
all_branches: true