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
82 changes: 61 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,64 @@ concurrency:

jobs:
build-and-test:
name: ${{ matrix.compiler }} / ${{ matrix.build_type }}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- compiler: GCC
- name: Core / GCC / Release
cc: gcc
cxx: g++
build_type: Release
- compiler: Clang
extended: 'OFF'
- name: Extended / GCC / Release
cc: gcc
cxx: g++
build_type: Release
extended: 'ON'
- name: Extended / Clang / Debug
cc: clang
cxx: clang++
build_type: Debug
extended: 'ON'
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build

- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DTINYML_BUILD_EXTENDED=${{ matrix.extended }} \
-DTINYML_BUILD_TESTS=ON

- name: Build
run: cmake --build build --parallel 2

- name: Test
run: ctest --test-dir build --output-on-failure --timeout 120

- name: Install package
run: cmake --install build --prefix "$PWD/install"

- name: Downstream package smoke test
run: |
cmake -S tests/install_consumer -B consumer-build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_PREFIX_PATH="$PWD/install"
cmake --build consumer-build --parallel 2
./consumer-build/tinyml_install_consumer

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build-and-test
Expand All @@ -62,31 +84,49 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build

- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --parallel 2

- name: Package
- name: Build and stage core package
run: |
core_dir="tinyml-${{ github.ref_name }}-core-linux-x86_64"
cmake -S . -B build-core -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTINYML_BUILD_EXTENDED=OFF \
-DTINYML_BUILD_TESTS=OFF
cmake --build build-core --parallel 2
cmake --install build-core --prefix "$PWD/$core_dir"
tar -czf "$core_dir.tar.gz" "$core_dir"

- name: Build and stage extended package
run: |
extended_dir="tinyml-${{ github.ref_name }}-extended-linux-x86_64"
cmake -S . -B build-extended -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTINYML_BUILD_EXTENDED=ON \
-DTINYML_BUILD_TESTS=OFF
cmake --build build-extended --parallel 2
cmake --install build-extended --prefix "$PWD/$extended_dir"
tar -czf "$extended_dir.tar.gz" "$extended_dir"

- name: Create checksums
run: sha256sum tinyml-${{ github.ref_name }}-*.tar.gz > SHA256SUMS

- name: Inspect packages
run: |
package_dir="tinyml-${{ github.ref_name }}-linux-x86_64"
mkdir -p "$package_dir/lib" "$package_dir/include"
cp build/libTinyML.a "$package_dir/lib/"
cp -R include/. "$package_dir/include/"
cp README.md LICENSE LICENSE-COMMERCIAL.md LICENSING.md "$package_dir/"
tar -czf "$package_dir.tar.gz" "$package_dir"
tar -tzf "$package_dir.tar.gz" | head -80
cat SHA256SUMS
tar -tzf tinyml-${{ github.ref_name }}-core-linux-x86_64.tar.gz | head -80
tar -tzf tinyml-${{ github.ref_name }}-extended-linux-x86_64.tar.gz | head -80

- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
files: tinyml-${{ github.ref_name }}-linux-x86_64.tar.gz
files: |
tinyml-${{ github.ref_name }}-core-linux-x86_64.tar.gz
tinyml-${{ github.ref_name }}-extended-linux-x86_64.tar.gz
SHA256SUMS
generate_release_notes: true
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Changelog

All notable release-facing changes to tinyML are recorded here.

The stable core follows semantic versioning. Preview and source-only modules are identified in `docs/STABILITY.md`.

## Unreleased

### Added

- Installable `TinyML::Core` and `TinyML::Extended` CMake package targets.
- Component-aware `find_package(TinyML)` support.
- Dependency-free core build mode.
- Generated `<tinyml/version.hpp>` version macros.
- Stable `<tinyml/core.hpp>` and extended `<tinyml/tinyml.hpp>` umbrella headers.
- Downstream install/consume smoke test.
- Explicit API stability policy.

### Changed

- Replaced source globbing with explicit, reviewable source lists.
- Made xsimd discovery/fetch conditional on the extended target.
- Made GoogleTest conditional on tests or benchmark builds.
- Made benchmarks, examples and the playground opt-in.
- Replaced global optimization/compiler flags with target-local configuration.
- Release packaging now uses the CMake install graph.
- Core network inputs, targets and weight vectors now reject invalid dimensions with exceptions instead of relying on assertions or unchecked indexing.
- Network bias neurons use a conventional constant value of `1.0`.
- Weight initialization no longer mutates process-global `rand()` state.

### Fixed

- Initialized connection momentum state before the first training update.
- Removed the hard-coded `101.0` divisor and unchecked connection indexing from weight normalization.
- Corrected `Network::updateWeights()` so updates are applied through the destination layer rather than indexing each previous-layer neuron against itself.
- Added exact weight-count validation before replacing model weights.
Loading
Loading