Skip to content

Commit 1d9518a

Browse files
committed
fix .travis.yml
1 parent 47b7a5c commit 1d9518a

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.travis.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# Travis CI configuration for automated .mpy file generation.
2+
# Version: 2.0 (support for both .mpy and packages)
23
# Author: Tony DiCola
34
# License: Public Domain
45
# 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:
89
# 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.
1320
# 3. Commit the .travis.yml file and push it to GitHub.
1421
# 4. Go to travis-ci.org and find the repository (it needs to be setup to access
1522
# your github account, and your github account needs access to write to the
@@ -36,18 +43,17 @@ deploy:
3643
provider: releases
3744
api_key: $GITHUB_TOKEN
3845
file:
39-
- "adafruit_ads21x15.mpy"
46+
- adafruit_ads1x15.zip
4047
skip_cleanup: true
4148
on:
4249
tags: true
4350

4451
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
5155

5256
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

Comments
 (0)