plz #10
This file contains hidden or 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: Arduino CI | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| platform: [esp32, esp8266] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Arduino CLI | |
| uses: arduino/setup-arduino-cli@v1 | |
| with: | |
| enable-ini-overrides: true | |
| - name: Add Board Manager URLs | |
| shell: bash | |
| run: | | |
| arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
| arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json | |
| - name: Arduino CLI version | |
| shell: bash | |
| run: arduino-cli version | |
| - name: Install ESP Boards | |
| shell: bash | |
| run: | | |
| arduino-cli core update-index | |
| arduino-cli core install esp32:esp32 | |
| arduino-cli core install esp8266:esp8266 | |
| - name: Install ESPAsync Libraries | |
| shell: bash | |
| run: | | |
| arduino-cli lib update-index | |
| arduino-cli lib install "ESP Async WebServer" | |
| if [ "${{ matrix.platform }}" = "esp32" ]; then | |
| arduino-cli lib install "AsyncTCP" | |
| else | |
| arduino-cli lib install "ESP Async TCP" | |
| fi | |
| - name: Prepare config for CI | |
| shell: bash | |
| run: | | |
| sketch_dir="$RUNNER_TEMP/IoT-Web-LED-Controller" | |
| mkdir -p "$sketch_dir" | |
| cp main.ino "$sketch_dir/IoT-Web-LED-Controller.ino" | |
| cp config.example.h "$sketch_dir/config.h" | |
| - name: Compile sketch | |
| shell: bash | |
| run: | | |
| sketch_dir="$RUNNER_TEMP/IoT-Web-LED-Controller" | |
| if [ "${{ matrix.platform }}" = "esp32" ]; then | |
| fqbn="esp32:esp32:esp32dev" | |
| else | |
| fqbn="esp8266:esp8266:nodemcuv2" | |
| fi | |
| arduino-cli compile --fqbn "$fqbn" "$sketch_dir" |