-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
55 lines (50 loc) · 2.29 KB
/
circle.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
# Configuration set at the UI:
# - Ubuntu Trusty machine at https://circleci.com/gh/dasfoo/rover/edit#build-environment.
# - SSH private key for deployment at https://circleci.com/gh/dasfoo/rover/edit#ssh.
# - COVERALLS_TOKEN at https://circleci.com/gh/dasfoo/rover/edit#env-vars,
# get value from https://coveralls.io/github/dasfoo/rover.
machine:
environment:
PATH: "${HOME?}/.protoc:${HOME?}/.local/bin:~/.go_workspace/bin:${PATH}"
# Can't be an absolute path because Circle CI's "pwd:" prepends it with default working directory.
PACKAGE_PATH: "../.go_workspace/src/github.com/${CIRCLE_PROJECT_USERNAME?}/${CIRCLE_PROJECT_REPONAME?}"
PLATFORMIO_BUILD_FLAGS: "-Wall -Werror"
checkout:
post:
- git submodule sync
- git submodule update --init
dependencies:
override:
- sudo apt install -yq --no-install-suggests --no-install-recommends --force-yes libi2c-dev gcc-arm-linux-gnueabi libc6-dev-armel-cross
- pip install --user --upgrade platformio
- platformio lib --global install "DHT sensor library" "EasyVR"
- platformio lib --global update
# The default action of Circle CI is weird. It creates a symlink to the project in ~/.go_project,
# but dependencies in ~/.go_workspace. We don't want to mess around with this setup and just put
# everything together.
# Also clean the build space so that we get the latest versions of all dependencies.
- rm -rf "${HOME?}/.go_workspace"
- mkdir -p "${PACKAGE_PATH?}" && rm -rf "${PACKAGE_PATH?}" && ln -sfT "${PWD?}" "${PACKAGE_PATH?}"
- curl https://raw.githubusercontent.com/dasfoo/travis/master/install-protoc.sh | sh
cache_directories:
- ~/.platformio
test:
override:
# Raspberry Pi part
- curl https://raw.githubusercontent.com/dasfoo/travis/master/go.sh | ENV=<(bin/deploy env) sh:
pwd: "${PACKAGE_PATH?}"
- eval "$(bin/deploy env)" && go build
- mv rover "${CIRCLE_ARTIFACTS?}"
# Common arduino part
- curl https://raw.githubusercontent.com/dasfoo/travis/master/cpp.sh | sh -s bb/* mc/*
# BotBoarduino part
- platformio ci --board=diecimilaatmega328 bb
# MotorController part
- platformio ci --board=diecimilaatmega328 mc
# Shell part
- curl https://raw.githubusercontent.com/dasfoo/travis/master/shell.sh | sh -s bin/*
deployment:
master:
branch: master
commands:
- bin/deploy push