forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
80 lines (66 loc) · 1.92 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
dist: trusty
sudo: require
language: python
python:
- "2.7"
branches:
only:
- /^s200-\d+\.\d+\.[x\d]+$/
notifications:
email: false
# Cache PlatformIO packages using Travis CI container-based infrastructure
sudo: false
cache:
pip: true
directories:
- "~/.platformio"
env:
- TEST_PLATFORM="LPC1768"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
before_install:
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
#
# Fetch the tag information for the current branch
- git fetch origin --tags
#
# Publish the buildroot script folder
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/share/tests/*
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${TRAVIS_BUILD_DIR}/buildroot/share/tests/:${PATH}
install:
#- pip install -U platformio
- pip install -U https://github.com/platformio/platformio-core/archive/master.zip
# Update PlatformIO packages
- platformio update
before_script:
- cd ${TRAVIS_BUILD_DIR}
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/
- ls -la ${TRAVIS_BUILD_DIR}/Marlin/
- cat ${TRAVIS_BUILD_DIR}/Marlin/Version.h
script:
#- run_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- platformio run
- ls -l .pioenvs/LPC1768/firmware.bin
#- mkdir -p .pioenvs/LPC1768 && echo "test" > .pioenvs/LPC1768/firmware.bin && cp .pioenvs/LPC1768/firmware.{bin,elf}
before_deploy:
- export RELEASE_NAME=$(echo $TRAVIS_TAG | sed -e 's/\(.*\)-/\u\1 v/')
- export RELEASE_DESCRIPTION=$(echo $TRAVIS_TAG | sed -e 's/\(.*\)-\(.*\)$/Version \u\2/')
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- .pioenvs/LPC1768/firmware.bin
- .pioenvs/LPC1768/firmware.elf
skip_cleanup: true
overwrite: true
draft: true
name: "${RELEASE_NAME:-${TRAVIS_TAG:-${TRAVIS_COMMIT:0:7}}}"
body: "${RELEASE_DESCRIPTION:-No description}"
on:
#all_branches: true
tags: true