Add CI
This commit is contained in:
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
image: python:3.8
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- "pip install -U platformio"
|
||||||
|
|
||||||
|
main_mcu:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- cd firmware/main_mcu/
|
||||||
|
- cp src/config-example.h src/config.h
|
||||||
|
- pio run
|
||||||
|
|
||||||
|
lowpower_mcu:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- cd firmware/lowpower_mcu/
|
||||||
|
- pio run
|
||||||
@@ -16,6 +16,17 @@ lib_deps =
|
|||||||
knolleary/PubSubClient@^2.8.0
|
knolleary/PubSubClient@^2.8.0
|
||||||
bblanchon/ArduinoJson@^6.17.2
|
bblanchon/ArduinoJson@^6.17.2
|
||||||
upload_speed = 115200
|
upload_speed = 115200
|
||||||
|
src_filter =
|
||||||
|
;; Default filter
|
||||||
|
+<*>
|
||||||
|
-<.git/>
|
||||||
|
-<.svn/>
|
||||||
|
-<example/>
|
||||||
|
-<examples/>
|
||||||
|
-<test/>
|
||||||
|
-<tests/>
|
||||||
|
;; Don't compile until the user adds their own config
|
||||||
|
-<src/config-example.h>
|
||||||
|
|
||||||
[env:button-release]
|
[env:button-release]
|
||||||
|
|
||||||
|
|||||||
19
firmware/main_mcu/src/config-example.h
Normal file
19
firmware/main_mcu/src/config-example.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// This is an example config file. Copy this file to "config.h" and set the
|
||||||
|
// values needed for your network.
|
||||||
|
|
||||||
|
#ifndef __CONFIG_H_
|
||||||
|
#define __CONFIG_H_
|
||||||
|
|
||||||
|
// These values will need to be modified for your environment
|
||||||
|
#define CONFIG_SSID "network-name"
|
||||||
|
#define CONFIG_PSK "password"
|
||||||
|
#define CONFIG_MQTT_SERVER "mqtt.example.com" // Either IP or hostname
|
||||||
|
#define CONFIG_MQTT_SERVER_PORT 1883 // 1883 is the default to unencrypted MQTT port
|
||||||
|
|
||||||
|
// You might want to change these, but don't likely need to.
|
||||||
|
#define CONFIG_BUTTON_EVENT_TOPIC_PREFIX "devices/"
|
||||||
|
#define CONFIG_HOMEASSISTANT_MQTT_PREFIX "homeassistant/"
|
||||||
|
#define CONFIG_BUTTON_STATE_TOPIC_NAME "state"
|
||||||
|
#define CONFIG_BUTTON_TRIGGER_TOPIC_NAME "trigger"
|
||||||
|
|
||||||
|
#endif // __CONFIG_H_
|
||||||
Reference in New Issue
Block a user