Skip to content

Builder scripts update #3300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
script cleanup
  • Loading branch information
me-no-dev committed Sep 29, 2019
commit 3ad865cf5c784ac3c4fddd25682dfc2468c02dc4
17 changes: 5 additions & 12 deletions tools/ci/install-arduino-ide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function build_sketches() # build_sketches <examples-path> <fqbn> <chunk> <total
count_sketches "$examples"
local sketchcount=$?
local sketches=$(cat sketches.txt)
rm -rf sketches.txt

local chunk_size=$(( $sketchcount / $chunks_num ))
local all_chunks=$(( $chunks_num * $chunk_size ))
Expand Down Expand Up @@ -176,21 +177,13 @@ function build_sketches() # build_sketches <examples-path> <fqbn> <chunk> <total
local sketchdir=$(dirname $sketch)
local sketchdirname=$(basename $sketchdir)
local sketchname=$(basename $sketch)
if [[ "${sketchdirname}.ino" != "$sketchname" ]]; then
#echo "Skipping $sketch, beacause it is not the main sketch file";
continue
fi;
if [[ -f "$sketchdir/.test.skip" ]]; then
#echo "Skipping $sketch marked";
if [ "${sketchdirname}.ino" != "$sketchname" ] \
|| [ -f "$sketchdir/.test.skip" ]; then
continue
fi
sketchnum=$(($sketchnum + 1))
if [ "$sketchnum" -le "$start_index" ]; then
#echo "Skipping $sketch index low"
continue
fi
if [ "$sketchnum" -gt "$end_index" ]; then
#echo "Skipping $sketch index high"
if [ "$sketchnum" -le "$start_index" ] \
|| [ "$sketchnum" -gt "$end_index" ]; then
continue
fi
build_sketch "$fqbn" "$sketch" "$xtra_opts"
Expand Down
18 changes: 5 additions & 13 deletions tools/ci/install-platformio-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function build_pio_sketches() # build_pio_sketches <examples-path> <board> <chun
local board=$2
local chunk_idex=$3
local chunks_num=$4
local xtra_opts=$5

if [ "$chunks_num" -le 0 ]; then
echo "ERROR: Chunks count must be positive number"
Expand All @@ -85,6 +84,7 @@ function build_pio_sketches() # build_pio_sketches <examples-path> <board> <chun
count_sketches "$examples"
local sketchcount=$?
local sketches=$(cat sketches.txt)
rm -rf sketches.txt

local chunk_size=$(( $sketchcount / $chunks_num ))
local all_chunks=$(( $chunks_num * $chunk_size ))
Expand Down Expand Up @@ -115,21 +115,13 @@ function build_pio_sketches() # build_pio_sketches <examples-path> <board> <chun
local sketchdir=$(dirname $sketch)
local sketchdirname=$(basename $sketchdir)
local sketchname=$(basename $sketch)
if [[ "${sketchdirname}.ino" != "$sketchname" ]]; then
#echo "Skipping $sketch, beacause it is not the main sketch file";
continue
fi;
if [[ -f "$sketchdir/.test.skip" ]]; then
#echo "Skipping $sketch marked";
if [ "${sketchdirname}.ino" != "$sketchname" ] \
|| [ -f "$sketchdir/.test.skip" ]; then
continue
fi
sketchnum=$(($sketchnum + 1))
if [ "$sketchnum" -le "$start_index" ]; then
#echo "Skipping $sketch index low"
continue
fi
if [ "$sketchnum" -gt "$end_index" ]; then
#echo "Skipping $sketch index high"
if [ "$sketchnum" -le "$start_index" ] \
|| [ "$sketchnum" -gt "$end_index" ]; then
continue
fi
build_pio_sketch "$board" "$sketch"
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ else
python -m platformio ci --board esp32dev libraries/BLE/examples/BLE_server && \
python -m platformio ci --board esp32dev libraries/AzureIoT/examples/GetStarted && \
python -m platformio ci --board esp32dev libraries/ESP32/examples/Camera/CameraWebServer --project-option="board_build.partitions = huge_app.csv"
#build_pio_sketches libraries "esp32dev" "$CHUNK_INDEX" "$CHUNKS_CNT"
#build_pio_sketches libraries esp32dev $CHUNK_INDEX $CHUNKS_CNT
if [ $? -ne 0 ]; then exit 1; fi
fi