Automated • Continuous • Reliable

CI/CD Pipeline

S0tool uses GitHub Actions to automate firmware builds, testing, and deployment. Every push triggers a complete pipeline that compiles all device configurations.

Overview

The S0tool CI/CD pipeline automatically:

  • Compiles ESPHome firmware for all device configurations
  • Tests changes on every pull request
  • Deploys updates to GitHub Pages
  • Creates releases with compiled binaries
  • Maintains consistency across devices

Workflow Triggers

The pipeline starts automatically on:

  • Push to main - Compiles and deploys
  • Pull requests - Tests changes before merge
  • Releases - Creates release builds
  • Version bump - Changing project_version in basis.yaml on main automatically creates a release (EN + NL notes), which then starts the firmware build
  • Manual dispatch - On-demand builds

Pipeline Stages

Stage 1: Build Firmware 🏗️

ESPHome compiles all device configurations using the official ESPHome workflow.

  • Runs on Ubuntu Latest
  • ESPHome Version: 2026.8.0
  • Compiles 11 device configurations
  • Generates binary artifacts

Stage 2: Consolidate Artifacts 📦

Downloads and organizes all compiled binaries into a clean folder structure.

  • Merges artifacts from parallel builds
  • Removes intermediate version folders
  • Copies static website files
  • Prepares output for deployment

Stage 3: Deploy to GitHub Pages 🚀

Deploys the complete site with firmware to GitHub Pages.

  • Only runs on main branch pushes
  • Uploads to GitHub Pages environment
  • Makes firmware available instantly
  • Public URL: https://s0tool.nl

Device Configurations

The build system compiles firmware for these configurations:

Configuration Purpose File
Water Meter NPN sensor water meter reading watermeter.yaml
Pulse Counter Generic pulse counting pulscounter.yaml
S0 Pulse + kWh Combined energy monitoring S0-puls-kwhpuls.yaml
DSZ12D Meter DSZ12D three-phase meter S0-puls-DSZ12D.yaml
LEM022SJ Meter LEM022SJ energy meter S0-puls-LEM022SJ.yaml
Water Meter (Alt) Alternative water configuration s0-watermeter.yaml
WSZ15D32A WSZ15D32A meter support wsz15d32a.yaml
SDM72D Three-phase power meter sdm72d.yaml
Water (Internal) Internal pulse meter puls-water-internal.yaml
kWh + Water Test Dual meter testing kwh-water-test.yaml
Pulse Counter (Flux) Flux-based counting pulscounter_flux.yaml

Deployment

What Gets Deployed

  • Static website (HTML, CSS, JS)
  • Firmware binaries for all devices
  • Installation tools
  • Web-based flashing interface

Deployment Permissions

  • pages:write - Write to GitHub Pages
  • id-token:write - Generate auth tokens
  • contents:read - Read repository

Files Copied During Deployment

  • Everything from static/ folder
  • All compiled firmware binaries
  • Organized by device name

View the Workflow

The complete CI/CD configuration is available on GitHub:

View build.yml on GitHub

File Path: .github/workflows/build.yml

Engine: ESPHome 2026.8.0

Platform: Ubuntu Latest

Want to Learn More?

Check out the GitHub repository or join our community:

GitHub Repo Discord Contributing