1
1
# Travis CI configuration for automated .mpy file generation.
2
+ # Version: 2.0 (support for both .mpy and packages)
2
3
# Author: Tony DiCola
3
4
# License: Public Domain
4
5
# This configuration will work with Travis CI (travis-ci.org) to automacially
5
- # build .mpy files for CircuitPython when a new tagged release is created. This
6
- # file is relatively generic and can be shared across multiple repositories by
7
- # following these steps:
6
+ # build .mpy files and packages for MicroPython when a new tagged release is
7
+ # created. This file is relatively generic and can be shared across multiple
8
+ # repositories by following these steps:
8
9
# 1. Copy this file into a .travis.yml file in the root of the repository.
9
- # 2. Change the deploy > file section below to list each of the .mpy files
10
- # that should be generated. The config will automatically look for
11
- # .py files with the same name as the source for generating the .mpy files.
12
- # Note that the .mpy extension should be lower case!
10
+ # 2. Change the deploy > file section below to list each of the .mpy files or
11
+ # package .zip files that should be generated.
12
+ # For each .mpy file listed the config will automatically look for .py files
13
+ # with the same name as the source for generating the .mpy files. Note that
14
+ # the .mpy extension should be lower case!
15
+ # For each .zip file listed the config will assume a folder with the same
16
+ # name exists (minus the .zip extension) and will recursively walk the folder
17
+ # to generate .mpy versions of all .py files EXCEPT __init__.py (not supported
18
+ # right now because of a bug). Then a zip of the directory will be generated
19
+ # with just the .mpy and __init__.py files.
13
20
# 3. Commit the .travis.yml file and push it to GitHub.
14
21
# 4. Go to travis-ci.org and find the repository (it needs to be setup to access
15
22
# your github account, and your github account needs access to write to the
@@ -36,18 +43,17 @@ deploy:
36
43
provider : releases
37
44
api_key : $GITHUB_TOKEN
38
45
file :
39
- - " adafruit_ads21x15.mpy "
46
+ - adafruit_ads1x15.zip
40
47
skip_cleanup : true
41
48
on :
42
49
tags : true
43
50
44
51
before_install :
45
- - sudo apt-get -yqq update
46
- - sudo apt-get install -y build-essential git python python-pip
47
- - git clone https://github.com/adafruit/circuitpython.git
48
- - make -C circuitpython/mpy-cross
49
- - export PATH=$PATH:$PWD/circuitpython/mpy-cross/
50
- - sudo pip install shyaml
52
+ - wget https://raw.githubusercontent.com/adafruit/MicroPython_TravisCI_Deploy/master/install_dependencies.sh
53
+ - chmod +x install_dependencies.sh
54
+ - source install_dependencies.sh
51
55
52
56
before_deploy :
53
- - shyaml get-values deploy.file < .travis.yml | sed 's/.mpy/.py/' | xargs -L1 mpy-cross
57
+ - wget https://raw.githubusercontent.com/adafruit/MicroPython_TravisCI_Deploy/master/build_release.sh
58
+ - chmod +x build_release.sh
59
+ - ./build_release.sh
0 commit comments