Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b164e9a
Migrate Lingo config to Strata memory policy
zekageri Sep 8, 2026
1c86b71
Route Lingo registry ownership through Strata
zekageri Sep 8, 2026
2311878
Update Lingo host tests for Strata diagnostics
zekageri Sep 8, 2026
ae7fd91
Add Strata memory policy tests
zekageri Sep 8, 2026
c6f6af7
Remove bespoke PSRAM allocation tests
zekageri Sep 8, 2026
9de4451
Remove Lingo ESP heap allocation stub
zekageri Sep 8, 2026
4ea9c49
Remove bespoke Lingo allocator
zekageri Sep 8, 2026
4d9aa0f
Add Strata v0.1.2 dependency for Lingo v0.2.0
zekageri Sep 8, 2026
8831025
Bump Lingo metadata to v0.2.0
zekageri Sep 8, 2026
ccf0be5
Align Lingo CI with Strata memory ownership
zekageri Sep 8, 2026
61880c0
Document Lingo v0.2.0 Strata migration
zekageri Sep 8, 2026
e95e7ee
Document Lingo Strata API
zekageri Sep 8, 2026
b864d09
Update Lingo getting started for Strata
zekageri Sep 8, 2026
0320792
Replace Lingo PSRAM config docs with Strata policy
zekageri Sep 8, 2026
1b6930d
Document Strata-backed Lingo memory ownership
zekageri Sep 8, 2026
a79dce4
Update Basic example for Strata memory policy
zekageri Sep 8, 2026
c58b46c
Update Lingo README for Strata v0.2.0
zekageri Sep 8, 2026
efbc1e5
Document Strata allocation failures
zekageri Sep 8, 2026
1380b40
Fix release notes extraction in Lingo CI
zekageri Sep 8, 2026
1cf5720
Fix clang-format in Lingo init validation
zekageri Sep 8, 2026
a9d200f
Migrate FeatureTables example to Strata memory policy
zekageri Sep 8, 2026
02038af
Fix PlatformIO CI disk exhaustion
zekageri Sep 8, 2026
daeb7d4
Fix CI workflow validation
zekageri Sep 8, 2026
59aec3a
Isolate embedded CI toolchains
zekageri Sep 8, 2026
44b0698
Fix self-hosted runner cache cleanup
zekageri Sep 8, 2026
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
121 changes: 104 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ on:
workflow_dispatch:

concurrency:
group: lingo-${{ github.ref }}
cancel-in-progress: false
group: lingo-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

env:
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: https://espressif.github.io/arduino-esp32/package_esp32_index.json
ARDUINO_CLI_VERSION: 1.5.0
ARDUINO_NETWORK_CONNECTION_TIMEOUT: 240s
ESP32_CORE_VERSION: 3.3.9
PIOARDUINO_PLATFORM_URL: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.39/platform-espressif32.zip
PIOARDUINO_PLATFORM_VERSION: 55.03.39
PIOARDUINO_VERSION: 6.1.19
STRATA_VERSION: v0.1.2

jobs:
metadata:
Expand Down Expand Up @@ -42,6 +47,7 @@ jobs:
- uses: actions/checkout@v4
- name: Audit embedded boundaries
run: |
set -e
if grep -RInE '#include[[:space:]]+[<"](Accord|Curier|Flow|Fresh|Link|Phase|Pulse|Seal|Signal|Tempo|Trace|Worker)\.h[>"]' src; then
echo "Lingo must not depend on another ZekStack library"
exit 1
Expand All @@ -62,32 +68,47 @@ jobs:
echo "Lingo internals must not use Arduino String"
exit 1
fi
if grep -RInE 'heap_caps_|MALLOC_CAP_|ps_malloc|#include[[:space:]]+[<"]esp_heap_caps\.h[>"]|(^|[^[:alnum:]_:])malloc[[:space:]]*\(|(^|[^[:alnum:]_:])calloc[[:space:]]*\(|(^|[^[:alnum:]_:])realloc[[:space:]]*\(|(^|[^[:alnum:]_:])free[[:space:]]*\(|(^|[^[:alnum:]_])new[[:space:](]|(^|[^[:alnum:]_])delete[[:space:](]' src; then
echo "Lingo-owned allocations must route through Strata"
exit 1
fi

host-tests:
runs-on: [self-hosted, zekstack-ci]
needs: source-audit
steps:
- uses: actions/checkout@v4
- name: Checkout Strata
run: |
rm -rf /tmp/lingo-strata
git clone --depth 1 --branch "${STRATA_VERSION}" \
https://github.com/ZekStack/strata.git /tmp/lingo-strata
- name: Build host behavior tests
run: |
g++ -std=c++20 -Wall -Wextra -pedantic \
-Isrc \
-I/tmp/lingo-strata/src \
src/Lingo.cpp \
/tmp/lingo-strata/src/strata/Allocation.cpp \
/tmp/lingo-strata/src/strata/Diagnostics.cpp \
/tmp/lingo-strata/src/strata/internal/PlatformGeneric.cpp \
tests/host/lingo_host_tests.cpp \
-o /tmp/lingo-host-tests
- name: Run host behavior tests
run: /tmp/lingo-host-tests
- name: Build PSRAM allocation tests
- name: Build memory policy tests
run: |
g++ -std=c++20 -Wall -Wextra -pedantic \
-DESP32 \
-Itests/host/esp_stubs \
-Isrc \
-I/tmp/lingo-strata/src \
src/Lingo.cpp \
tests/host/psram_allocation_tests.cpp \
-o /tmp/lingo-psram-tests
- name: Run PSRAM allocation tests
run: /tmp/lingo-psram-tests
/tmp/lingo-strata/src/strata/Allocation.cpp \
/tmp/lingo-strata/src/strata/Diagnostics.cpp \
/tmp/lingo-strata/src/strata/internal/PlatformGeneric.cpp \
tests/host/memory_policy_tests.cpp \
-o /tmp/lingo-memory-policy-tests
- name: Run memory policy tests
run: /tmp/lingo-memory-policy-tests

build-examples:
runs-on: [self-hosted, zekstack-ci]
Expand All @@ -101,17 +122,18 @@ jobs:
- esp32-c3-devkitm-1
- esp32-p4-evboard
steps:
- name: Prepare isolated PIOArduino state
run: |
PLATFORMIO_CORE_DIR="${RUNNER_TEMP}/lingo-platformio"
PIP_CACHE_DIR="${RUNNER_TEMP}/lingo-pip-cache"
rm -rf "${PLATFORMIO_CORE_DIR}" "${PIP_CACHE_DIR}"
mkdir -p "${PLATFORMIO_CORE_DIR}" "${PIP_CACHE_DIR}"
echo "PLATFORMIO_CORE_DIR=${PLATFORMIO_CORE_DIR}" >> "${GITHUB_ENV}"
echo "PIP_CACHE_DIR=${PIP_CACHE_DIR}" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Cache PIOArduino
uses: actions/cache@v4
with:
path: |
~/.platformio
~/.cache/pip
key: ${{ runner.os }}-pioarduino-${{ env.PIOARDUINO_VERSION }}-${{ env.PIOARDUINO_PLATFORM_VERSION }}-${{ hashFiles('**/library.json') }}
- name: Install PIOArduino
run: |
python -m pip install --upgrade "pioarduino==${PIOARDUINO_VERSION}"
Expand All @@ -124,13 +146,78 @@ jobs:
--board "${{ matrix.board }}" \
--lib="." \
--project-option "platform=${PIOARDUINO_PLATFORM_URL}" \
--project-option "lib_deps=https://github.com/ZekStack/strata.git#${STRATA_VERSION}" \
--project-option "build_unflags=-std=gnu++11" \
--project-option "build_flags=-std=gnu++20"
done
- name: Clean PIOArduino temporary state
if: always()
run: rm -rf "${PLATFORMIO_CORE_DIR}" "${PIP_CACHE_DIR}"

arduino-cli:
runs-on: [self-hosted, zekstack-ci]
needs: source-audit
strategy:
fail-fast: false
matrix:
board:
- fqbn: esp32:esp32:esp32
name: esp32dev
- fqbn: esp32:esp32:esp32s3
name: esp32-s3-devkitc-1
- fqbn: esp32:esp32:esp32c3
name: esp32-c3-devkitm-1
- fqbn: esp32:esp32:esp32p4
name: esp32-p4-evboard
steps:
- name: Prepare isolated Arduino CLI state
run: |
ARDUINO_DATA_DIR="${RUNNER_TEMP}/lingo-arduino-data"
ARDUINO_DOWNLOADS_DIR="${RUNNER_TEMP}/lingo-arduino-downloads"
ARDUINO_USER_DIR="${RUNNER_TEMP}/lingo-arduino-user"
rm -rf "${ARDUINO_DATA_DIR}" "${ARDUINO_DOWNLOADS_DIR}" "${ARDUINO_USER_DIR}"
mkdir -p "${ARDUINO_DATA_DIR}" "${ARDUINO_DOWNLOADS_DIR}" "${ARDUINO_USER_DIR}"
echo "ARDUINO_DIRECTORIES_DATA=${ARDUINO_DATA_DIR}" >> "${GITHUB_ENV}"
echo "ARDUINO_DIRECTORIES_DOWNLOADS=${ARDUINO_DOWNLOADS_DIR}" >> "${GITHUB_ENV}"
echo "ARDUINO_DIRECTORIES_USER=${ARDUINO_USER_DIR}" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
- uses: arduino/setup-arduino-cli@v2
with:
version: ${{ env.ARDUINO_CLI_VERSION }}
- name: Install ESP32 core
run: |
arduino-cli core update-index
arduino-cli core install "esp32:esp32@${ESP32_CORE_VERSION}"
- name: Add local libraries to sketchbook
run: |
set -e
SKETCHBOOK_DIR="${ARDUINO_DIRECTORIES_USER}"
mkdir -p "$SKETCHBOOK_DIR/libraries/Lingo"
rsync -a --delete --exclude ".git" ./ "$SKETCHBOOK_DIR/libraries/Lingo/"
git clone --depth 1 --branch "${STRATA_VERSION}" \
https://github.com/ZekStack/strata.git \
"$SKETCHBOOK_DIR/libraries/Strata"
- name: Build examples (${{ matrix.board.name }})
env:
FQBN: ${{ matrix.board.fqbn }}
run: |
set -e
for sketch in examples/*; do
arduino-cli compile \
--fqbn "$FQBN" \
--build-property "compiler.cpp.extra_flags=-std=gnu++20" \
"$sketch"
done
- name: Clean Arduino CLI temporary state
if: always()
run: |
rm -rf "${ARDUINO_DIRECTORIES_DATA}" \
"${ARDUINO_DIRECTORIES_DOWNLOADS}" \
"${ARDUINO_DIRECTORIES_USER}"

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [metadata, clang-format, source-audit, host-tests, build-examples]
needs: [metadata, clang-format, source-audit, host-tests, build-examples, arduino-cli]
runs-on: [self-hosted, zekstack-ci]
permissions:
contents: write
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to Lingo are documented in this file.

## 0.2.0

- Add Strata v0.1.2 as Lingo's memory ownership dependency.
- Replace `LingoConfig::preferPsram` with the shared `Strata::MemoryPolicy` configuration contract.
- Preserve the v0.1.x default registry behavior with `memory.allocation = Strata::Placement::PreferExternal`.
- Route the bounded translation-table registry through Strata typed allocation and `Strata::free()`.
- Add explicit `Default`, `Internal`, `PreferExternal`, and `RequireExternal` placement support.
- Add `LingoDiag` with requested registry placement and observed registry region.
- Validate Strata memory policies during `init()` and continue returning `LingoStatus::AllocationFailed` for unsatisfied allocations.
- Remove the bespoke ESP-IDF heap allocator, PSRAM test stubs, and direct `heap_caps_*` dependency.
- Add CI source contracts preventing direct heap allocation paths from returning to Lingo-owned code.
- Add host memory-policy coverage and Arduino CLI builds alongside the existing PlatformIO ESP32 matrix.

### Migration from 0.1.x

```cpp
// 0.1.x
config.preferPsram = false;

// 0.2.0
config.memory.allocation = Strata::Placement::Internal;
```

The former default `preferPsram = true` maps to `Strata::Placement::PreferExternal` and remains the Lingo default in v0.2.0.

## 0.1.0

- Add strongly typed enum-key translation domains without RTTI.
Expand Down
Loading
Loading