Skip to content

Commit 8914cd0

Browse files
authored
Continuous integration (#6)
* CI Github workflow for Arduino and PlatformIO Build the project using the current PlatformIO and Arduino development environments on every push and pull request. The Arduino build installs all of the dependencies manually before building the sketch. The PlatformIO build installs all dependencies automatically before building the debug and release builds of the project. The README is updated to add a status badge to allow the continuous integration status to be seen easily. * Remove version restriction on ArduinoJson With the changes in fe6f190 to update the code to support ArduinoJson 7 the version restriction is no longer required.
1 parent 9bca9ff commit 8914cd0

File tree

2 files changed

+84
-6
lines changed

2 files changed

+84
-6
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,28 @@ esp32-web-interface
22
=====================
33
Web interface for Huebner inverter
44

5+
[![Build status](../../actions/workflows/ci.yml/badge.svg)](../../actions/workflows/ci.yml)
6+
57
# Table of Contents
68
<details>
79
<summary>Click to open TOC</summary>
810
<!-- MarkdownTOC autolink="true" levels="1,2,3,4,5,6" bracket="round" style="unordered" indent=" " autoanchor="false" markdown_preview="github" -->
911

12+
- [esp32-web-interface](#esp32-web-interface)
13+
- [Table of Contents](#table-of-contents)
1014
- [About](#about)
1115
- [Usage](#usage)
12-
- [Wifi network](#wifi-network)
13-
- [Reaching the board](#reaching-the-board)
16+
- [Wifi network](#wifi-network)
17+
- [Reaching the board](#reaching-the-board)
1418
- [Hardware](#hardware)
1519
- [Firmware](#firmware)
1620
- [Flashing / Upgrading](#flashing--upgrading)
17-
- [Wirelessly](#wirelessly)
18-
- [Wired](#wired)
21+
- [Wirelessly](#wirelessly)
22+
- [Wired](#wired)
1923
- [Documentations](#documentations)
2024
- [Development](#development)
21-
- [Arduino](#arduino)
22-
- [PlatformIO](#platformio)
25+
- [Arduino](#arduino)
26+
- [PlatformIO](#platformio)
2327

2428
<!-- /MarkdownTOC -->
2529
</details>

0 commit comments

Comments
 (0)