Skip to content

Commit

Permalink
Add esp-idf component build example
Browse files Browse the repository at this point in the history
  • Loading branch information
mzyy94 committed Jan 30, 2024
1 parent 58ac71e commit a859e3d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PlatformIO CI
on: [push]

jobs:
build:
build-pio:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,3 +29,24 @@ jobs:

- name: Build PlatformIO examples
run: pio run --project-dir ${{ matrix.example }}

build-idf:
runs-on: ubuntu-latest
strategy:
matrix:
example:
- examples/dial_number

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
${{ matrix.example }}/build
${{ matrix.example }}/managed_components
key: ${{ runner.os }}-idf
- uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.1
target: esp32s3
path: ${{ matrix.example }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
examples/**/.vscode
examples/**/CMakeLists.txt
examples/**/.gitignore
examples/**/sdkconfig.*
examples/**/sdkconfig*
examples/**/managed_components
examples/**/dependencies.lock
build
!examples/dial_number/**/CMakeLists.txt
4 changes: 4 additions & 0 deletions examples/dial_number/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmake_minimum_required(VERSION 3.16.0)
set(EXTRA_COMPONENT_DIRS src)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(dial_number)
6 changes: 6 additions & 0 deletions examples/dial_number/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was automatically generated for projects
# without default 'CMakeLists.txt' file.

FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)

idf_component_register(SRCS ${app_sources})
3 changes: 3 additions & 0 deletions examples/dial_number/src/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
M5Dial-LVGL:
path: ../../../../M5Dial-LVGL

0 comments on commit a859e3d

Please sign in to comment.