From 6bec26cfbfd66f78265039963f45cf5080051b79 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 28 Jan 2017 18:15:46 +0200 Subject: [PATCH] Add @PlatformIO to Travis.CI (#154) * Initial version of build script for @PlatformIO; CI integration for Linux, macOS and Windows * Remove CI badges * Add @PlatformIO to Travis.CI --- .travis.yml | 11 ++++++++++- tools/platformio-build.py | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4e3996e7..b6295709 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ sudo: false -language: bash + +language: python +python: + - "2.7" + os: - linux @@ -27,6 +31,11 @@ script: - cat size.log - echo -e "travis_fold:end:size_report" + # test library examples with PlatformIO + - pip install -U https://github.com/platformio/platformio/archive/develop.zip + - platformio platform install https://github.com/platformio/platform-espressif32.git#feature/stage + - "python -c \"import glob,subprocess,sys; map(lambda p: (sys.stdout.write('Library example: %s\\n' % p), subprocess.call(['pio', 'ci', p, '--board', 'esp32dev'])), glob.glob('libraries/*/examples/*/'))\"" + notifications: email: on_success: change diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 413843b9..152afd3a 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -22,6 +22,8 @@ kinds of creative coding, interactive objects, spaces or physical experiences. http://arduino.cc/en/Reference/HomePage """ +# Extends: https://github.com/platformio/platform-espressif32/blob/develop/builder/main.py + from os.path import isdir, join from SCons.Script import DefaultEnvironment