diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3b029be --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: build + +on: + pull_request: + push: + branches: [main] + +jobs: + build: + name: build ${{ matrix.env }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Representative env per chip family (classic ESP32 / S3 / C3) + env: [esp32-2432s028, esp32-s3-devkit, esp32-c3-supermini] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Cache PlatformIO + uses: actions/cache@v4 + with: + path: ~/.platformio + key: pio-${{ runner.os }}-${{ hashFiles('platformio.ini') }} + restore-keys: pio-${{ runner.os }}- + - name: Install PlatformIO + run: pip install platformio + - name: Build ${{ matrix.env }} + run: pio run -e ${{ matrix.env }}