From 0bb08bb3238d50f3957ffe45d5663a6b2f08edee Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 21 Jan 2025 10:46:35 +0100 Subject: [PATCH] ci: enable windows test --- .github/workflows/test-build-idf-apps.yml | 27 +++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-build-idf-apps.yml b/.github/workflows/test-build-idf-apps.yml index d8149ae..3e023fd 100644 --- a/.github/workflows/test-build-idf-apps.yml +++ b/.github/workflows/test-build-idf-apps.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - 'idf_build_apps/**' + - '.github/workflows/test-build-idf-apps.yml' push: branches: - main @@ -60,25 +61,37 @@ jobs: test ! -f build_esp32s2/hello_world.bin build-apps-on-idf-master: - runs-on: ubuntu-latest - container: - image: espressif/idf:latest + strategy: + matrix: + include: + - name: windows + os: windows-latest + idf_path: 'C:\esp\idf' + - name: ubuntu + os: ubuntu-latest + idf_path: '/opt/esp/idf' + runs-on: ${{ matrix.os }} env: FLIT_ROOT_INSTALL: 1 steps: - uses: actions/checkout@v4 + + - name: Install ESP-IDF + uses: espressif/install-esp-idf-action@v1 + with: + version: "master" + - name: Build the Apps run: | - bash $IDF_PATH/install.sh - . $IDF_PATH/export.sh + . ${{ matrix.idf_path }}/export.sh pip install flit flit install -s python -m idf_build_apps build -vv -t esp32 \ - -p $IDF_PATH/examples/get-started/hello_world \ + -p ${{ matrix.idf_path }}/examples/get-started/hello_world \ --size-file size_info.json pytest --cov idf_build_apps --cov-report term-missing:skip-covered --junit-xml pytest.xml | tee pytest-coverage.txt - name: Pytest coverage comment - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' uses: MishaKav/pytest-coverage-comment@main with: pytest-coverage-path: pytest-coverage.txt