include glyph sdk to release build
tests / backend (push) Successful in 37s
tests / desktop (push) Successful in 21s
lint / ruff (push) Successful in 1m0s
tests / web (push) Successful in 32s
docker / image (push) Failing after 1m34s
tests / android-core (push) Successful in 7m13s
android / apk (push) Successful in 12m36s

This commit is contained in:
timka123 committed 2026-10-22 19:25:44 +03:00
1 parent 8c260feb78
commit 2aaa58af0b
3 files changed
+37 -21

No files matched your search

+11 -4
View File
@@ -4,10 +4,10 @@
# unit tests run — `:core`'s suite is in `tests.yml`, where no SDK is needed # unit tests run — `:core`'s suite is in `tests.yml`, where no SDK is needed
# because `settings.gradle.kts` leaves `:app` out when there is none. # because `settings.gradle.kts` leaves `:app` out when there is none.
# #
# The Glyph Matrix AAR is deliberately *not* fetched: its licence forbids # The Glyph Matrix AAR is not committed (its licence forbids redistribution), so
# redistribution, and `app/build.gradle.kts` compiles the `noglyph` source set # the job runs `android/fetch-glyph-sdk.sh` to download it from Nothing before
# without it. A CI APK therefore has an inert rear display, which is also exactly # Gradle configures the app. That means the APK this produces really has the
# right for any phone that is not a Nothing. # rear-display implementation compiled in, rather than the no-op fallback.
name: android name: android
on: on:
@@ -32,6 +32,13 @@ jobs:
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
openjdk-21-jdk-headless curl unzip >/dev/null openjdk-21-jdk-headless curl unzip >/dev/null
# The AAR is git-ignored but required for a Glyph-enabled build. The
# script exits non-zero if the download is not a real archive, so a vendor
# URL that moves fails the job instead of quietly producing a no-op APK.
- name: Fetch the Glyph Matrix SDK
working-directory: android
run: ./fetch-glyph-sdk.sh
# Keyed on the pinned SDK versions, so this is a download once and a # Keyed on the pinned SDK versions, so this is a download once and a
# restore every time after. # restore every time after.
- uses: actions/cache@v4 - uses: actions/cache@v4
+18 -12
View File
@@ -15,13 +15,14 @@ on:
branches: [master] branches: [master]
tags: ["v*"] tags: ["v*"]
# The built-in job token is enough to push to this instance's own registry; a # The built-in job token (`secrets.GITEA_TOKEN`) **cannot** publish packages on
# REGISTRY_TOKEN secret is only needed when it is not (an older Gitea, or a # Gitea — `permissions:` has no effect on container pushes, and the job token is
# restricted default permission mode). Ask for packages: write explicitly so the # read-only there by design. Publishing therefore needs a personal access token
# token is not silently read-only on instances that default to restricted. # with `package:write`, stored as REGISTRY_TOKEN. Without it the image is still
# built and smoke-tested, but not pushed; that keeps the build honest without
# failing every push on a repository that has not minted a token yet.
permissions: permissions:
contents: read contents: read
packages: write
env: env:
REGISTRY: git.timka.su REGISTRY: git.timka.su
@@ -37,23 +38,27 @@ jobs:
run: docker version run: docker version
- name: Log in to the Gitea registry - name: Log in to the Gitea registry
id: login
env: env:
# The username is only needed to pair with the token. Default it to the # The username is only needed to pair with the token. Default it to the
# repository owner — the same account the image namespace belongs to — # repository owner — the same account the image namespace belongs to —
# so a missing REGISTRY_USER secret does not fail the job with docker's # so a missing REGISTRY_USER secret does not fail the job with docker's
# unhelpful "username is empty". # unhelpful "username is empty".
REGISTRY_USER: ${{ secrets.REGISTRY_USER || github.repository_owner }} REGISTRY_USER: ${{ secrets.REGISTRY_USER || github.repository_owner }}
# Gitea gives every job a built-in token (secrets.GITEA_TOKEN). Prefer # A personal access token with `package:write`. The built-in job token
# an explicit secret, but fall back to that token so a fresh repository # is not usable here: Gitea's job token is read-only for packages (its
# publishes without anyone having to mint one by hand. # `permissions:` support does not cover the container registry yet),
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN || secrets.GITEA_TOKEN }} # so falling back to it only produces a confusing 401.
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: | run: |
if [ -z "$REGISTRY_USER" ] || [ -z "$REGISTRY_TOKEN" ]; then if [ -z "$REGISTRY_USER" ] || [ -z "$REGISTRY_TOKEN" ]; then
echo "::error::Container registry credentials are missing. Set REGISTRY_TOKEN (a token with package:write) under Settings → Actions → Secrets; REGISTRY_USER is optional and defaults to the repository owner." echo "::warning::No REGISTRY_TOKEN (a personal access token with package:write) — the image will be built and smoke-tested but not pushed. Add it under Settings → Actions → Secrets to publish."
exit 1 echo "push=false" >> "$GITHUB_OUTPUT"
exit 0
fi fi
printf '%s' "$REGISTRY_TOKEN" \ printf '%s' "$REGISTRY_TOKEN" \
| docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
echo "push=true" >> "$GITHUB_OUTPUT"
- name: Build - name: Build
run: | run: |
@@ -80,12 +85,13 @@ jobs:
docker rm -f kadence-smoke docker rm -f kadence-smoke
- name: Push - name: Push
if: steps.login.outputs.push == 'true'
run: | run: |
docker push "$IMAGE:$SHORT" docker push "$IMAGE:$SHORT"
docker push "$IMAGE:latest" docker push "$IMAGE:latest"
- name: Push the tag, when there is one - name: Push the tag, when there is one
if: startsWith(github.ref, 'refs/tags/v') if: steps.login.outputs.push == 'true' && startsWith(github.ref, 'refs/tags/v')
run: | run: |
VERSION="${GITHUB_REF#refs/tags/}" VERSION="${GITHUB_REF#refs/tags/}"
docker tag "$IMAGE:$SHORT" "$IMAGE:$VERSION" docker tag "$IMAGE:$SHORT" "$IMAGE:$VERSION"
+8 -5
View File
@@ -299,7 +299,7 @@ Secrets, all under *Repository → Settings → Actions → Secrets*:
| Secret | For | | Secret | For |
| --- | --- | | --- | --- |
| `REGISTRY_TOKEN` | only when the built-in `GITEA_TOKEN` cannot push to the Gitea registry (older Gitea, or restricted token permissions); `package:write` is needed. `REGISTRY_USER` is optional and defaults to the repository owner | | `REGISTRY_TOKEN` | publishing the image: **a personal access token with `package:write`**. Gitea's built-in `GITEA_TOKEN` is read-only for packages, so it cannot be used here. `REGISTRY_USER` is optional and defaults to the repository owner. Without this secret the `docker` workflow still builds and smoke-tests the image, but skips the push |
| `KADENCE_KEYSTORE_BASE64` | `base64 -w0 your.keystore` | | `KADENCE_KEYSTORE_BASE64` | `base64 -w0 your.keystore` |
| `KADENCE_KEYSTORE_PASSWORD`, `KADENCE_KEY_ALIAS`, `KADENCE_KEY_PASSWORD` | the key inside it | | `KADENCE_KEYSTORE_PASSWORD`, `KADENCE_KEY_ALIAS`, `KADENCE_KEY_PASSWORD` | the key inside it |
@@ -310,10 +310,13 @@ secret **fail the build**: the Gradle config otherwise falls back to the debug k
without a word, and a debug-signed "release" installs happily and can then never without a word, and a debug-signed "release" installs happily and can then never
be upgraded by a properly signed one. be upgraded by a properly signed one.
The Glyph Matrix AAR is deliberately not fetched in CI — its licence forbids The Glyph Matrix AAR is not committed — its licence forbids redistribution — so
redistribution, and the build compiles the `noglyph` source set without it, so a the APK job runs `android/fetch-glyph-sdk.sh` before Gradle configures the app,
CI APK has an inert rear display. That is also the correct behaviour on any phone downloading it from Nothing's developer kit. The resulting CI APK therefore
that is not a Nothing. contains the real rear-display implementation; the `noglyph` no-op fallback is
only used for local builds where the AAR has not been fetched. Because the
licence forbids redistribution, the downloaded AAR stays out of the artifacts:
only the finished APK is uploaded.
--- ---