Unverified Commit 087ebe0e authored by Jan Procházka's avatar Jan Procházka Committed by GitHub

CI HW Testing Update (#7911)

* Update upload-artifact action to v3

* Fix deprecated set-output

* updated path + error if no files found

* update path

* update path + debug ls

* dbg path print

* dbg path remove +added echo with buildpath

* change build_dir

* fix upload-artifact paths

* changed build_dirs

* move sketchname variable

* Update touch pressed value

* Run one test only for faster debuging

* Revert "Run one test only for faster debuging"

This reverts commit e2bf6a8551e5b4abe5bb6201d3175257bc40fe44.

* fix value
parent 30ab1c3c
...@@ -117,12 +117,14 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex ...@@ -117,12 +117,14 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
# 3. Created at the sketch level as "buildX" where X is the number # 3. Created at the sketch level as "buildX" where X is the number
# of configuration built in case of a multiconfiguration test. # of configuration built in case of a multiconfiguration test.
sketchname=$(basename $sketchdir)
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp" ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
if [ -n "$ARDUINO_BUILD_DIR" ]; then if [ -n "$ARDUINO_BUILD_DIR" ]; then
build_dir="$ARDUINO_BUILD_DIR" build_dir="$ARDUINO_BUILD_DIR"
elif [ $len -eq 1 ]; then elif [ $len -eq 1 ]; then
# build_dir="$sketchdir/build" # build_dir="$sketchdir/build"
build_dir="$HOME/.arduino/build.tmp" build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
fi fi
mkdir -p "$ARDUINO_CACHE_DIR" mkdir -p "$ARDUINO_CACHE_DIR"
...@@ -130,13 +132,12 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex ...@@ -130,13 +132,12 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
do do
if [ $len -ne 1 ]; then if [ $len -ne 1 ]; then
# build_dir="$sketchdir/build$i" # build_dir="$sketchdir/build$i"
build_dir="$HOME/.arduino/build$i.tmp" build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
fi fi
rm -rf $build_dir rm -rf $build_dir
mkdir -p $build_dir mkdir -p $build_dir
currfqbn=`echo $fqbn | jq -r --argjson i $i '.[$i]'` currfqbn=`echo $fqbn | jq -r --argjson i $i '.[$i]'`
sketchname=$(basename $sketchdir)
if [ -f "$ide_path/arduino-cli" ]; then if [ -f "$ide_path/arduino-cli" ]; then
echo "Building $sketchname with arduino-cli and FQBN=$currfqbn" echo "Building $sketchname with arduino-cli and FQBN=$currfqbn"
...@@ -152,6 +153,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex ...@@ -152,6 +153,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
$xtra_opts "${sketchdir}" $xtra_opts "${sketchdir}"
elif [ -f "$ide_path/arduino-builder" ]; then elif [ -f "$ide_path/arduino-builder" ]; then
echo "Building $sketchname with arduino-builder and FQBN=$currfqbn" echo "Building $sketchname with arduino-builder and FQBN=$currfqbn"
echo "Build path = $build_dir"
$ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \ $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
-fqbn=\"$currfqbn\" \ -fqbn=\"$currfqbn\" \
......
...@@ -15,7 +15,8 @@ function run_test() { ...@@ -15,7 +15,8 @@ function run_test() {
fi fi
if [ $len -eq 1 ]; then if [ $len -eq 1 ]; then
build_dir="tests/$sketchname/build" # build_dir="tests/$sketchname/build"
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
report_file="tests/$sketchname/$sketchname.xml" report_file="tests/$sketchname/$sketchname.xml"
fi fi
...@@ -27,7 +28,8 @@ function run_test() { ...@@ -27,7 +28,8 @@ function run_test() {
fi fi
if [ $len -ne 1 ]; then if [ $len -ne 1 ]; then
build_dir="tests/$sketchname/build$i" # build_dir="tests/$sketchname/build$i"
build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
report_file="tests/$sketchname/$sketchname$i.xml" report_file="tests/$sketchname/$sketchname$i.xml"
fi fi
......
...@@ -39,7 +39,7 @@ jobs: ...@@ -39,7 +39,7 @@ jobs:
set -e set -e
rm sketches.txt rm sketches.txt
CHUNKS=$(jq -c -n '$ARGS.positional' --args `seq 0 1 $((sketches - 1))`) CHUNKS=$(jq -c -n '$ARGS.positional' --args `seq 0 1 $((sketches - 1))`)
echo "::set-output name=chunks::${CHUNKS}" echo "chunks=${CHUNKS}" >>$GITHUB_OUTPUT
Build: Build:
needs: gen_chunks needs: gen_chunks
...@@ -49,21 +49,20 @@ jobs: ...@@ -49,21 +49,20 @@ jobs:
matrix: matrix:
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3'] chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}} chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Build sketches - name: Build sketches
run: | run: |
bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}}
- name: Upload ${{matrix.chip}}-${{matrix.chunks}} artifacts - name: Upload ${{matrix.chip}}-${{matrix.chunks}} artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
path: | path: |
tests/*/build*/*.bin ~/.arduino/tests/*/build*.tmp/*.bin
tests/*/build*/*.json ~/.arduino/tests/*/build*.tmp/*.json
if-no-files-found: error
Test: Test:
needs: [gen_chunks, Build] needs: [gen_chunks, Build]
name: ${{matrix.chip}}-Test#${{matrix.chunks}} name: ${{matrix.chip}}-Test#${{matrix.chunks}}
...@@ -87,10 +86,10 @@ jobs: ...@@ -87,10 +86,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts - name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
path: tests/ path: ~/.arduino/tests/
- name: Install dependencies - name: Install dependencies
run: | run: |
...@@ -103,7 +102,7 @@ jobs: ...@@ -103,7 +102,7 @@ jobs:
bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e
- name: Upload test result artifacts - name: Upload test result artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
if: always() if: always()
with: with:
name: test_results-${{matrix.chip}}-${{matrix.chunks}} name: test_results-${{matrix.chip}}-${{matrix.chunks}}
...@@ -118,7 +117,7 @@ jobs: ...@@ -118,7 +117,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Upload - name: Upload
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: Event File name: Event File
path: ${{github.event_path}} path: ${{github.event_path}}
...@@ -59,7 +59,7 @@ uint8_t TOUCH_GPIOS[] = {1,2,3,4,5,6,7,8,9,10,11,12/*,13,14*/}; ...@@ -59,7 +59,7 @@ uint8_t TOUCH_GPIOS[] = {1,2,3,4,5,6,7,8,9,10,11,12/*,13,14*/};
#define INTERRUPT_THRESHOLD 30000 #define INTERRUPT_THRESHOLD 30000
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#define RELEASED_VALUE 25000 //25000- read value to pass test #define RELEASED_VALUE 25000 //25000- read value to pass test
#define PRESSED_VALUE 100000 //150000+ read value to pass test #define PRESSED_VALUE 90000 //90000+ read value to pass test
#define INTERRUPT_THRESHOLD 80000 #define INTERRUPT_THRESHOLD 80000
#else #else
#error Test not currently supported on this chip. Please adjust and try again! #error Test not currently supported on this chip. Please adjust and try again!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment