File tree Expand file tree Collapse file tree 3 files changed +37
-5
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +37
-5
lines changed
Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ function build {
9
9
local chunk_index=$2
10
10
local chunks_cnt=$3
11
11
local build_log=$4
12
- local sketches_file=$5
13
- shift 5
12
+ local log_level=$5
13
+ local sketches_file=$6
14
+ shift 6
14
15
local sketches=(" $@ " )
15
16
16
17
local BUILD_SKETCH=" ${SCRIPTS_DIR} /sketch_utils.sh build"
@@ -19,7 +20,7 @@ function build {
19
20
local args=(" -ai" " $ARDUINO_IDE_PATH " " -au" " $ARDUINO_USR_PATH " " -t" " $target " )
20
21
21
22
if [ " $OS_IS_LINUX " == " 1" ]; then
22
- args+=(" -p" " $ARDUINO_ESP32_PATH /libraries" " -i" " $chunk_index " " -m" " $chunks_cnt " )
23
+ args+=(" -p" " $ARDUINO_ESP32_PATH /libraries" " -i" " $chunk_index " " -m" " $chunks_cnt " " -d " " $log_level " )
23
24
if [ -n " $sketches_file " ]; then
24
25
args+=(" -f" " $sketches_file " )
25
26
fi
Original file line number Diff line number Diff line change @@ -443,6 +443,11 @@ function build_sketches { # build_sketches <ide_path> <user_path> <target> <path
443
443
shift
444
444
sketches_file=$1
445
445
;;
446
+ -d )
447
+ shift
448
+ debug_level=" $1 "
449
+ args+=(" -d" " $debug_level " )
450
+ ;;
446
451
* )
447
452
break
448
453
;;
Original file line number Diff line number Diff line change @@ -2,6 +2,22 @@ name: Compilation Tests
2
2
3
3
on :
4
4
workflow_dispatch :
5
+ inputs :
6
+ log_level :
7
+ description : " Log level"
8
+ default : " none"
9
+ type : " choice"
10
+ required : true
11
+ options :
12
+ - " none"
13
+ - " error"
14
+ - " warn"
15
+ - " info"
16
+ - " debug"
17
+ - " verbose"
18
+ schedule :
19
+ # Every Sunday at 2:00 UTC run a build with verbose log level
20
+ - cron : " 0 2 * * SUN"
5
21
push :
6
22
branches :
7
23
- master
@@ -163,9 +179,19 @@ jobs:
163
179
./tools/riscv32-*
164
180
./tools/xtensa-*
165
181
182
+ - name : Set Log Level
183
+ run : |
184
+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
185
+ echo "LOG_LEVEL=${{ github.event.inputs.log_level }}" >> $GITHUB_ENV
186
+ elif [ "${{ github.event_name }}" == "schedule" ]; then
187
+ echo "LOG_LEVEL=verbose" >> $GITHUB_ENV
188
+ else
189
+ echo "LOG_LEVEL=none" >> $GITHUB_ENV
190
+ fi
191
+
166
192
- name : Build all sketches
167
193
if : ${{ needs.gen-chunks.outputs.build_all == 'true' }}
168
- run : bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1
194
+ run : bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1 ${{ env.LOG_LEVEL }}
169
195
170
196
- name : Download sketches found
171
197
if : ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
@@ -175,7 +201,7 @@ jobs:
175
201
176
202
- name : Build selected sketches
177
203
if : ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
178
- run : bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 sketches_found.txt
204
+ run : bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 ${{ env.LOG_LEVEL }} sketches_found.txt
179
205
180
206
# Upload cli compile json as artifact
181
207
- name : Upload cli compile json
You can’t perform that action at this time.
0 commit comments