forked from ClusterDuck-Protocol/ClusterDuck-Protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (86 loc) · 4.09 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
language: generic
dist: bionic
env:
global:
- CLI_VERSION=master
matrix:
- BOARD="esp32:esp32:heltec_wifi_lora_32_V2"
- BOARD="esp32:esp32:t-beam"
before_install:
- sudo add-apt-repository --yes ppa:nnstreamer/ppa
- sudo apt-get update
- sudo apt-get -y install cppcheck
# not sure if this is needed, but in the Docker testing pyserial wasn't installed
# and is needed for ESP loader
- python -m pip install pyserial
- cppcheck --version
- cppcheck --force --error-exitcode=1 src
- curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s
- export PATH=$PATH:$PWD/bin/
- arduino-cli config init
- arduino-cli config set library.enable_unsafe_install true
- arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- if [[ "$BOARD" =~ "esp32:esp32:" ]]; then
arduino-cli core install esp32:esp32 --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json;
fi
# This GH repo no longer exists
# Replace with for loop below
# - wget https://github.com/tarampampam/arduino-deps-installer/releases/download/v0.0.1/arduino-deps-installer-linux-amd64 -O $PWD/bin/arduino-deps-installer && chmod +x $PWD/bin/arduino-deps-installer
# - arduino-deps-installer install --work-dir ${PWD}
# install library in current state
- rsync -rltv --exclude=.git --exclude=bin ${PWD}/ /tmp/CDP/ && (cd /tmp && zip -r /tmp/cdp.zip CDP) && arduino-cli lib install --zip-path /tmp/cdp.zip
- |-
file="library.properties"
function prop {
PROP_VALUE=`cat $file | grep "${1}" | cut -d'=' -f2`
echo $PROP_VALUE
}
dependsvar=$(prop "depends")
IFS=$'\n' read -r -d '' -a the_array < <(awk -F',' '{ for( i=1; i<=NF; i++) print $i }' <<<"$dependsvar")
for i in "${the_array[@]}"
do
echo "$i"
if [[ "$i" == *"github"* ]]; then
arduino-cli lib install --git-url "$i"
elif [[ "$i" == *".zip"* ]]; then
arduino-cli lib install --zip-path "$i"
else
arduino-cli lib install "$i"
fi
done
# - installExampleArduinoDeps() { arduino-deps-installer install --work-dir $PWD/examples/$1/$2; }
# - buildExampleSketch() { installExampleArduinoDeps $1 $2; arduino-cli compile -t -b $BOARD $PWD/examples/$1/$2/$2.ino; }
- buildExampleSketch() { arduino-cli compile -t -b $BOARD $PWD/examples/$1/$2/$2.ino; }
script:
- buildExampleSketch 1.Ducks DuckLink
- buildExampleSketch 1.Ducks MamaDuck
- buildExampleSketch 1.Ducks PapaDuck
- buildExampleSketch 1.Ducks DetectorDuck
# - buildExampleSketch 2.Custom-Mama-Examples Custom-Mama-Example
# - buildExampleSketch 2.Custom-Mama-Examples Custom-Portal-Example
# - buildExampleSketch 2.Custom-Mama-Examples Custom-Mama-Detect
# - buildExampleSketch 3.Sensor-Examples BMP180Example
# - buildExampleSketch 3.Sensor-Examples BMP280Example
# - buildExampleSketch 3.Sensor-Examples DHT11Example
# - buildExampleSketch 3.Sensor-Examples DustSensorExample
# - buildExampleSketch 3.Sensor-Examples MQ7Example
# - buildExampleSketch 3.Sensor-Examples WS2812Example
# - if [[ "$BOARD" != "esp32:esp32:t-beam" ]]; then
# buildExampleSketch 4.Ble-Duck-App Ble-Duck-App;
# fi
# - buildExampleSketch 5.Custom-Papa-Examples Papa-DishDuck
# - buildExampleSketch 5.Custom-Papa-Examples Papa-DishDuck-WiFi
# - buildExampleSketch 5.Custom-Papa-Examples Papa-Downtime-Counter
# - buildExampleSketch 5.Custom-Papa-Examples PapiDuck-DMS-Lite-Serial-Example
# - buildExampleSketch 5.Custom-Papa-Examples PapiDuck-DMS-Lite-WiFi-Example
# - if [[ "$BOARD" == "esp32:esp32:t-beam" ]]; then
# buildExampleSketch 6.TTGO-TBeam-Examples TBeam-AXP-Example;
# fi
# - if [[ "$BOARD" == "esp32:esp32:t-beam" ]]; then
# buildExampleSketch 6.TTGO-TBeam-Examples TBeam-GPS-Example;
# fi
# - if [[ "$BOARD" == "esp32:esp32:t-beam" ]]; then
# buildExampleSketch 6.TTGO-TBeam-Examples TBeam-Telemetry;
# fi
# - buildExampleSketch 7.Encryption DecryptionPapaDuck
# - buildExampleSketch 7.Encryption MamaDecrypt