Initialize project structure with configuration files and basic setup
This commit is contained in:
52
.gitea/ci.yml
Normal file
52
.gitea/ci.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
name: ESP-IDF CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: espressif/idf:release-v5.5.2 # Usa una versión estable fija
|
||||
options: --user root # Necesario en algunos runners de Gitea
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Setup Build Environment
|
||||
run: |
|
||||
. $IDF_PATH/export.sh
|
||||
idf.py --version
|
||||
|
||||
# 1. Compilación para el Hardware Real (ej. ESP32-S3)
|
||||
- name: Build Firmware (Target)
|
||||
env:
|
||||
IDF_TARGET: esp32c6 # Cambia esto a tu chip (esp32, esp32c3, etc)
|
||||
run: |
|
||||
. $IDF_PATH/export.sh
|
||||
idf.py build
|
||||
|
||||
# 2. Ejecutar Tests en Host (Linux)
|
||||
# Esto compila tu lógica y la corre en el contenedor para verificar algoritmos
|
||||
- name: Run Host Tests
|
||||
run: |
|
||||
. $IDF_PATH/export.sh
|
||||
# Configura el target a linux para ejecutar tests en el CI
|
||||
idf.py --preview set-target linux
|
||||
idf.py build
|
||||
# Ejecuta el binario generado que contiene los tests
|
||||
find build -maxdepth 1 -name "*.elf" -type f -exec {} \;
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: firmware-binaries
|
||||
path: |
|
||||
build/*.bin
|
||||
build/*.elf
|
||||
build/flasher_args.json
|
||||
Reference in New Issue
Block a user