forked from EnviroDIY/ModularSensors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.travis_archive.yml
166 lines (153 loc) · 6.99 KB
/
archive.travis_archive.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
before_install:
- git config --global user.email "sdamiano@stroudcenter.org"
- git config --global user.name "SRGDamia1"
sudo: false
git:
depth: 1
sparse_checkout: continuous_integration/travis_sparse_checkout
branches:
except:
- gh-pages
cache:
pip: true
directories:
- '~/.platformio'
- $TRAVIS_BUILD_DIR/doxygen-src
language: python
python:
- '2.7'
install:
# Remove the cloned repo to emulate a user library installation
- git rm library.json
# - git rm library.properties
# - git rm -r pioScripts
# - git rm -r src
# Install PlatformIO (this should be cached!)
- pip install -U platformio
- pio upgrade
# Uninstall any old version of the current library from the Travis cache
- if pio lib -g uninstall EnviroDIY_ModularSensors; then
echo "Uninstalled cached version of ModularSensors";
fi
# Install this library from the branch we're working on
# echo "Installing ModularSensors from https://github.com/$TRAVIS_REPO_SLUG.git#$TRAVIS_BRANCH";
# echo "Installing ModularSensors from https://github.com/$TRAVIS_PULL_REQUEST_SLUG.git#$TRAVIS_PULL_REQUEST_BRANCH";
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "Installing ModularSensors from https://github.com/$TRAVIS_REPO_SLUG.git#$TRAVIS_COMMIT";
else
echo "Installing ModularSensors from https://github.com/$TRAVIS_PULL_REQUEST_SLUG.git#$TRAVIS_PULL_REQUEST_SHA";
fi
# pio lib -g install https://github.com/$TRAVIS_REPO_SLUG.git#$BRANCH;
# pio lib -g install https://github.com/$TRAVIS_PULL_REQUEST_SLUG.git#$TRAVIS_PULL_REQUEST_BRANCH;
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
pio lib -g install https://github.com/$TRAVIS_REPO_SLUG.git#$TRAVIS_COMMIT;
else
pio lib -g install https://github.com/$TRAVIS_PULL_REQUEST_SLUG.git#$TRAVIS_PULL_REQUEST_SHA;
fi
# Install serial libraries (these should be ignored by SAMD boards)
- pio lib -g install https://github.com/PaulStoffregen/AltSoftSerial.git
- pio lib -g install https://github.com/EnviroDIY/SoftwareSerial_ExtInts.git
- pio lib -g install https://github.com/SRGDamia1/NeoSWSerial.git
- pio lib -g install https://github.com/Testato/SoftwareWire.git
- pio lib -g install vshymanskyy/StreamDebugger@~1.0.1
- pio lib -g list
script:
- platformio ci --project-conf="continuous_integration/platformio.ini"
jobs:
include:
- name: 'Verify library JSON format'
language: node_js
install: npm install -g jsonlint
script: jsonlint -q library.json
after_success: |
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
if [[ ($TRAVIS_BRANCH == master) &&
($TRAVIS_PULL_REQUEST == false) ]] ; then
curl -LO --retry 3 https://raw.github.com/mernst/plume-lib/master/bin/trigger-travis.sh
sh trigger-travis.sh EnviroDIY Libraries $TRAVIS_ACCESS_TOKEN
fi
- name: 'Build Doxygen Documentation'
if: branch = master AND type != pull_request
language: python
python:
- '3.7'
env:
- DOXYGEN_VERSION="Release_1_8_20"
before_install:
- git config --global user.email "sdamiano@stroudcenter.org"
- git config --global user.name "SRGDamia1"
- git config --global push.default simple
- pip3 install jinja2 Pygments
install:
- cd $TRAVIS_BUILD_DIR
- chmod +x continuous_integration/copy-doc-sources.sh
- sh continuous_integration/copy-doc-sources.sh
- cd $TRAVIS_BUILD_DIR
- chmod +x continuous_integration/build-install-doxygen.sh
- sh continuous_integration/build-install-doxygen.sh
script:
- cd $TRAVIS_BUILD_DIR
- chmod +x continuous_integration/generate-documentation.sh
- sh continuous_integration/generate-documentation.sh
# after_success:
# - cd $TRAVIS_BUILD_DIR
# - chmod +x continuous_integration/deploy-documentation.sh
# - sh continuous_integration/deploy-documentation.sh
deploy:
provider: pages:git
token: $GH_REPO_TOKEN
edge: true # opt in to dpl v2
keep_history: false
local_dir: $TRAVIS_BUILD_DIR/code_docs/ModularSensorsDoxygen/m.css
project_name: ModularSensors
- name: 'Check Single Sensor Example'
env:
- PLATFORMIO_CI_SRC=examples/single_sensor/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check Simple Logging Example'
env:
- PLATFORMIO_CI_SRC=examples/simple_logging/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check DRWI CitSci 2G Example'
env:
- PLATFORMIO_CI_SRC=examples/DRWI_CitSci/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check DRWI CitSci LTE Example'
env:
- PLATFORMIO_CI_SRC=examples/DRWI_LTE/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check DRWI CitSci No Cellular Example'
env:
- PLATFORMIO_CI_SRC=examples/DRWI_NoCellular/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check Double Logger Example'
env:
- PLATFORMIO_CI_SRC=examples/double_logger/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check Baro Correction Example'
env:
- PLATFORMIO_CI_SRC=examples/baro_rho_correction/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check Data Saving Example'
env:
- PLATFORMIO_CI_SRC=examples/data_saving/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check ThingSpeak Example'
env:
- PLATFORMIO_CI_SRC=examples/logging_to_ThingSpeak/ PLATFORMIO_DEFAULT_ENVS="mayfly, adafruit_feather_m0, autonomo, mega"
- name: 'Check Menu Example and (maybe) Pack Dependencies'
env:
- PLATFORMIO_CI_SRC=examples/menu_a_la_carte/
after_success: |
if [[ ($TRAVIS_PULL_REQUEST == false) ]] ; then
pio lib -g uninstall adafruit/Adafruit GFX Library
pio lib -g uninstall adafruit/Adafruit NeoPixel
pio lib -g uninstall adafruit/Adafruit SSD1306
zip ModularSensors_dependencies.zip -r ~/.platformio/lib
zip -d -q ModularSensors_dependencies "*/.gitattributes" "*/.gitignore" "*/.gitmodules" "*/.github/*" "*.sh" "*/Doxyfile" "*/.travis.yml"
zip -d -q ModularSensors_dependencies "*/EnviroDIY_ModularSensors/doc/*"
zip -d -q ModularSensors_dependencies "*/TinyGSM/extras/*"
zip -d -q ModularSensors_dependencies "*/YosemitechModbus/doc/*"
zip -d -q ModularSensors_dependencies "*/SdFat/extras/*"
zip -d -q ModularSensors_dependencies "*/doc/*.pdf"
git status
if [[ $is_changed > 0 ]]; then
git add -A;
fi
if [[ $is_changed > 0 ]]; then
git commit -m "Packaged dependencies (Travis build $TRAVIS_BUILD_NUMBER) [ci skip]";
fi
git push origin master
fi