Revamp ci action #277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build firmware | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: "0 1 * * 6" # Every Saturday at 1AM | |
jobs: | |
build-component: | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
idf_ver: ["v4.3", "v4.4", "v5.0", "latest"] | |
idf_target: ["esp32"] | |
include: | |
- idf_ver: "v4.4" | |
idf_target: esp32s2 | |
- idf_ver: "v4.4" | |
idf_target: esp32c3 | |
- idf_ver: "v4.4" | |
idf_target: esp32s3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install g++ | |
run: | | |
apt-get update | |
apt-get install -y g++ | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Fetch tags in submodules | |
run: | | |
git submodule foreach --recursive 'git fetch --tags' | |
- name: esp-idf build library | |
uses: espressif/esp-idf-ci-action@v1 | |
with: | |
esp_idf_version: ${{ matrix.idf_ver }} | |
target: ${{ matrix.idf_target }} | |
path: "example/" | |
command: idf.py build | |
- name: esp-idf build tests | |
uses: espressif/esp-idf-ci-action@main | |
with: | |
esp_idf_version: ${{ matrix.idf_ver }} | |
command: '/bin/bash -c " ln -s /app /opt/esp/idf/tools/unit-test-app/components/littlefs; cd /opt/esp/idf/tools/unit-test-app; idf.py -T littlefs build"' |