split ble services into a separate module #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
# Run on the main branch | |
branches: | |
- main | |
# Releases are tags named 'v<version>', and must have the "major.minor.micro", for example: "0.1.0". | |
# Release candidates are tagged as `v<version>-rc<num>`, for example: "0.1.0-rc1". | |
tags: | |
- "v*" | |
# Also on PRs, just be careful not to publish anything | |
pull_request: | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
for p in firmware/boot firmware/app pinetime-flash watchful-ui; do | |
pushd $p; | |
cargo build --release; | |
popd; | |
done | |
publish: | |
runs-on: ubuntu-22.04 | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install prerequisites | |
run: | | |
pip3 install adafruit-nrfutil | |
cargo install cargo-binutils | |
- name: Build release artifacts | |
run: | | |
cd firmware/app | |
cargo build --release | |
cargo objcopy --release -- -O binary watchful.bin | |
cargo objcopy --release -- -O ihex watchful.hex | |
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application watchful.bin watchful-dfu.zip | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: watchful.bin | |
path: firmware/app/watchful.bin | |
- name: Upload HEX | |
uses: actions/upload-artifact@v3 | |
with: | |
name: watchful.hex | |
path: firmware/app/watchful.hex | |
- name: Upload DFU bundle | |
uses: actions/upload-artifact@v3 | |
with: | |
name: watchful-dfu.zip | |
path: firmware/app/watchful-dfu.zip |