ESP32/NVS: return tagged tuples instead of just the result #2030
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2022 Davide Bettio <[email protected]> | |
# | |
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | |
# | |
name: ESP32 Builds | |
on: | |
push: | |
paths: | |
- '.github/workflows/**' | |
- 'CMakeLists.txt' | |
- 'libs/**' | |
- 'src/platforms/esp32/**' | |
- 'src/libAtomVM/**' | |
- 'tools/packbeam/**' | |
pull_request: | |
paths: | |
- '.github/workflows/**' | |
- 'src/platforms/esp32/**' | |
- 'src/libAtomVM/**' | |
jobs: | |
esp-idf: | |
runs-on: ubuntu-latest | |
container: espressif/idf:v${{ matrix.idf-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
idf-version: | |
- '4.4.5' | |
- '5.0.3' | |
- '5.1' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Build with idf.py | |
shell: bash | |
working-directory: ./src/platforms/esp32/ | |
run: | | |
. $IDF_PATH/export.sh | |
idf.py reconfigure | |
idf.py build | |
idf.py size | |
- name: Print component size info with idf.py | |
shell: bash | |
working-directory: ./src/platforms/esp32/ | |
run: | | |
. $IDF_PATH/export.sh | |
idf.py size-components | |
- name: Install dependencies to build host AtomVM and run qemu | |
run: | | |
set -eu | |
apt update | |
DEBIAN_FRONTEND=noninteractive apt install -y -q \ | |
doxygen erlang-base \ | |
libglib2.0-0 libpixman-1-0 \ | |
gcc g++ zlib1g-dev | |
- name: Install qemu binary from espressif/qemu | |
if: matrix.idf-version != '5.1' | |
run: | | |
set -eu | |
QEMU_VER=esp-develop-20220919 | |
QEMU_DIST=qemu-${QEMU_VER}.tar.bz2 | |
QEMU_SHA256=f6565d3f0d1e463a63a7f81aec94cce62df662bd42fc7606de4b4418ed55f870 | |
wget --no-verbose https://github.com/espressif/qemu/releases/download/${QEMU_VER}/${QEMU_DIST} | |
echo "${QEMU_SHA256} *${QEMU_DIST}" | sha256sum --check --strict - | |
tar -xf ${QEMU_DIST} -C /opt | |
- name: Install pytest and pytest-embedded plugins | |
run: | | |
set -e | |
. $IDF_PATH/export.sh | |
pip install pytest==7.0.1 \ | |
pytest-embedded==1.2.5 \ | |
pytest-embedded-serial-esp==1.2.5 \ | |
pytest-embedded-idf==1.2.5 \ | |
pytest-embedded-qemu==1.2.5 | |
- name: Patch esp-idf 4.4.5 to fix race condition that affects qemu under heavy load | |
working-directory: ./src/platforms/esp32/test/ | |
if: matrix.idf-version == '4.4.5' | |
run: | | |
set -e | |
PATCH=$PWD/esp_ipc_isr.patch | |
cd $IDF_PATH | |
patch -p1 < $PATCH | |
- name: Patch esp-idf 5.1 to fix race condition that affects qemu under heavy load | |
working-directory: ./src/platforms/esp32/test/ | |
if: matrix.idf-version == '5.1' | |
run: | | |
set -e | |
PATCH=$PWD/esp_ipc_isr_5.1.patch | |
cd $IDF_PATH | |
patch -p1 < $PATCH | |
- name: Build ESP32 tests using idf.py | |
working-directory: ./src/platforms/esp32/test/ | |
run: | | |
set -e | |
. $IDF_PATH/export.sh | |
idf.py build | |
- name: Run ESP32 tests using qemu | |
working-directory: ./src/platforms/esp32/test/ | |
timeout-minutes: 10 | |
run: | | |
set -e | |
. $IDF_PATH/export.sh | |
export PATH=/opt/qemu/bin:${PATH} | |
pytest --embedded-services=idf,qemu -s |