-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
84 lines (84 loc) · 2.81 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
sudo: required
language: generic
services:
- docker
env:
global:
- DOCKER="sfalexrog/img-tool:qemu-update"
- TARGET_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
- if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="${TRAVIS_COMMIT}}"; else IMAGE_VERSION="${TRAVIS_TAG}"; fi
- IMAGE_NAME="ros_cs_${IMAGE_VERSION}.img"
git:
depth: 50
jobs:
fast_finish: true
include:
- stage: Build
name: Raspberry Pi Image Build
cache:
directories:
- imgcache
before_script:
- mkdir -p lib
- pushd lib
- git clone https://github.com/mavlink/mavlink.git
- git clone https://github.com/tlsa/libcyaml.git -b v0.1.0
- git clone https://github.com/CopterExpress/pymavlink.git
- git clone https://github.com/CopterExpress/mavlink-router.git
- pushd mavlink-router
- git submodule update --init --recursive
- popd
- mkdir -p ros_cs_ws/src
- pushd ros_cs_ws/src
- git clone https://${GITHUB_USER}:${GITHUB_OAUTH_TOKEN}@github.com/CopterExpress/ros_cs.git
- pushd ros_cs
- git remote set-url origin https://github.com/CopterExpress/ros_cs.git
- git submodule update --init --recursive
- popd
- popd
- git clone https://${GITHUB_USER}:${GITHUB_OAUTH_TOKEN}@github.com/CopterExpress/mavlink-fast-switch.git
- pushd mavlink-fast-switch
- git remote set-url origin https://github.com/CopterExpress/mavlink-fast-switch.git
- git submodule update --init --recursive
- popd
- popd
- docker pull ${DOCKER}
- if [ -n "$(ls -A imgcache/*.zip)" ]; then mkdir -p images && cp imgcache/*.zip
images; fi
script:
- docker run --privileged --rm -v /dev:/dev -v $(pwd):/builder/repo -e TRAVIS_TAG="${TRAVIS_TAG}"
${DOCKER}
before_cache:
- cp images/*.zip imgcache
before_deploy:
- git config --local user.name "${GITHUB_USER}"
- git config --local user.email "${GITHUB_USER_EMAIL}"
- sudo chmod -R 777 *
- cd images && zip ${IMAGE_NAME}.zip ${IMAGE_NAME}
deploy:
provider: releases
api_key: "${GITHUB_OAUTH_TOKEN}"
file: "${IMAGE_NAME}.zip"
skip_cleanup: true
on:
tags: true
draft: true
name: "${TRAVIS_TAG}"
repo: "${RELEASES_REPO}"
- stage: Annotate
name: Auto-generate changelog
language: python
python: 3.6
install:
- pip install GitPython PyGithub
before_script:
- git clone https://github.com/mavlink/mavlink.git
- git clone https://github.com/CopterExpress/pymavlink.git
- git clone https://github.com/CopterExpress/cmavnode.git
- git clone https://${GITHUB_USER}:${GITHUB_OAUTH_TOKEN}@github.com/CopterExpress/ros_cs.git
- git clone https://${GITHUB_USER}:${GITHUB_OAUTH_TOKEN}@github.com/CopterExpress/mavlink-fast-switch.git
script:
- PYTHONUNBUFFERED=1 python ./gen_changelog.py
stages:
- Build
- Annotate