Initial PlatformIO and Travis support

This commit is contained in:
Kyle Gordon 2018-10-05 21:41:25 +01:00
parent ff32c0d1c6
commit 87db536cfb
4 changed files with 57 additions and 0 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
Settings_local.h
.pioenvs
.piolibdeps
lib

26
.travis.yml Normal file
View File

@ -0,0 +1,26 @@
language: python
python:
- "2.7"
# Cache PlatformIO packages using Travis CI container-based infrastructure
sudo: false
git:
submodules: true
cache:
directories:
- "~/.platformio"
env:
- PLATFORMIO_CI_SRC=ESP32-mqtt-room.ino.ino
install:
- pip install -U platformio
before_script:
- cp Settings_CI.h Settings_local.h
script:
- platformio lib update
- platformio run

10
Settings_CI.h Normal file
View File

@ -0,0 +1,10 @@
#define ssid "Travis"
#define password "123456789"
#define hostname "esp32_room_presence"
#define mqttServer "192.168.1.1"
#define mqttPort 1883
#define mqttUser "homeassistant"
#define mqttPassword "123456789"
#define room "living-room"
#define channel "room_presence"
#define scanInterval 15

18
platformio.ini Normal file
View File

@ -0,0 +1,18 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = .
[env:esp32]
platform = espressif32
framework = arduino
board = esp32dev
lib_deps = PubSubClient, ArduinoJSON