Skip to content

Fix compilation

Fix compilation #2002

Workflow file for this run

name: Build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: '.'
fallback-style: 'Google'
compile-cli:
name: Compile on ${{matrix.os}}
needs: formatting-check
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Create build folder
run: mkdir build-emu
- name: Build WARDuino CLI
run: cmake .. -D BUILD_EMULATOR=ON ; cmake --build .
working-directory: build-emu
compile-with-arduino:
name: (Arduino) Compile on ${{matrix.board.platform-name}}
needs: [formatting-check]
runs-on: ubuntu-latest
env:
SKETCHES_REPORTS_PATH: sketches-reports
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
LIBRARIES: |
- source-path: ./
- name: WiFi
- name: HTTPClient
- name: PubSubClient
- name: Adafruit NeoPixel
- source-url: https://github.com/me-no-dev/AsyncTCP.git
strategy:
fail-fast: false
matrix:
board:
- fqbn: 'esp32:esp32:esp32'
platform-name: esp32:esp32
include:
- board:
platform-name: esp32:esp32
platforms: |
# Install ESP32 platform via Boards Manager
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
sketches: |
- tests/compilation/esp32/esp32.ino
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Compile sketches
uses: arduino/compile-sketches@v1
with:
platforms: ${{ matrix.platforms }}
fqbn: ${{ matrix.board.fqbn }}
sketch-paths: |
${{ matrix.sketches }}
libraries: |
${{ env.LIBRARIES }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Upload sketches report to workflow artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
compile-with-idf:
name: (ESP-IDF) Compile on ${{matrix.board.platform-name}}
needs: formatting-check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- fqbn: 'esp32:esp32:esp32'
platform-name: esp32:esp32
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build WARDuino for ESP-IDF
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.2
target: esp32
command: idf.py build -DBUILD_ESP=ON
path: .