Browse Source

Add make and CI rules for building apps .mpy files

Signed-off-by: Francesco Gazzetta <[email protected]>
peter
Francesco Gazzetta 8 months ago committed by Daniel Thompson
parent
commit
01c173927e
  1. 13
      .github/workflows/main.yml
  2. 11
      Makefile

13
.github/workflows/main.yml

@ -60,6 +60,12 @@ jobs:
make -j `nproc` VERSION=${{ github.sha }} dist
mv ../wasp-os-${{ github.sha }}.tar.gz .
- name: Build extra apps
id: apps
run: |
export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin
make -j `nproc` apps
- name: Upload full binary distribution
id: upload-binaries
uses: actions/[email protected]
@ -87,3 +93,10 @@ jobs:
with:
name: k9-${{ github.sha }}
path: build-k9
- name: Upload extra apps binaries
id: upload-apps
uses: actions/[email protected]
with:
name: apps-${{ github.sha }}
path: apps/*.mpy

11
Makefile

@ -58,8 +58,10 @@ wasp/boards/$(BOARD_SAFE)/watch.py : wasp/boards/$(BOARD_SAFE)/watch.py.in
(cd wasp; ../tools/preprocess.py boards/$(BOARD)/watch.py.in > boards/$(BOARD)/watch.py) \
|| ($(RM) wasp/boards/$(BOARD)/watch.py; false)
micropython: build-$(BOARD_SAFE) wasp/boards/$(BOARD_SAFE)/watch.py
micropython/mpy-cross/mpy-cross:
$(MAKE) -C micropython/mpy-cross
micropython: build-$(BOARD_SAFE) wasp/boards/$(BOARD_SAFE)/watch.py micropython/mpy-cross/mpy-cross
$(RM) micropython/ports/nrf/build-$(BOARD)-s132/frozen_content.c
$(MAKE) -C micropython/ports/nrf \
BOARD=$(BOARD) SD=s132 \
@ -89,6 +91,13 @@ debug:
-ex "attach 1" \
-ex "load"
apps/%.mpy: apps/%.py micropython/mpy-cross/mpy-cross
./micropython/mpy-cross/mpy-cross -mno-unicode -march=armv7m $<
APPS_PY=$(wildcard apps/*.py)
APPS_MPY=$(APPS_PY:%.py=%.mpy)
.PHONY: apps
apps: $(APPS_MPY)
docs:
$(RM) -rf docs/build/html/*
$(MAKE) -C docs html

Loading…
Cancel
Save