From 85f1ecabd7f58f306b2a042376209ac8cf49ab9b Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 21:10:37 +0200 Subject: build: complete the Docker pipeline for build, test, screenshots and packaging - Container scripts now run from the mounted project (no image rebuild per script change): build-app.sh (strict -l 3, warnings fail), run-unit-tests.sh, screenshots.sh, app-diag.sh (perf/memory), lint.sh, package.sh and sim-vnc.sh (noVNC on 127.0.0.1:6080). - Headless simulator helpers: wait for port 1234, remove the stale single-instance lock (~/Sim-dev) that made later starts hang, show the simulator log on failure. - New targets: screenshots-approve, icons; `make lock` re-adds the requirements header; pytest treats warnings as errors. - Author/Summary headers on every build file. Co-Authored-By: Claude Opus 5.5 --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 29b7702..d53b836 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# Author: cirakg & claude ai +# Summary: Host entry point: every build, test, packaging and docs step runs inside Docker. +# # OTP Wallet for Connect IQ: host Makefile. # # Every target runs inside Docker; the host needs only Docker and make @@ -66,7 +69,7 @@ DOCS_RUN = $(DOCKER) run --rm --init --label project=$(PROJECT) \ --read-only --tmpfs /tmp:rw,exec,nosuid,size=1g --shm-size 512m \ -v "$(ROOT)":/work -w /work --network none $(DOCS_IMAGE) -.PHONY: help image docs-image sdk key build test test-tools sim screenshots perf memtest \ +.PHONY: help image docs-image sdk key build test test-tools sim screenshots screenshots-approve perf memtest icons \ lint package docs ci shell clean nuke lock products \ check-docker dirs need-image need-docs-image @@ -103,7 +106,10 @@ lock: check-docker ## Regenerate the Python and npm lock files (network) pip install --quiet --user uv==$(UV_VERSION) && \ /tmp/.local/bin/uv pip compile requirements.in --generate-hashes --no-build \ --python-version 3.10 --python-platform x86_64-manylinux_2_35 \ - --exclude-newer $(LOCK_CUTOFF) --no-header --quiet -o requirements.txt' + --exclude-newer $(LOCK_CUTOFF) --no-header --quiet -o requirements.txt && \ + { printf "%s\\n" "# Author: cirakg & claude ai" \ + "# Summary: Pinned, hash-checked Python tool dependencies of the dev image (generated by \`make lock\`)."; \ + cat requirements.txt; } > requirements.tmp && mv requirements.tmp requirements.txt' $(DOCKER) run --rm --label project=$(PROJECT) --user $(HOST_UID):$(HOST_GID) -e HOME=/tmp \ -e npm_config_cache=/tmp/.npm -v "$(ROOT)/docker/docs":/w -w /w $(NODE_IMAGE) sh -c '\ npm install --package-lock-only --ignore-scripts --no-audit --no-fund \ @@ -124,6 +130,10 @@ package: dirs need-image ## Signed .iq for the Store beta + per-device release . products: dirs need-image ## Check manifest products against the downloaded device files $(DEV_OFFLINE) python3 tools/gen_products.py --check +icons: dirs need-image ## Regenerate the launcher icons for every product (after changing manifest.xml) + $(DEV_OFFLINE) sh -c 'python3 tools/make_icon.py --all --devices /home/dev/.Garmin/ConnectIQ/Devices && \ + python3 tools/make_icon.py --size 60 --out resources/drawables/launcher_icon.png' + shell: dirs need-image ## Interactive shell in the dev container (no network) $(DOCKER) run -it $(RUN_FLAGS) --network none $(DEV_IMAGE) bash @@ -135,9 +145,12 @@ test: test-tools ## Python tool tests + Monkey C unit tests on TEST_DEVICES (hea test-tools: dirs need-image $(DEV_OFFLINE) python3 -m pytest -q tools/tests -screenshots: dirs need-image ## Screenshot the app on TEST_DEVICES into build/screenshots +screenshots: dirs need-image ## Screenshot the app on TEST_DEVICES and compare with test/golden $(DEV_OFFLINE) screenshots.sh $(TEST_DEVICES) +screenshots-approve: dirs need-image ## Save the current screens as the new golden images (review them first!) + $(DOCKER) run $(RUN_FLAGS) -e APPROVE=1 --network none $(DEV_IMAGE) screenshots.sh $(TEST_DEVICES) + perf: dirs need-image ## Start-up time on TEST_DEVICES against tools/budgets.json $(DEV_OFFLINE) app-diag.sh perf $(TEST_DEVICES) -- cgit v1.2.3