Skip to content

Commit

Permalink
CI HW Testing Update (espressif#7911)
Browse files Browse the repository at this point in the history
* 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 e2bf6a8.

* fix value
  • Loading branch information
P-R-O-C-H-Y authored Apr 6, 2023
1 parent 30ab1c3 commit 087ebe0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,26 +117,27 @@ 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
# of configuration built in case of a multiconfiguration test.

sketchname=$(basename $sketchdir)

ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
if [ -n "$ARDUINO_BUILD_DIR" ]; then
build_dir="$ARDUINO_BUILD_DIR"
elif [ $len -eq 1 ]; then
# build_dir="$sketchdir/build"
build_dir="$HOME/.arduino/build.tmp"
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
fi

mkdir -p "$ARDUINO_CACHE_DIR"
for i in `seq 0 $(($len - 1))`
do
if [ $len -ne 1 ]; then
# build_dir="$sketchdir/build$i"
build_dir="$HOME/.arduino/build$i.tmp"
build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
fi
rm -rf $build_dir
mkdir -p $build_dir

currfqbn=`echo $fqbn | jq -r --argjson i $i '.[$i]'`
sketchname=$(basename $sketchdir)

if [ -f "$ide_path/arduino-cli" ]; then
echo "Building $sketchname with arduino-cli and FQBN=$currfqbn"
Expand All @@ -152,6 +153,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
$xtra_opts "${sketchdir}"
elif [ -f "$ide_path/arduino-builder" ]; then
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 \
-fqbn=\"$currfqbn\" \
Expand Down
6 changes: 4 additions & 2 deletions .github/scripts/tests_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function run_test() {
fi

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"
fi

Expand All @@ -27,7 +28,8 @@ function run_test() {
fi

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"
fi

Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
set -e
rm sketches.txt
CHUNKS=$(jq -c -n '$ARGS.positional' --args `seq 0 1 $((sketches - 1))`)
echo "::set-output name=chunks::${CHUNKS}"
echo "chunks=${CHUNKS}" >>$GITHUB_OUTPUT
Build:
needs: gen_chunks
Expand All @@ -49,21 +49,20 @@ jobs:
matrix:
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Build sketches
run: |
bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}}
- name: Upload ${{matrix.chip}}-${{matrix.chunks}} artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
path: |
tests/*/build*/*.bin
tests/*/build*/*.json
~/.arduino/tests/*/build*.tmp/*.bin
~/.arduino/tests/*/build*.tmp/*.json
if-no-files-found: error
Test:
needs: [gen_chunks, Build]
name: ${{matrix.chip}}-Test#${{matrix.chunks}}
Expand All @@ -87,10 +86,10 @@ jobs:
uses: actions/checkout@v3

- name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
path: tests/
path: ~/.arduino/tests/

- name: Install dependencies
run: |
Expand All @@ -103,7 +102,7 @@ jobs:
bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e
- name: Upload test result artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: test_results-${{matrix.chip}}-${{matrix.chunks}}
Expand All @@ -118,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{github.event_path}}
2 changes: 1 addition & 1 deletion tests/touch/touch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
#elif CONFIG_IDF_TARGET_ESP32S3
#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
#else
#error Test not currently supported on this chip. Please adjust and try again!
Expand Down

0 comments on commit 087ebe0

Please sign in to comment.