@@ -141,59 +141,6 @@ function install_ide()
141
141
export PATH=" $ide_path :$core_path /tools/xtensa-lx106-elf/bin:$PATH "
142
142
}
143
143
144
- function install_platformio()
145
- {
146
- pip install --user -U https://github.com./platformio/platformio/archive/develop.zip
147
- platformio platform install " https://github.com./platformio/platform-espressif8266.git#feature/stage"
148
- sed -i ' s/https:\/\/github\.com\/esp8266\/Arduino\.git/*/' ~ /.platformio/platforms/espressif8266/platform.json
149
- ln -s $TRAVIS_BUILD_DIR ~ /.platformio/packages/framework-arduinoespressif8266
150
- # Install dependencies:
151
- # - esp8266/examples/ConfigFile
152
- pio lib install ArduinoJson
153
- }
154
-
155
- function build_sketches_with_platformio()
156
- {
157
- set +e
158
- local srcpath=$1
159
- local build_arg=$2
160
- local build_mod=$3
161
- local build_rem=$4
162
- local sketches=$( find $srcpath -name * .ino | sort)
163
- local testcnt=0
164
- for sketch in $sketches ; do
165
- testcnt=$(( ($testcnt + 1 ) % $build_mod ))
166
- if [ $testcnt -ne $build_rem ]; then
167
- continue # Not ours to do
168
- fi
169
- local sketchdir=$( dirname $sketch )
170
- local sketchdirname=$( basename $sketchdir )
171
- local sketchname=$( basename $sketch )
172
- if [[ " ${sketchdirname} .ino" != " $sketchname " ]]; then
173
- echo " Skipping $sketch , beacause it is not the main sketch file" ;
174
- continue
175
- fi ;
176
- if [[ -f " $sketchdir /.test.skip" ]]; then
177
- echo -e " \n ------------ Skipping $sketch ------------ \n" ;
178
- continue
179
- fi
180
- local build_cmd=" pio ci $sketchdir $build_arg "
181
- echo -e " \n ------------ Building $sketch ------------ \n" ;
182
- echo " $build_cmd "
183
- time ($build_cmd > build.log)
184
- local result=$?
185
- if [ $result -ne 0 ]; then
186
- echo " Build failed ($1 )"
187
- echo " Build log:"
188
- cat build.log
189
- set -e
190
- return $result
191
- fi
192
- rm build.log
193
- done
194
- set -e
195
- }
196
-
197
144
function install_arduino()
198
145
{
199
146
local debug=$1
@@ -235,48 +182,3 @@ if [ -z "$TRAVIS_BUILD_DIR" ]; then
235
182
echo " TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR "
236
183
fi
237
184
238
- cache_dir=$( mktemp -d)
239
-
240
- if [ " $BUILD_TYPE " = " build" ]; then
241
- install_arduino nodebug
242
- build_sketches_with_arduino 1 0 lm2f
243
- elif [ " $BUILD_TYPE " = " build6" ]; then
244
- install_arduino nodebug
245
- build_sketches_with_arduino 1 0 lm6f
246
- elif [ " $BUILD_TYPE " = " build_even" ]; then
247
- install_arduino nodebug
248
- build_sketches_with_arduino 2 0 lm2f
249
- elif [ " $BUILD_TYPE " = " build_odd" ]; then
250
- install_arduino nodebug
251
- build_sketches_with_arduino 2 1 lm2f
252
- elif [ " $BUILD_TYPE " = " debug_even" ]; then
253
- install_arduino debug
254
- build_sketches_with_arduino 2 0 lm2f
255
- elif [ " $BUILD_TYPE " = " debug_odd" ]; then
256
- install_arduino debug
257
- build_sketches_with_arduino 2 1 lm2f
258
- elif [ " $BUILD_TYPE " = " build6_even" ]; then
259
- install_arduino nodebug
260
- build_sketches_with_arduino 2 0 lm6f
261
- elif [ " $BUILD_TYPE " = " build6_odd" ]; then
262
- install_arduino nodebug
263
- build_sketches_with_arduino 2 1 lm6f
264
- elif [ " $BUILD_TYPE " = " platformio" ]; then
265
- # PlatformIO
266
- install_platformio
267
- build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 1 0
268
- elif [ " $BUILD_TYPE " = " platformio_even" ]; then
269
- # PlatformIO
270
- install_platformio
271
- build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 2 0
272
- elif [ " $BUILD_TYPE " = " platformio_odd" ]; then
273
- # PlatformIO
274
- install_platformio
275
- build_sketches_with_platformio $TRAVIS_BUILD_DIR /libraries " --board nodemcuv2 --verbose" 2 1
276
- else
277
- echo " BUILD_TYPE not set or invalid"
278
- rm -rf $cache_dir
279
- exit 1
280
- fi
281
-
282
- rm -rf $cache_dir
0 commit comments