Merge pull request #10740 from lucasssvaz/ci/sched_debug
ci(debug): Compile once a week with verbose log level
This commit is contained in:
commit
4fdf9ef854
3 changed files with 46 additions and 13 deletions
24
.github/scripts/on-push.sh
vendored
24
.github/scripts/on-push.sh
vendored
|
|
@ -9,8 +9,9 @@ function build {
|
||||||
local chunk_index=$2
|
local chunk_index=$2
|
||||||
local chunks_cnt=$3
|
local chunks_cnt=$3
|
||||||
local build_log=$4
|
local build_log=$4
|
||||||
local sketches_file=$5
|
local log_level=${5:-none}
|
||||||
shift 5
|
local sketches_file=$6
|
||||||
|
shift 6
|
||||||
local sketches=("$@")
|
local sketches=("$@")
|
||||||
|
|
||||||
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
|
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
|
||||||
|
|
@ -19,7 +20,7 @@ function build {
|
||||||
local args=("-ai" "$ARDUINO_IDE_PATH" "-au" "$ARDUINO_USR_PATH" "-t" "$target")
|
local args=("-ai" "$ARDUINO_IDE_PATH" "-au" "$ARDUINO_USR_PATH" "-t" "$target")
|
||||||
|
|
||||||
if [ "$OS_IS_LINUX" == "1" ]; then
|
if [ "$OS_IS_LINUX" == "1" ]; then
|
||||||
args+=("-p" "$ARDUINO_ESP32_PATH/libraries" "-i" "$chunk_index" "-m" "$chunks_cnt")
|
args+=("-p" "$ARDUINO_ESP32_PATH/libraries" "-i" "$chunk_index" "-m" "$chunks_cnt" "-d" "$log_level")
|
||||||
if [ -n "$sketches_file" ]; then
|
if [ -n "$sketches_file" ]; then
|
||||||
args+=("-f" "$sketches_file")
|
args+=("-f" "$sketches_file")
|
||||||
fi
|
fi
|
||||||
|
|
@ -54,7 +55,8 @@ fi
|
||||||
CHUNK_INDEX=$1
|
CHUNK_INDEX=$1
|
||||||
CHUNKS_CNT=$2
|
CHUNKS_CNT=$2
|
||||||
BUILD_LOG=$3
|
BUILD_LOG=$3
|
||||||
SKETCHES_FILE=$4
|
LOG_LEVEL=$4
|
||||||
|
SKETCHES_FILE=$5
|
||||||
if [ "$#" -lt 2 ] || [ "$CHUNKS_CNT" -le 0 ]; then
|
if [ "$#" -lt 2 ] || [ "$CHUNKS_CNT" -le 0 ]; then
|
||||||
CHUNK_INDEX=0
|
CHUNK_INDEX=0
|
||||||
CHUNKS_CNT=1
|
CHUNKS_CNT=1
|
||||||
|
|
@ -88,13 +90,13 @@ if [ "$BUILD_LOG" -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#build sketches for different targets
|
#build sketches for different targets
|
||||||
build "esp32p4" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32p4" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32c3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32c3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32c6" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32c6" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32h2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32h2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
build "esp32" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
build "esp32" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
|
||||||
|
|
||||||
if [ "$BUILD_LOG" -eq 1 ]; then
|
if [ "$BUILD_LOG" -eq 1 ]; then
|
||||||
#remove last comma from the last JSON object
|
#remove last comma from the last JSON object
|
||||||
|
|
|
||||||
5
.github/scripts/sketch_utils.sh
vendored
5
.github/scripts/sketch_utils.sh
vendored
|
|
@ -443,6 +443,11 @@ function build_sketches { # build_sketches <ide_path> <user_path> <target> <path
|
||||||
shift
|
shift
|
||||||
sketches_file=$1
|
sketches_file=$1
|
||||||
;;
|
;;
|
||||||
|
-d )
|
||||||
|
shift
|
||||||
|
debug_level="$1"
|
||||||
|
args+=("-d" "$debug_level")
|
||||||
|
;;
|
||||||
* )
|
* )
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
30
.github/workflows/push.yml
vendored
30
.github/workflows/push.yml
vendored
|
|
@ -2,6 +2,22 @@ name: Compilation Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
log_level:
|
||||||
|
description: "Log level"
|
||||||
|
default: "none"
|
||||||
|
type: "choice"
|
||||||
|
required: true
|
||||||
|
options:
|
||||||
|
- "none"
|
||||||
|
- "error"
|
||||||
|
- "warn"
|
||||||
|
- "info"
|
||||||
|
- "debug"
|
||||||
|
- "verbose"
|
||||||
|
schedule:
|
||||||
|
# Every Sunday at 2:00 UTC run a build with verbose log level
|
||||||
|
- cron: "0 2 * * SUN"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
@ -163,9 +179,19 @@ jobs:
|
||||||
./tools/riscv32-*
|
./tools/riscv32-*
|
||||||
./tools/xtensa-*
|
./tools/xtensa-*
|
||||||
|
|
||||||
|
- name: Set Log Level
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||||
|
echo "LOG_LEVEL=${{ github.event.inputs.log_level }}" >> $GITHUB_ENV
|
||||||
|
elif [ "${{ github.event_name }}" == "schedule" ]; then
|
||||||
|
echo "LOG_LEVEL=verbose" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "LOG_LEVEL=none" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build all sketches
|
- name: Build all sketches
|
||||||
if: ${{ needs.gen-chunks.outputs.build_all == 'true' }}
|
if: ${{ needs.gen-chunks.outputs.build_all == 'true' }}
|
||||||
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1
|
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1 ${{ env.LOG_LEVEL }}
|
||||||
|
|
||||||
- name: Download sketches found
|
- name: Download sketches found
|
||||||
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
|
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
|
||||||
|
|
@ -175,7 +201,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build selected sketches
|
- name: Build selected sketches
|
||||||
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
|
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
|
||||||
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 sketches_found.txt
|
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 ${{ env.LOG_LEVEL }} sketches_found.txt
|
||||||
|
|
||||||
#Upload cli compile json as artifact
|
#Upload cli compile json as artifact
|
||||||
- name: Upload cli compile json
|
- name: Upload cli compile json
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue