forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml.bak
88 lines (86 loc) · 4.09 KB
/
.travis.yml.bak
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
87
88
# global options
dist: xenial
language:
- c
compiler:
- gcc
cache:
edge: true
directories:
- "${HOME}/persist"
env:
global:
- MAKEOPTS="-j4"
# define the successive stages
stages:
- name: staging
# define the jobs for the stages
# order of the jobs has longest running first to optimise total time
jobs:
include:
# esp32
- stage: staging
env: NAME="esp32 port build"
before_install:
- export D_START=$(date -u +%s)
- git submodule update --init --recursive
- wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
- tar -zxvf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
- export PATH=$HOME/build/ilyamordasov/micropython/xtensa-esp32-elf/bin:$PATH
install:
- sudo apt-get install gcc
- sudo apt-get install jq
- sudo apt-get install git
- sudo apt-get install wget
- sudo apt-get install make
- sudo apt-get install libncurses-dev
- sudo apt-get install flex
- sudo apt-get install bison
- sudo apt-get install gperf
- sudo apt-get install python3-dev
- sudo apt-get install python3
- sudo apt-get install python3-pip
- sudo apt-get install python-serial
- sudo apt-get install python3-pyparsing
- sudo apt-get install -y python3-setuptools
- pip3 install pyparsing
- pip3 install coveralls
- pip3 install --user cpp-coveralls
script:
- cd $HOME/build/ilyamordasov/micropython
- git submodule update --init
- git submodule init lib/berkeley-db-1.xx
- cd lib/ESP-IDF
- git checkout $IDF_HASH
- cd ../..
- git submodule update
- export IDF_PATH=$HOME/build/ilyamordasov/micropython/lib/ESP-IDF
- make ${MAKEOPTS} -C mpy-cross
- make ${MAKEOPTS} -C ports/esp32
- cd $HOME/build/ilyamordasov/micropython/ports/esp32/build
- zip -r -j ESP32_v.1.10.${TRAVIS_BUILD_NUMBER}_${TRAVIS_BRANCH}.zip *.bin *.elf
- ZIP=$(readlink -f ESP32_v.1.10.${TRAVIS_BUILD_NUMBER}_${TRAVIS_BRANCH}.zip)
after_success:
- |
COMPARE_URL=$(curl -s -X GET https://api.travis-ci.org/repo/ilyamordasov%2Fmicropython/requests -H 'Authorization: token $TRAVIS_API_TOKEN' -H 'Travis-API-Version: 3' -H 'User-Agent: API Explorer' | jq .requests[0].commit.compare_url)
echo $COMPARE_URL
curl -X POST -H 'Content-type: application/json' --data "{\"attachments\":[{\"text\":\"[ESP32] Repo \`${TRAVIS_REPO_SLUG}\` *passed* build (<${TRAVIS_BUILD_WEB_URL}|${TRAVIS_BUILD_NUMBER}>) for <${COMPARE_URL}|commit> on branch *${TRAVIS_BRANCH}*\n\",\"color\":\"good\",\"attachment_type\":\"default\",\"actions\":[{\"text\":\"View Release\",\"type\":\"button\",\"url\":\"https://github.com/ilyamordasov/micropython/releases\"}], \"footer\": \"Execution time: *$TIME_EXEC*\"}]}" $SLACK_WEBHOOK_URL
after_failure:
- |
COMPARE_URL=$(curl -s -X GET https://api.travis-ci.org/repo/${TRAVIS_REPO_SLUG}/requests -H 'Authorization: token $TRAVIS_API_TOKEN' -H 'Travis-API-Version: 3' -H 'User-Agent: API Explorer' | jq .requests[0].commit.compare_url)
curl -X POST -H 'Content-type: application/json' --data "{\"attachments\":[{\"text\":\"[ESP32] Repo \`${TRAVIS_REPO_SLUG}\` *failed* build (<${TRAVIS_BUILD_WEB_URL}|${TRAVIS_BUILD_NUMBER}>) for <${COMPARE_URL}|commit> on branch *${TRAVIS_BRANCH}*\",\"color\":\"danger\",\"attachment_type\":\"default\",\"actions\":[{\"text\":\"Show log\",\"type\":\"button\",\"url\":\"$TRAVIS_JOB_WEB_URL\"}], \"footer\": \"Execution time: *$TIME_EXEC*\"}]}" $SLACK_WEBHOOK_URL
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "ilyamordasov"
- git config --local user.email "[email protected]"
- git tag -d ${TRAVIS_BRANCH}
- git tag ${TRAVIS_BRANCH}
deploy:
# deploying
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: $ZIP
skip_cleanup: true
overwrite: true
on:
tags: true