ci: Run Test App on target
This commit is contained in:
parent
feb0f628a3
commit
2019d71fd4
|
@ -6,6 +6,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build Test App
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["release-v4.3", "release-v4.4", "latest"]
|
idf_ver: ["release-v4.3", "release-v4.4", "latest"]
|
||||||
|
@ -23,14 +24,14 @@ jobs:
|
||||||
env:
|
env:
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: test_app
|
||||||
run: |
|
run: |
|
||||||
cd test_app
|
|
||||||
. ${IDF_PATH}/export.sh
|
. ${IDF_PATH}/export.sh
|
||||||
idf.py build
|
idf.py build
|
||||||
- name: Merge binaries
|
- name: Merge binaries
|
||||||
|
working-directory: test_app/build
|
||||||
run: |
|
run: |
|
||||||
pip install esptool
|
pip install esptool
|
||||||
cd test_app/build
|
|
||||||
python -m esptool --chip esp32 merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args
|
python -m esptool --chip esp32 merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -38,18 +39,54 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
test_app/build/flash_image.bin
|
test_app/build/flash_image.bin
|
||||||
|
|
||||||
run-qemu:
|
#run-qemu: # Keeping this here for future reference. QEMU tests are not passing now
|
||||||
name: Run Test App in QEMU
|
# name: Run Test App in QEMU
|
||||||
|
# needs: build
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# idf_ver: ["release-v4.4", "latest"] #FIXME: QEMU is crashing with v4.3 build
|
||||||
|
# runs-on: ubuntu-20.04
|
||||||
|
# container: ageon/pytest_env
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 0
|
||||||
|
# - uses: actions/download-artifact@v2
|
||||||
|
# with:
|
||||||
|
# name: test_app_bin_esp32_${{ matrix.idf_ver }}
|
||||||
|
# path: test_app/build
|
||||||
|
# - name: Run Test App in QEMU
|
||||||
|
# working-directory: test_app
|
||||||
|
# run: pytest -s --junit-xml=./test_app_results.xml --embedded-services qemu
|
||||||
|
|
||||||
|
run-target:
|
||||||
|
name: Run Test App on target
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["release-v4.3", "release-v4.4", "latest"]
|
idf_ver: ["release-v4.3", "release-v4.4", "latest"]
|
||||||
runs-on: ubuntu-20.04
|
idf_target: ["esp32", "esp32c3", "esp32s3"]
|
||||||
container: ageon/pytest_env
|
exclude:
|
||||||
|
- idf_ver: "release-v4.3"
|
||||||
|
idf_target: esp32s3 # ESP32S3 support started with version 4.4
|
||||||
|
runs-on: [self-hosted, linux, docker, esp32] # Unfortunately `${{ matrix.idf_target }}` is not accepted here
|
||||||
|
container:
|
||||||
|
image: python:3.7-slim-buster
|
||||||
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test_app_bin_esp32_${{ matrix.idf_ver }}
|
name: test_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
||||||
|
path: test_app/build
|
||||||
- name: Display structure of downloaded files
|
- name: Install Python packages
|
||||||
run: ls -R
|
env:
|
||||||
|
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
|
||||||
|
run: pip install esptool pytest-embedded==0.6.0rc0 pytest-embedded-serial-esp==0.6.0rc0
|
||||||
|
- name: Download Test App to target
|
||||||
|
run: python -m esptool --chip ${{ matrix.idf_target }} write_flash 0x0 test_app/build/flash_image.bin
|
||||||
|
- name: Run Test App on target
|
||||||
|
working-directory: test_app
|
||||||
|
run: pytest -s --junit-xml=./test_app_results.xml --embedded-services esp --target=${{ matrix.idf_target }}
|
||||||
|
|
|
@ -9,5 +9,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
- uses: pre-commit/action@v2.0.3
|
- uses: pre-commit/action@v2.0.3
|
||||||
|
|
|
@ -2,4 +2,4 @@ version: "2.4.3"
|
||||||
description: "Expat - XML Parsing C Library"
|
description: "Expat - XML Parsing C Library"
|
||||||
url: https://github.com/espressif/idf-extra-components/tree/master/expat
|
url: https://github.com/espressif/idf-extra-components/tree/master/expat
|
||||||
dependencies:
|
dependencies:
|
||||||
idf: ">=4.4"
|
idf: ">=4.3"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
version: "0.1.0"
|
version: "0.1.1"
|
||||||
description: Proportional-integral-derivative controller
|
description: Proportional-integral-derivative controller
|
||||||
url: https://github.com/espressif/idf-extra-components/tree/master/pid_ctrl
|
url: https://github.com/espressif/idf-extra-components/tree/master/pid_ctrl
|
||||||
dependencies:
|
dependencies:
|
||||||
idf: ">=4.3"
|
idf: ">=4.4"
|
||||||
|
|
|
@ -2,7 +2,16 @@
|
||||||
# CMakeLists in this exact order for cmake to work correctly
|
# CMakeLists in this exact order for cmake to work correctly
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
set(EXTRA_COMPONENT_DIRS ../libsodium ../expat ../esp_encrypted_img)
|
set(EXTRA_COMPONENT_DIRS ../libsodium ../expat ../esp_encrypted_img ../cbor ../jsmn ../qrcode)
|
||||||
|
|
||||||
|
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "4.4")
|
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS ../pid_ctrl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.0")
|
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS ../sh2lib ../nghttp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Set the components to include the tests for.
|
# Set the components to include the tests for.
|
||||||
set(TEST_COMPONENTS libsodium expat esp_encrypted_img CACHE STRING "List of components to test")
|
set(TEST_COMPONENTS libsodium expat esp_encrypted_img CACHE STRING "List of components to test")
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
UNITY_BEGIN();
|
UNITY_BEGIN();
|
||||||
unity_run_menu();
|
//unity_run_tests_by_tag("[libsodium]", false);
|
||||||
|
unity_run_all_tests();
|
||||||
|
//unity_run_menu();
|
||||||
UNITY_END();
|
UNITY_END();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,3 +4,11 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
||||||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
||||||
|
|
||||||
|
# Run-time checks of Heap and Stack
|
||||||
|
CONFIG_HEAP_POISONING_COMPREHENSIVE=y
|
||||||
|
CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y
|
||||||
|
CONFIG_COMPILER_STACK_CHECK=y
|
||||||
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=16000
|
||||||
|
|
||||||
|
CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL=y
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
CONFIG_ESP32C3_REV_MIN_0=y
|
|
@ -0,0 +1,2 @@
|
||||||
|
def test_app(dut):
|
||||||
|
dut.expect_unity_test_output(timeout=240)
|
Loading…
Reference in New Issue