-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
87 lines (78 loc) · 2.47 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
arch: amd64
os: linux
dist: bionic
language: generic
notifications:
email:
on_success: never
on_failure: always
git:
submodules: true
stages:
- name: "Thirdparty Build"
- name: "Firmware Build"
- name: "Deploy"
if: tag IS present
env:
global:
- TRAVIS_REPO_OWNER=${TRAVIS_REPO_SLUG%/*}
- TRAVIS_REPO_NAME=${TRAVIS_REPO_SLUG#*/}
- E_HIGHLIGHT="\033[1;35m"
- E_NORMAL="\033[0m"
before_script:
- export VERSION=$(cat ./VERSION)-${TRAVIS_BUILD_ID}
- echo -e "\n${E_HIGHLIGHT}Build version is ${VERSION}${E_NORMAL}\n"
jobs:
include:
- stage: "Thirdparty Build"
name: "Thirdparty on Ubuntu 18.04"
env: DEPENDENCIES_CACHE_TRICK=ubuntu-18
services:
- docker
before_install:
- docker pull kulebyaka/arm-compiler-ubuntu-18-04
- if [[ -d ./third-party/out ]]; then rm -rf ./third-party/out; fi
install: skip
script:
- docker run --name arm-docker-18 --rm -itd -v $(pwd):/${TRAVIS_REPO_NAME} kulebyaka/arm-compiler-ubuntu-18-04 /bin/bash
- docker exec -it -w /${TRAVIS_REPO_NAME} arm-docker-18 ./third-party/build_third_party.sh
- docker kill arm-docker-18
cache:
directories:
- ./third-party/out
- stage: "Firmware Build"
name: "Firmware on Ubuntu 18.04"
env: DEPENDENCIES_CACHE_TRICK=ubuntu-18
services:
- docker
before_install:
- docker pull kulebyaka/arm-compiler-ubuntu-18-04
- if [[ -d ./BUILD ]]; then rm -rf ./BUILD; fi
install: skip
script:
- docker run --name arm-docker-18 -e "VERSION=${VERSION}" --rm -itd -v $(pwd):/${TRAVIS_REPO_NAME} kulebyaka/arm-compiler-ubuntu-18-04 /bin/bash
- docker exec -it -w /${TRAVIS_REPO_NAME} arm-docker-18 ./.travis/build-firmware.sh
- docker kill arm-docker-18
cache:
directories:
- ./third-party/out
- ./BUILD
- stage: "Deploy"
name: "Firmware Deploy"
env: DEPENDENCIES_CACHE_TRICK=ubuntu-18
if: tag IS present
cache:
directories:
- ./BUILD
deploy:
- provider: releases
edge: true # flag to use Travis dpl v2
token: ${GITHUB_TOKEN}
file_glob: true
file: ./BUILD/stm-cmake*
cleanup: false
name: "Release v${VERSION}"
release_notes: "${TRAVIS_COMMIT_MESSAGE}. [Link to build log](${TRAVIS_BUILD_WEB_URL})."
on:
repo: ${TRAVIS_REPO_SLUG}
tags: true