Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Building, Testing, Running, and Releasing

Setup

Follow the instructions in Development Environment to set up the required tools.

Make a clone of the repository:

git clone git@github.com:empriselab/mote.git

or

git clone https://github.com/empriselab/mote.git

Build

Compile source and generate executable artifacts.

# Build Mote's firmware
task firmware:build 
# Build the configuration webpage
task config:build 
# Build the book
task book:build 

Test

Run unit tests.

# Run api test cases
task api:test
# Run ffi test cases
task ffi:test
# Test code examples in the book
task book:test

Run

Run a target.

Running firmware requires connecting to Mote using a SWD debug probe.

# Deploy firmware to Mote (first time doing so)
task firmware:provision
# Deploy firmware to Mote (any time after)
task firmware:deploy
# Serve the configuration page
task config:run-dev
# Serve / open the book
task book:open

Release

Release artifacts are built and uploaded automatically via continuous integration.

  • mote-firmware
    • Released on any tag to mote-core matching the pattern mote-firmware-vX.X.X, where vX.X.X matches the semantic version of the mote-firmware crate.
    • Automated via this GitHub Action.
  • mote-c
    • Released on any tag to mote-core matching the pattern mote-c-vX.X.X, where vX.X.X matches the semantic version of the mote-ffi crate.
    • The static library, header, and schemas are attached to the release via this GitHub Action.
  • mote-python
    • Released on any tag to mote-core matching the pattern mote-python-vX.X.X, where vX.X.X matches the version in mote-ffi/pyproject.toml.
    • Cross-platform wheels are built and published to PyPI via this GitHub Action.
  • mote-rust (the mote-api crate)
    • Released on any tag to mote-core matching the pattern mote-rust-vX.X.X, where vX.X.X matches the semantic version of the mote-api crate.
    • The crate is published to crates.io via this GitHub Action.
  • mote-configuration
    • Released on any tag to mote-core matching the pattern mote-configuration-vX.X.X, where vX.X.X matches the version in mote-configuration/package.json.
    • The built site is attached to the release via this GitHub Action.
  • mote-book
    • Built and deployed to GitHub pages on every commit to main via the GitHub Action.