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
100 changes: 100 additions & 0 deletions .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build matrix

# Verifies that the library builds and links on the major Arduino
# architectures. A hardware-independent smoke sketch is generated at build
# time (kept out of the repo so the library spec stays valid) and exercises
# every encode path, built against the repo library (not an installed copy)
# so PRs are validated against their exact content.

on:
push:
branches: [master, main]
pull_request:

jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: AVR (Arduino UNO)
fqbn: arduino:avr:uno
core: arduino:avr
- name: ATSAMD (MKR 1000)
fqbn: arduino:samd:mkr1000
core: arduino:samd
- name: ESP32 (Dev Module)
fqbn: esp32:esp32:esp32
core: esp32:esp32
- name: ESP8266 (NodeMCU 1.0)
fqbn: esp8266:esp8266:nodemcuv2
core: esp8266:esp8266
- name: Renesas (UNO R4 WiFi)
fqbn: arduino:renesas_uno:unor4wifi
core: arduino:renesas_uno

steps:
- uses: actions/checkout@v4

- name: Set up arduino-cli
uses: arduino/setup-arduino-cli@v2
with:
version: "1.x"

- name: Add ESP8266 board manager URL
if: matrix.core == 'esp8266:esp8266'
run: arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json

- name: Install core ${{ matrix.core }}
run: arduino-cli core install ${{ matrix.core }}

- name: Generate build smoke sketch
run: |
mkdir -p build-smoke
cat > build-smoke/build-smoke.ino <<'SKELETON'
/* JTEncode build smoke test — no hardware required.
Exercises every encode path so the library is compiled and
linked against whatever core the sketch is built for. */
#include <JTEncode.h>

JTEncode enc;

void setup()
{
Serial.begin(115200);
// JT4 is the largest symbol buffer (207)
uint8_t symbols[JT4_SYMBOL_COUNT];

enc.jt65_encode("NT7S", symbols);
enc.jt9_encode("NT7S", symbols);
enc.jt4_encode("NT7S", symbols);
enc.ft8_encode("NT7S", symbols);
enc.wspr_encode("NT7S", "CN84", 10, symbols);
enc.fsq_encode("NT7S", "HELLO", symbols);
enc.fsq_dir_encode("NT7S", "CN84", ' ', "TEST", symbols);

char grid[7];
enc.latlon_to_grid(44.5, -122.5, grid);

Serial.print("JTEncode built OK; symbols[0]=");
Serial.println(symbols[0]);
}

void loop() {}
SKELETON

- name: Compile smoke sketch against the repo library
run: |
set -o pipefail
arduino-cli compile --fqbn ${{ matrix.fqbn }} --library "$GITHUB_WORKSPACE" --verbose build-smoke 2>&1 | tee build.log

- name: Verify the repo library (not an installed copy) is used
run: |
# arduino-cli silently falls back to an installed copy if the library
# is not found — fail loudly instead. The verbose log's compile
# commands must reference the repo's own sources.
grep -q "src/JTEncode.cpp" build.log
grep -q "src/crc14.c" build.log
grep -q "src/nhash.c" build.log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# WiFi credentials for the WSPR beacon example — never commit these.
arduino_secrets.h
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,23 @@ Also, a big thank you to Murray Greenman, ZL1BPU for working allowing me to pick

Changelog
---------
* v1.4.1

* Fix FCR macro collision with Renesas RA4M1 device header (R7FA4M1AB.h):
the dead `#define FCR (rs->fcr)` in src/int.h expanded the `FCR` hardware
register name and broke compilation on the Arduino UNO R4 WiFi (and other
Renesas targets). The macro was never used (the struct field is accessed
directly), so it was removed.
* Add a sanitized `WSPR_Beacon_UnoR4WiFi` example: a WSPR beacon for the
Uno R4 WiFi that transmits every 10 minutes on 30 m. Each transmission
picks a random frequency inside the 200 Hz WSPR window (10.1401-10.1403 MHz)
via the hardware TRNG, starts 1 second into the even UTC minute, and syncs
time over WiFi/NTP. Credentials come from a gitignored `arduino_secrets.h`
(never committed).
* Add a build-matrix CI workflow that compiles a hardware-independent smoke
sketch against the repo library on AVR, ATSAMD, ESP32, ESP8266 and Renesas,
verifying the library builds and links on the major Arduino architectures.

* v1.4.0

* Added test harness (17 checks) covering memory-safety and output-correctness bugs
Expand Down
Loading
Loading