Files
AutoFilm-ESP32/.gitea/workflows/ci.yml
T
gronod 637ea8cb6e
ci / test (pull_request) Successful in 1m4s
ci / firmware (jc4827w543, sdkconfig.s3, esp32s3) (pull_request) Successful in 8m1s
ci / firmware (wroom, sdkconfig.wroom, esp32) (pull_request) Successful in 8m4s
ci / test (push) Successful in 1m11s
ci / firmware (wroom, sdkconfig.wroom, esp32) (push) Successful in 4m57s
ci / firmware (jc4827w543, sdkconfig.s3, esp32s3) (push) Successful in 4m57s
Update .gitea/workflows/ci.yml
2026-09-16 16:45:58 +01:00

82 lines
2.9 KiB
YAML

name: ci
on:
pull_request:
branches: [develop]
push:
branches: [develop, "refactor/**", "feature/**"]
tags: ["v*"]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install host toolchain
if: hashFiles('tests/host/CMakeLists.txt') != ''
run: |
export DEBIAN_FRONTEND=noninteractive && \
if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" -ne 0 ]; then SUDO=sudo; else SUDO=; fi && \
$SUDO apt-get update && \
$SUDO apt-get install -y -q --no-install-recommends cmake gcc g++ make
- name: Host unit tests
if: hashFiles('tests/host/CMakeLists.txt') != ''
run: |
cmake -S tests/host -B build/host && \
cmake --build build/host && \
ctest --test-dir build/host --output-on-failure
firmware:
needs: test
runs-on: ubuntu-latest
container:
image: docker.io/espressif/idf:v5.4
strategy:
fail-fast: false
matrix:
include:
- board: wroom
target: esp32
sdkconfig: sdkconfig.wroom
- board: jc4827w543
target: esp32s3
sdkconfig: sdkconfig.s3
steps:
- name: Install Node.js
run: |
export DEBIAN_FRONTEND=noninteractive && \
export NEEDRESTART_MODE=a && \
if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" -ne 0 ]; then SUDO=sudo; else SUDO=; fi && \
$SUDO apt-get update && \
$SUDO apt-get install -y -q --no-install-recommends nodejs
- uses: actions/checkout@v4
- name: Build
if: hashFiles('CMakeLists.txt') != ''
run: |
. $IDF_PATH/export.sh && \
git config --global --add safe.directory '*' && \
idf.py -B build/${{ matrix.board }} set-target ${{ matrix.target }} && \
idf.py -B build/${{ matrix.board }} \
-D SDKCONFIG_DEFAULTS="sdkconfig.defaults;${{ matrix.sdkconfig }}" \
-D AUTOFILM_BOARD=${{ matrix.board }} \
build && \
idf.py -B build/${{ matrix.board }} size | tee size-${{ matrix.board }}.txt && \
cd build/${{ matrix.board }} && \
python $IDF_PATH/components/esptool_py/esptool/esptool.py \
--chip ${{ matrix.target }} merge_bin \
-o ../../autofilm-${{ matrix.board }}-${{ gitea.sha }}.bin \
@flash_args
- uses: actions/upload-artifact@v3
if: hashFiles('CMakeLists.txt') != ''
with:
name: firmware-${{ matrix.board }}
path: |
autofilm-${{ matrix.board }}-*.bin
build/${{ matrix.board }}/*.bin
build/${{ matrix.board }}/bootloader/bootloader.bin
build/${{ matrix.board }}/partition_table/partition-table.bin
build/${{ matrix.board }}/flasher_args.json
build/${{ matrix.board }}/sdkconfig
size-${{ matrix.board }}.txt