-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
58 lines (53 loc) · 2.86 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
sudo: required
language:
- python
services:
- docker
install:
- sudo apt-get update
- sudo apt-get install --no-install-recommends --no-install-suggests -y build-essential libreadline-dev libffi-dev pkg-config
- sudo pip install pycodestyle
# clone micropython, belyalov's fork of micropython-lib
- git clone --recurse-submodules https://github.com/micropython/micropython.git
- git clone https://github.com/belyalov/micropython-lib.git
# make symlinks to required modules
- export MDST=~/.micropython/lib/
- mkdir -p $MDST
- ln -s `pwd`/micropython-lib/unittest/unittest.py $MDST
- ln -s `pwd`/micropython-lib/logging/logging.py $MDST
- ln -s ../../uasyncio.core/uasyncio/core.py `pwd`/micropython-lib/uasyncio/uasyncio
- ln -s `pwd`/micropython-lib/uasyncio/uasyncio $MDST/uasyncio
- ln -s `pwd`/tinydns $MDST/tinydns
# compile/install micropython. Use release v1.9.4
- cd micropython
- git checkout v1.9.4
- sudo make -C ports/unix axtls install
- cd ..
script:
# Run style checks
- pycodestyle --ignore=E501 tinydns/ test/
# Run unittests
- ./test/test_dns.py
# Copy modules to be frozen and compile firmware for esp8266
- export MPORT=micropython/ports/esp8266/modules
- ln -s `pwd`/tinydns $MPORT/tinydns
- ln -s `pwd`/micropython-lib/uasyncio/uasyncio $MPORT/uasyncio
- docker run -v`pwd`/micropython:/micropython arsenicus/esp-open-sdk /bin/bash -c ". /.bashrc && cd /micropython/ports/esp8266 && make"
- cp micropython/ports/esp8266/build/firmware-combined.bin ./firmware_esp8266.bin
# Compile firmware for esp32
- export MPORT=micropython/ports/esp32/modules
- ln -s `pwd`/tinydns $MPORT/tinydns
- ln -s `pwd`/micropython-lib/uasyncio/uasyncio $MPORT/uasyncio
# Supported SDK for 1.9.4 is 3ede9f011b50999b0560683f9419538c066dd09e
- docker run -v`pwd`/micropython:/micropython arsenicus/esp32-open-sdk:3ede9f011b50999b0560683f9419538c066dd09e /bin/bash -c ". /.bashrc && cd /micropython/ports/esp32 && make"
- cp micropython/ports/esp32/build/firmware.bin ./firmware_esp32.bin
# deploy:
# provider: releases
# api_key:
# secure: LN9yw25ZRZt+xnD7+0Dy+kJ0EPk5AnrBfvtCsPrCRsRvb8NK+vrNtxxnslim49XpFTDOG712cDAfLnoz+SRZM1ZZn4IPmAsEFmU7FoFNTXWFt44xW6L17ER4bsGFCzLoWDohk7+Ps8V4ZOnbNXa0jm2i8FA8WuLzTBjn/btJSGxnfJei2fTYYenz96/LyaO7c1p7iaq12hcvcd15NQKSOF+JTgJV1NiPSzI8bg7HgqGR/o00Rdm5Gr91iuI97hCCVXhqfFx/VXkvOo5RwR9Ka0nNSzNg4Ijmxwv04uEHJ2pRnCOGqC951ksKu8D6+D2nHMYpNSUKwwkBy+1d3oRwN376oE46sXjX29xzxDf7Iun4F8WPh8bqhS0qfZNM3luHvjFQeXmxPCL633NkaR4P8dhWoZGxP7DECzG7bVEDvraZK1pXyFN/Ihn05AYWwZQxbbdD0t6Y6d5skguN2rGkGK5tZlzMIqrxxaZji5XDupWfJtOYQmcHRWcEsEb2Rhe5692n2AsIeSNHvBfU+rMpZyGSdiawphVo468ANzxoYVyCBcc9ymMORBOmb3Fb8bbMcCQNFs2hjwAZkxV1PyjN9GRyh7CoHoS1xLA2eryO/2UWkih1RSQbV6Ovk/XEW9ahQEBcRCXylAT2fanxdPfpqYadRk/8yToKNBbuDoGjILA=
# file:
# - firmware_esp8266.bin
# - firmware_esp32.bin
# skip_cleanup: true
# on:
# tags: true