Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/actions/setup-pio/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup PlatformIO'
description: 'Sets up Python and PlatformIO for build and test jobs'

inputs:
install-matrix-deps:
description: 'Install matrix build dependencies from requirements_matrix_build.txt'
required: false
default: 'false'
install-unit-test-deps:
description: 'Install unit test dependencies (gcovr)'
required: false
default: 'false'

Comment thread
andre-stefanov marked this conversation as resolved.
runs:
using: 'composite'
steps:
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install PlatformIO
shell: bash
run: |
python -m pip install --upgrade pip
pip install wheel platformio
- name: Install matrix build dependencies
if: inputs.install-matrix-deps == 'true'
shell: bash
run: pip install -r requirements_matrix_build.txt
- name: Install unit test dependencies
if: inputs.install-unit-test-deps == 'true'
shell: bash
run: pip install gcovr
21 changes: 0 additions & 21 deletions .github/workflows/changelog.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
pull_request:
branches:
- '*'

jobs:
pr-title-lint:
name: PR Title (Conventional Commits)
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-pio
with:
install-unit-test-deps: 'true'
Comment thread
andre-stefanov marked this conversation as resolved.
- name: Run unit tests
run: pio test -e native -v
- name: Publish Coverage Summary
if: always()
run: |
echo "## Native Unit Test Coverage" >> "$GITHUB_STEP_SUMMARY"
echo >> "$GITHUB_STEP_SUMMARY"
if [ -f .pio/coverage.md ]; then
cat .pio/coverage.md >> "$GITHUB_STEP_SUMMARY"
else
echo "Coverage report was not generated." >> "$GITHUB_STEP_SUMMARY"
fi

build:
name: Build (${{ matrix.board }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- mksgenlv21
- mksgenlv2
- mksgenlv1
- esp32
- ramps
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-pio
with:
install-matrix-deps: 'true'
- name: Build ${{ matrix.board }}
run: python matrix_build.py -b ${{ matrix.board }}
2 changes: 1 addition & 1 deletion .github/workflows/code_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
Comment thread
andre-stefanov marked this conversation as resolved.
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/platformio.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/platformio_unit_tests.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Please

on:
push:
branches:
- develop

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.13.20"
}
File renamed without changes.
88 changes: 88 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Release Process

This document describes how releases are managed for OpenAstroTracker-Firmware. It is intended for project developers with write access to the repository.

## Overview

Releases are fully automated via [release-please](https://github.com/googleapis/release-please). The process requires no manual version bumping or changelog editing — both are driven by PR titles following the [Conventional Commits](https://www.conventionalcommits.org/) specification.

```
PR merged → release-please updates its Release PR → maintainer merges Release PR → tag + GitHub Release created automatically
```

## Conventional Commits (required for all PRs)

Every PR title **must** follow this format:

```
<type>: <short description>
```

CI will reject PR titles that do not conform.

| Type | Triggers | Example |
|------|----------|---------|
| `feat!` or `BREAKING CHANGE:` footer | major version bump | `feat!: remove legacy serial protocol` |
| `feat` | minor version bump | `feat: add AZ/ALT steps-per-degree Meade command` |
| `fix` | patch version bump | `fix: correct sidereal rate after meridian flip` |
| `perf` | patch version bump | `perf: reduce interrupt latency in stepper ISR` |
| `chore` | no version bump | `chore: update platformio dependencies` |
| `docs` | no version bump | `docs: clarify wiring diagram for RAMPS` |
| `refactor` | no version bump | `refactor: extract stepper configuration logic` |
| `test` | no version bump | `test: add unit tests for DayTime rollover` |
| `ci` | no version bump | `ci: update clang-format action version` |

The description becomes the changelog entry, so write it as a user-facing statement of what changed — not what you did internally.

## How release-please Works

After each PR is merged into `develop`, the `release-please` GitHub Action updates an open **Release PR**. This PR:

- Accumulates all `feat`, `fix`, and other notable commits since the last release
- Proposes the next semantic version (patch / minor / major based on commit types)
- Updates `CHANGELOG.md` with categorised entries linked to PRs
- Updates `Version.h` with the new version string

The Release PR stays open and self-updates as more PRs are merged. When you are ready to cut a release, simply **merge the Release PR**.

## Cutting a Release

1. Review the open Release PR (titled `chore(main): release V<version>`) — check the proposed version and changelog entries.
2. Merge it into `develop`.
3. `release-please` automatically:
- Creates a git tag `V<version>` (e.g. `V1.14.0`)
- Publishes a GitHub Release with the generated changelog

No manual tag pushing, no manual `Version.h` edits.

## Version Semantics

Versions follow [Semantic Versioning](https://semver.org/) (`MAJOR.MINOR.PATCH`):

| Change | Bump |
|--------|------|
| Breaking change in Meade protocol or configuration | **Major** |
| New feature, new board support, new Meade command | **Minor** |
| Bug fix, performance improvement | **Patch** |
| Chore, CI, refactor, test, docs | **None** |

## CI Checks on Every PR

All of the following must pass before a PR can be merged:

| Check | What it validates |
|-------|------------------|
| **PR Title (Conventional Commits)** | PR title follows `<type>: <description>` format |
| **Unit Tests** | `pio test -e native` passes |
| **Build (mksgenlv21)** | Firmware compiles for MKS Gen L V2.1 |
| **Build (mksgenlv2)** | Firmware compiles for MKS Gen L V2 |
| **Build (mksgenlv1)** | Firmware compiles for MKS Gen L V1 |
| **Build (esp32)** | Firmware compiles for ESP32 |
| **Build (ramps)** | Firmware compiles for RAMPS |
| **clang-format** | Code formatting matches `.clang-format`; auto-fixed on same-repo branches |

## Firmware Binaries

Pre-built binaries are **not** published in GitHub Releases. Because the firmware is configured via generated header files (stepper drivers, sensors, display type, etc.), a generic binary would not be usable without recompilation. Users must build the firmware for their specific hardware configuration using PlatformIO.


16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"tag-prefix": "V",
"packages": {
".": {
"release-type": "simple",
"extra-files": [
Comment thread
andre-stefanov marked this conversation as resolved.
{
"type": "generic",
"path": "Version.h"
}
]
}
}
}
4 changes: 0 additions & 4 deletions requirements_version_check.txt

This file was deleted.

Loading
Loading