Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,44 @@ jobs:
assert parse_serial_line('garbage\n').malformed
PY

- name: Compile release assembly script
run: python -m py_compile release/scripts/assemble_customer_package.py
- name: Release assembly script help
run: python release/scripts/assemble_customer_package.py --help
- name: Release assembly smoke test
run: |
set -euo pipefail
cleanup() {
rm -rf \
release/artifacts/windows/PortableAVRControlStudio.exe \
release/artifacts/firmware/PortableAVRControlStudio.ino.hex \
release/customer_package/PortableAVRControlStudio-customer-handoff \
release/customer_package/PortableAVRControlStudio-customer-handoff.zip
}
trap cleanup EXIT

printf 'dummy exe for CI release assembly smoke test\n' > release/artifacts/windows/PortableAVRControlStudio.exe
printf ':00000001FF\n' > release/artifacts/firmware/PortableAVRControlStudio.ino.hex

python release/scripts/assemble_customer_package.py

test -d release/customer_package/PortableAVRControlStudio-customer-handoff
test -f release/customer_package/PortableAVRControlStudio-customer-handoff.zip
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/PortableAVRControlStudio.exe
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/PortableAVRControlStudio.ino.hex
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/README.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/customer_handoff.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/PROTOCOL.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/product_spec.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/testing.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/profiles/arduino_uno_avr.json

git check-ignore \
release/artifacts/windows/PortableAVRControlStudio.exe \
release/artifacts/firmware/PortableAVRControlStudio.ino.hex \
release/customer_package/PortableAVRControlStudio-customer-handoff \
release/customer_package/PortableAVRControlStudio-customer-handoff.zip

avr-compile:
name: Arduino AVR Uno compile
runs-on: ubuntu-latest
Expand Down
26 changes: 16 additions & 10 deletions docs/PACKAGING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Packaging

See `release/README.md` for the proposed customer handoff folder layout. Generated EXE and HEX artifacts should be staged under `release/artifacts/` and copied into `release/customer_package/` only when preparing a customer ZIP.
See `release/README.md` and `release/BUILD_VERIFICATION.md` for the customer handoff folder layout and artifact verification workflow. Generated EXE and HEX artifacts should be staged under `release/artifacts/` and copied into `release/customer_package/` only when preparing a customer ZIP.

## Portable Windows Packaging

Expand Down Expand Up @@ -34,16 +34,22 @@ py -m pip install --upgrade pyinstaller pyserial
py -m PyInstaller --noconfirm --onefile --windowed --name PortableAVRControlStudio --distpath release\artifacts\windows --workpath build\pyinstaller --specpath build\pyinstaller-spec gui\portable_avr_control_studio.py
```

Copy these items into the customer handoff folder after the build and checks pass:
After the build and checks pass, the customer handoff package can be assembled with:

```bash
python release/scripts/assemble_customer_package.py
```

The script copies these items into `release/customer_package/PortableAVRControlStudio-customer-handoff/`:

1. `release\artifacts\windows\PortableAVRControlStudio.exe`
2. `README.md`
3. `docs\PROTOCOL.md`
4. `docs\product_spec.md`
5. `docs\testing.md`
6. `docs\customer_handoff.md`
7. `docs\profiles\*.json`
8. Prepared Arduino Uno `.hex` firmware artifacts from `release/artifacts/firmware/`
2. `release/artifacts/firmware/PortableAVRControlStudio.ino.hex`
3. `README.md`
4. `docs\customer_handoff.md`
5. `docs\PROTOCOL.md`
6. `docs\product_spec.md`
7. `docs\testing.md`
8. `docs\profiles\arduino_uno_avr.json`

The firmware upload tab is a placeholder workflow for prepared `.hex` artifacts. A production package should bundle and test the selected uploader, target MCU flags, COM-port behavior, and profile-specific firmware before presenting upload as a one-click customer feature.

Expand All @@ -68,4 +74,4 @@ The expected primary HEX output is `release/artifacts/firmware/PortableAVRContro

## Developer customer ZIP checklist

Use `release/checklists/customer_zip_checklist.md` before sending a customer ZIP. It covers software checks, Uno HEX generation, staging contents, and release-claim review.
Use `release/checklists/customer_zip_checklist.md` before sending a customer ZIP. Use `release/templates/maintainer_release_notes.md` to record software checks, Uno compile evidence, EXE build evidence, HEX artifact evidence, ZIP evidence, and explicit physical hardware test status.
4 changes: 2 additions & 2 deletions docs/customer_handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This guide explains how a customer can run Portable AVR Control Studio with an A
A prepared customer ZIP should contain:

- `PortableAVRControlStudio.exe` — Windows desktop app.
- `firmware/PortableAVRControlStudio.ino.hex` — prepared Arduino Uno firmware artifact, if firmware delivery is included.
- `PortableAVRControlStudio.ino.hex` — prepared Arduino Uno firmware artifact, if firmware delivery is included.
- `docs/` — protocol, product settings, testing notes, and hardware profile documents.
- `docs/profiles/arduino_uno_avr.json` — the default documented wiring/profile for Arduino Uno.

Expand Down Expand Up @@ -93,7 +93,7 @@ EEPROM persistence still requires validation on the target physical board before

## Firmware artifact and upload boundary

The release package may include `firmware/PortableAVRControlStudio.ino.hex` as a prepared Arduino Uno firmware artifact. This repository documents how to build the artifact, but firmware upload should remain a maintainer/developer workflow unless the customer package also includes a tested uploader, exact command flags, target MCU settings, and COM-port procedure.
The release package may include `PortableAVRControlStudio.ino.hex` at the customer package root as a prepared Arduino Uno firmware artifact. This repository documents how to build the artifact, but firmware upload should remain a maintainer/developer workflow unless the customer package also includes a tested uploader, exact command flags, target MCU settings, and COM-port procedure.

## What still requires physical hardware validation

Expand Down
157 changes: 157 additions & 0 deletions release/BUILD_VERIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Release Build Verification

This document records the maintainer workflow for producing and checking the Portable AVR Control Studio release artifacts for the Arduino Uno / ATmega328P AVR target.

These are software build checks only. They do not prove operation on physical Arduino Uno hardware, relay drivers, buzzer circuitry, sensors, wiring, power supply, or enclosure.

## Prerequisites

### Windows EXE build host

- Windows with PowerShell.
- Python available as `py`.
- Internet access or pre-populated Python package cache for `pyinstaller` and `pyserial`.

### Arduino Uno HEX build host

- `arduino-cli` installed and available on `PATH`.
- Internet access or a configured Arduino CLI package cache for the `arduino:avr` core.
- Bash-compatible shell for `release/scripts/build_uno_firmware_hex.sh`.

## 1. Optional clean start

Generated build outputs are ignored by git. To start from a clean artifact area, remove generated files while keeping the tracked `.gitkeep` placeholders:

```bash
find release/artifacts/windows -mindepth 1 ! -name .gitkeep -delete
find release/artifacts/firmware -mindepth 1 ! -name .gitkeep -delete
find release/customer_package -mindepth 1 ! -name .gitkeep -delete
```

## 2. Build the Windows EXE artifact

Run from the repository root on Windows PowerShell:

```powershell
powershell -ExecutionPolicy Bypass -File .\release\scripts\build_windows_exe.ps1
```

The script installs or updates the Python packaging dependencies it needs, then runs PyInstaller against `gui\portable_avr_control_studio.py`.

Expected output file:

```text
release\artifacts\windows\PortableAVRControlStudio.exe
```

Verify the EXE exists:

```powershell
Test-Path .\release\artifacts\windows\PortableAVRControlStudio.exe
Get-Item .\release\artifacts\windows\PortableAVRControlStudio.exe | Select-Object FullName,Length,LastWriteTime
```

Record the command output in the maintainer release notes template before publishing any customer handoff package.

## 3. Build the Arduino Uno HEX artifact

Run from the repository root in Bash:

```bash
bash release/scripts/build_uno_firmware_hex.sh
```

The script updates the Arduino CLI index, installs the `arduino:avr` core if needed, and compiles the firmware with `--fqbn arduino:avr:uno`.

Expected primary output file:

```text
release/artifacts/firmware/PortableAVRControlStudio.ino.hex
```

Arduino CLI may also emit related metadata files in `release/artifacts/firmware/`; those generated files are ignored by git.

Verify the HEX exists:

```bash
test -f release/artifacts/firmware/PortableAVRControlStudio.ino.hex
ls -lh release/artifacts/firmware/PortableAVRControlStudio.ino.hex
```

Record the full compile command and result in the maintainer release notes template. This compile check is not a physical hardware validation.

## 4. Assemble the customer package staging folder and ZIP

After both expected artifacts exist, run the assembly script from the repository root:

```bash
python release/scripts/assemble_customer_package.py
```

The script copies the customer handoff files into:

```text
release/customer_package/PortableAVRControlStudio-customer-handoff/
```

It also creates this generated ZIP by default:

```text
release/customer_package/PortableAVRControlStudio-customer-handoff.zip
```

Expected staged contents:

```text
release/customer_package/PortableAVRControlStudio-customer-handoff/
PortableAVRControlStudio.exe
PortableAVRControlStudio.ino.hex
README.md
docs/
customer_handoff.md
PROTOCOL.md
product_spec.md
testing.md
profiles/
arduino_uno_avr.json
```

Verify the required staged files exist:

```bash
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/PortableAVRControlStudio.exe
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/PortableAVRControlStudio.ino.hex
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/README.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/customer_handoff.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/PROTOCOL.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/product_spec.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/testing.md
test -f release/customer_package/PortableAVRControlStudio-customer-handoff/docs/profiles/arduino_uno_avr.json
test -f release/customer_package/PortableAVRControlStudio-customer-handoff.zip
```

For a readable inventory, run:

```bash
find release/customer_package/PortableAVRControlStudio-customer-handoff -type f | sort
```

## 5. Confirm generated artifacts are not staged for git

Before committing release workflow changes, confirm generated EXE, HEX, and ZIP files are not staged:

```bash
git status --short --ignored release/artifacts release/customer_package
```

Expected behavior:

- Tracked `.gitkeep` files may appear only if intentionally changed.
- Generated files under `release/artifacts/windows/`, `release/artifacts/firmware/`, and `release/customer_package/` should be ignored.
- Do not commit generated `.exe`, `.hex`, or `.zip` artifacts.

## 6. Release-claim boundaries

- Document software checks separately from physical Arduino Uno hardware validation.
- Do not claim physical hardware testing unless a human maintainer provides evidence for the exact board, wiring, power, enclosure, and hardware profile.
- Do not claim one-click production upload unless uploader tooling is bundled, configured, and tested with the final artifact and customer environment.
22 changes: 18 additions & 4 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ release/
artifacts/
windows/ # Generated PortableAVRControlStudio.exe (not committed)
firmware/ # Generated Arduino Uno .hex files (not committed)
customer_package/ # Staging area for files copied into the customer ZIP
customer_package/ # Generated staging folder and ZIP (not committed)
templates/
maintainer_release_notes.md # Evidence template for release candidates
BUILD_VERIFICATION.md # Maintainer artifact build and verification steps
checklists/
customer_zip_checklist.md # Developer checklist for assembling the ZIP
```

## Intended customer ZIP contents

A customer ZIP should be assembled from the staging area after the documented checks pass. Recommended contents:
A customer ZIP should be assembled from the staging area after the documented checks pass. The assembly script stages these contents:

```text
PortableAVRControlStudio-customer-handoff/
PortableAVRControlStudio.exe
firmware/
PortableAVRControlStudio.ino.hex
PortableAVRControlStudio.ino.hex
docs/
customer_handoff.md
PROTOCOL.md
Expand All @@ -37,6 +39,18 @@ PortableAVRControlStudio-customer-handoff/
README.md
```

## Build verification and package assembly

Use `release/BUILD_VERIFICATION.md` for the maintainer build verification workflow. After building the EXE and Uno HEX artifacts, run:

```bash
python release/scripts/assemble_customer_package.py
```

The script stages `release/customer_package/PortableAVRControlStudio-customer-handoff/` and creates `release/customer_package/PortableAVRControlStudio-customer-handoff.zip`. Both generated outputs are ignored by git.

Record release evidence in `release/templates/maintainer_release_notes.md`.

## Important release boundaries

- The primary firmware artifact is for Arduino Uno / ATmega328P AVR using `arduino:avr:uno`.
Expand Down
24 changes: 16 additions & 8 deletions release/checklists/customer_zip_checklist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Developer Checklist: Customer ZIP Package

Use this checklist before preparing a customer handoff ZIP for Portable AVR Control Studio.
Use this checklist before preparing a customer handoff ZIP for Portable AVR Control Studio. Keep software build evidence separate from any physical Arduino Uno hardware validation evidence.

## 1. Confirm source and target

Expand All @@ -25,6 +25,7 @@ Use this checklist before preparing a customer handoff ZIP for Portable AVR Cont

- [ ] Confirm `release\artifacts\windows\PortableAVRControlStudio.exe` exists.
- [ ] Open the EXE on a Windows test machine and confirm the GUI launches. This is a software launch check only unless a real board is connected and separately recorded.
- [ ] Record EXE build evidence in `release/templates/maintainer_release_notes.md`.

## 3. Build the Arduino Uno firmware artifact

Expand All @@ -36,20 +37,27 @@ Use this checklist before preparing a customer handoff ZIP for Portable AVR Cont
```

- [ ] Confirm `release/artifacts/firmware/PortableAVRControlStudio.ino.hex` exists.
- [ ] Record the Arduino CLI version and command output in maintainer notes.
- [ ] Record the Arduino CLI version, AVR core version, command output, and artifact details in `release/templates/maintainer_release_notes.md`.

## 4. Stage the customer ZIP

- [ ] Create or clean `release/customer_package/PortableAVRControlStudio-customer-handoff/`.
- [ ] Copy `PortableAVRControlStudio.exe` into the package root.
- [ ] Copy the Uno HEX artifact into `firmware/` inside the package.
- [ ] Copy these docs into `docs/` inside the package:
- [ ] Assemble the package after the EXE and HEX artifacts exist:

```bash
python release/scripts/assemble_customer_package.py
```

- [ ] Confirm `release/customer_package/PortableAVRControlStudio-customer-handoff.zip` exists.
- [ ] Confirm the staged folder contains exactly the required release files:
- [ ] `PortableAVRControlStudio.exe`
- [ ] `PortableAVRControlStudio.ino.hex`
- [ ] `README.md`
- [ ] `docs/customer_handoff.md`
- [ ] `docs/PROTOCOL.md`
- [ ] `docs/product_spec.md`
- [ ] `docs/testing.md`
- [ ] `docs/profiles/arduino_uno_avr.json`
- [ ] Copy the repository `README.md` into the package root.
- [ ] Record ZIP evidence in `release/templates/maintainer_release_notes.md`.

## 5. Verify customer-facing claims

Expand All @@ -60,6 +68,6 @@ Use this checklist before preparing a customer handoff ZIP for Portable AVR Cont

## 6. Final package review

- [ ] ZIP the staged folder using a customer-visible version/date naming scheme.
- [ ] Open the ZIP and confirm the expected files are present.
- [ ] Confirm generated EXE, HEX, and ZIP artifacts are ignored and not staged for git.
- [ ] Keep the GitHub PR as Draft until Python smoke checks and Uno AVR compile checks are documented and reproducible in CI or maintainer notes.
Loading
Loading