Add a standalone Android app with the same daily reading and config page
build / build (push) Successful in 4m8s
build / build (push) Successful in 4m8s
android/ links engine/src/ and interpreter/src/ via JNI/CMake (real astronomy.c, not the watch's size-constrained substitute), rendering through Jetpack Compose with a burger-menu config page mirroring WatchConfig and a WorkManager-driven daily notification. Independent of the watch app - neither requires the other. build-image now bundles the Android SDK/NDK alongside the Pebble SDK (VERSION bumped to 2), and .gitea/workflows/build.yml/Makefile/ run-image.sh build and publish the APK the same way as the CLI tarball and .pbw.
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
name: build
|
||||
|
||||
# Build a versioned Linux CLI release tarball (see `make package`) and the
|
||||
# Pebble watchapp (see `make watchapp`) on every push/PR, plus on-demand
|
||||
# via the Gitea "Run workflow" button. Runs inside build-image (see
|
||||
# ../../build-image/Dockerfile, built/pushed via ../../build-image.sh and
|
||||
# ../../upload-image.sh), which bundles the Pebble SDK alongside the C
|
||||
# toolchain.
|
||||
# Build a versioned Linux CLI release tarball (see `make package`), the
|
||||
# Pebble watchapp (see `make watchapp`), and the Android app (see `make
|
||||
# android`) on every push/PR, plus on-demand via the Gitea "Run workflow"
|
||||
# button. Runs inside build-image (see ../../build-image/Dockerfile,
|
||||
# built/pushed via ../../build-image.sh and ../../upload-image.sh), which
|
||||
# bundles the Pebble SDK and the Android SDK/NDK alongside the C
|
||||
# toolchain. Unlike the CLI/Pebble build path, the Android build still
|
||||
# needs network access at job runtime (Gradle/AGP/androidx dependency
|
||||
# resolution) - see the root CLAUDE.md's Android section.
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
@@ -41,6 +44,9 @@ jobs:
|
||||
command -v cc >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: no C compiler (cc) in PATH" >&2; exit 1; }
|
||||
command -v make >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: make not in PATH" >&2; exit 1; }
|
||||
command -v pebble >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: pebble not in PATH" >&2; exit 1; }
|
||||
command -v java >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: java not in PATH" >&2; exit 1; }
|
||||
[ -n "${ANDROID_HOME:-}" ] || { echo "PREFLIGHT FAIL: ANDROID_HOME not set" >&2; exit 1; }
|
||||
[ -n "${ANDROID_NDK_HOME:-}" ] || { echo "PREFLIGHT FAIL: ANDROID_NDK_HOME not set" >&2; exit 1; }
|
||||
|
||||
- name: Build and test
|
||||
run: |
|
||||
@@ -48,6 +54,7 @@ jobs:
|
||||
make test
|
||||
make package
|
||||
make watchapp
|
||||
make android
|
||||
|
||||
- name: Upload build artifact
|
||||
# v4 uses the newer @actions/artifact backend, which this Gitea
|
||||
@@ -63,8 +70,14 @@ jobs:
|
||||
name: deck-in-a-dash-watchapp
|
||||
path: dist/deck-in-a-dash-*.pbw
|
||||
|
||||
- name: Upload android artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: deck-in-a-dash-android
|
||||
path: dist/deck-in-a-dash-*.apk
|
||||
|
||||
- name: Publish to dl.ladkau.de
|
||||
# Uploads the tarball and .pbw over SFTP instead of using
|
||||
# Uploads the tarball, .pbw, and .apk over SFTP instead of using
|
||||
# actions/upload-artifact (whose zip wrapping can't be disabled).
|
||||
# Only runs on push so PR builds don't publish.
|
||||
if: gitea.event_name == 'push'
|
||||
@@ -72,6 +85,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
TARBALL="$(ls dist/deck-in-a-dash-*-linux-*.tar.gz)"
|
||||
PBW="$(ls dist/deck-in-a-dash-*.pbw)"
|
||||
APK="$(ls dist/deck-in-a-dash-*.apk)"
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DL_SFTP_KEY }}" > ~/.ssh/dl_sftp_key
|
||||
chmod 600 ~/.ssh/dl_sftp_key
|
||||
@@ -81,4 +95,5 @@ jobs:
|
||||
-mkdir files/deck-in-a-dash
|
||||
put $TARBALL files/deck-in-a-dash/$(basename "$TARBALL")
|
||||
put $PBW files/deck-in-a-dash/$(basename "$PBW")
|
||||
put $APK files/deck-in-a-dash/$(basename "$APK")
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user