espressif / esp-idf-ci-action

GitHub Action for ESP32 CI
MIT License
59 stars 24 forks source link

[Question] Target multiple paths (RDT-808) #45

Open nopnop2002 opened 3 weeks ago

nopnop2002 commented 3 weeks ago

I have multiple projects that use one component.

project home
 - component
 - path1
   -  CMakeLists.txt
   -  sdkconfig
   -  main
     - CMakeLists.txt
     - main.c
 - path2
   -  CMakeLists.txt
   -  sdkconfig
   -  main
     - CMakeLists.txt
     - main.c
 - path3
   -  CMakeLists.txt
   -  sdkconfig
   -  main
     - CMakeLists.txt
     - main.c

How can I target multiple paths?

I tried the following, but an error occurred.

      matrix:
        idf_version:
          - release-v4.4
          - release-v5.0
          - release-v5.1
        idf_target:
          - esp32
          - esp32s2
        idf_path:
          - path1
          - path2
          - path3

    runs-on: ubuntu-latest
    steps:
    - name: Checkout repo
      uses: actions/checkout@v4
      with:
        submodules: 'recursive'
    - name: Build Application with ESP-IDF
      uses: espressif/esp-idf-ci-action@v1
      with:
        esp_idf_version: ${{ matrix.idf_version }}
        target: ${{ matrix.idf_target }}
        path: ${{ matrix.idf_path }}
kumekay commented 3 weeks ago

@nopnop2002 I cannot find any issues in your config just by looking at it. What kind of error has occurred? Please share the logs.

nopnop2002 commented 3 weeks ago

@kumekay

I used this repository for test. I think you can fork my repository and test it. https://github.com/nopnop2002/esp-idf-DFPlayerMini

This is my espidf-compile.yml:

name: esp-idf-ci-action

on:
  pull_request:
    paths:
      - "main/**"
      - "components/**"

  push:
    paths:
      - "main/**"
      - "components/**"

  workflow_dispatch:
  repository_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        idf_version:
          - release-v4.4
          - release-v5.2
        idf_target:
          - esp32
          - esp32s2
          - esp32c3
          - esp32s3
        idf_path:
          - GetStarted
          - PlayWithGpio
          - PlayWithCron

    runs-on: ubuntu-latest
    steps:
    - name: Checkout repo
      uses: actions/checkout@v4
      with:
        submodules: 'recursive'
    - name: Build Application with ESP-IDF
      uses: espressif/esp-idf-ci-action@v1
      with:
        esp_idf_version: ${{ matrix.idf_version }}
        target: ${{ matrix.idf_target }}
        path: ${{ matrix.idf_path }}

This is log:

esp-idf-ci-action2

esp-idf-ci-action