|
| 1 | +name: Continuous Integration |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + arduino: |
| 7 | + name: Arduino |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + include: |
| 13 | + - core: esp32:esp32 |
| 14 | + board: esp32:esp32:esp32 |
| 15 | + softwareserial: false |
| 16 | + index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Install arduino-cli |
| 23 | + run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh |
| 24 | + |
| 25 | + - name: Update core index |
| 26 | + run: arduino-cli core update-index --additional-urls "${{ matrix.index_url }}" |
| 27 | + |
| 28 | + - name: Install core |
| 29 | + run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }} |
| 30 | + |
| 31 | + - name: Install ESP32Time library |
| 32 | + run: arduino-cli lib install ESP32Time |
| 33 | + |
| 34 | + - name: Install RTClib library |
| 35 | + run: arduino-cli lib install RTClib |
| 36 | + |
| 37 | + - name: Install ArduinoJson library |
| 38 | + run: arduino-cli lib install ArduinoJson |
| 39 | + |
| 40 | + - name: Install StreamUtils library |
| 41 | + run: arduino-cli lib install StreamUtils |
| 42 | + |
| 43 | + - name: Build esp32-web-interface |
| 44 | + run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "esp32-web-interface.ino" |
| 45 | + |
| 46 | + platformio: |
| 47 | + name: PlatformIO |
| 48 | + runs-on: ubuntu-latest |
| 49 | + |
| 50 | + steps: |
| 51 | + - name: Checkout |
| 52 | + uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - name: Set up cache |
| 55 | + uses: actions/cache@v4 |
| 56 | + with: |
| 57 | + path: | |
| 58 | + ~/.platformio |
| 59 | + ~/.cache/pip |
| 60 | + key: ${{ runner.os }}-platformio |
| 61 | + |
| 62 | + - name: Set up Python 3.x |
| 63 | + uses: actions/setup-python@v5 |
| 64 | + with: |
| 65 | + python-version: '3.x' |
| 66 | + |
| 67 | + - name: Install PlatformIO |
| 68 | + run: pip install platformio |
| 69 | + |
| 70 | + - name: Build release esp32-web-interface |
| 71 | + run: platformio run -e release |
| 72 | + |
| 73 | + - name: Build debug esp32-web-interface |
| 74 | + run: platformio run -e debug |
0 commit comments