-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
83 lines (71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
os: linux
dist: bionic
language: python
python:
- "3.8"
cache:
directories:
- ${HOME}/.pio
env:
global:
# - BUILDER_TOTAL_THREADS=4
- BUILDER_TOTAL_THREADS=1
- OWNER=${TRAVIS_REPO_SLUG%/*}
- DEV=${OWNER/Victor-Mo/dev}
- BRANCH=${TRAVIS_BRANCH/dev/}
- TAG=${DEV}${BRANCH:+_}${BRANCH}
install:
- env | grep TRAVIS
- set -e
- pip install -U platformio
- pio platform update -p
- set +e
branches:
except:
- /^travis-.*-build$/
script:
- ./scripts/build.sh
# - ./scripts/build.sh -p
stages:
- name: Release
# if: type IN (cron, api)
jobs:
include:
- stage: Release
# env: BUILDER_THREAD=0
# - env: BUILDER_THREAD=1
# - env: BUILDER_THREAD=2
# - env: BUILDER_THREAD=3
before_deploy:
- export FIRMWARE_VERSION=$(grep -E '^#define APP_VERSION' ./src/version.h | awk '{print $3}' | sed 's/"//g')
- git tag -f travis-${TAG}-build
- git remote add gh
https://${OWNER}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git push gh :travis-${TAG}-build || true
- git push -f gh travis-${TAG}-build
- git remote remove gh
deploy:
provider: releases
edge:
# source: wenkokke/dpl
branch: master
token: ${GITHUB_TOKEN}
file_glob: true
# file: "firmware/*.bin"
file: "*.bin"
name: latest development build
release_notes:
Version $FIRMWARE_VERSION.
Automatic firmware builds of the current IRT-ESP branch built on $(date +'%F %T %Z') from commit $TRAVIS_COMMIT.
Warning, this is a development build and not fully tested. Use at your own risk.
cleanup: false
prerelease: true
overwrite: true
target_commitish: $TRAVIS_COMMIT
on:
tags: false
branch: master
notifications:
email:
on_success: change
on_failure: change