Merge Luma launcher fork into monorepo
Move trampoline files (boot-hook, watcher, overlay) into trampoline/ subdirectory. Add upstream Luma v2.3.1 source at repo root with our additions: - Page::Ha (4th nav tab) with placeholder empty state - HA tab config schema and default entity mapping (ha-home/) - Nav keys renamed: "home" → "start", new "ha" tab between Apps and Settings - All state.rs/view.rs/main.rs/tests.rs updated for 4-tab navigation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
bc3ca0f3b9
commit
cbea5a322f
204 files changed
+25056
-65
No files matched your search
@@ -0,0 +1,58 @@
|
||||
name: Changeset PR Status
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, edited, ready_for_review]
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
status:
|
||||
name: Changeset status
|
||||
if: github.head_ref != 'changeset-release/main' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
comment-body: ${{ steps.status.outputs.comment-body }}
|
||||
steps:
|
||||
# Read the PR with the bundled Changesets action, without running PR code or installing dependencies.
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.base.sha }}
|
||||
- name: Generate changeset status
|
||||
id: status
|
||||
uses: changesets/action/pr-status@v2
|
||||
|
||||
comment:
|
||||
name: Update changeset comment
|
||||
needs: status
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Create or update the PR comment
|
||||
uses: changesets/action/pr-comment@v2
|
||||
with:
|
||||
update-id: luma-changeset-status
|
||||
body: |
|
||||
${{ needs.status.outputs.comment-body }}
|
||||
|
||||
---
|
||||
|
||||
**For code or behavior changes:** run `pnpm changeset`, select `lg-luma`, and commit the generated `.changeset/*.md` file with this PR.
|
||||
|
||||
Choose the semantic version bump that matches the change:
|
||||
- **patch** for backward-compatible bug fixes.
|
||||
- **minor** for backward-compatible features.
|
||||
- **major** for breaking changes.
|
||||
|
||||
A PR without a release changeset does not request an app version bump. Documentation-only or maintenance changes that do not need a release can omit it.
|
||||
|
||||
This comment is informational. Releases are queued in the Version Packages PR and publish only after that PR is merged and CI passes.
|
||||
@@ -0,0 +1,162 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
release-gate:
|
||||
name: Identify a merged version PR
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
outputs:
|
||||
publish: ${{ steps.gate.outputs.result }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: Require a merged Changesets PR and a version increase
|
||||
id: gate
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const { isReleaseMerge } = await import(`${process.env.GITHUB_WORKSPACE}/tools/release-gate.mjs`);
|
||||
return isReleaseMerge({ github, context });
|
||||
|
||||
build:
|
||||
name: Rust checks, rendering, and native package
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
outputs:
|
||||
tag: ${{ steps.package.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- uses: dtolnay/rust-toolchain@1.93.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
targets: armv7-unknown-linux-gnueabi
|
||||
- name: Cache Rust dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: webos-${{ hashFiles('tools/build-webos.sh', 'tools/setup-webos-sdk.mjs', 'tools/webos-runtime.mjs') }}
|
||||
- name: Install desktop and asset dependencies
|
||||
run: |
|
||||
apt_options=(-o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30)
|
||||
sudo apt-get "${apt_options[@]}" update
|
||||
# FontTools recommends large optional scientific Python packages. xauth is needed by xvfb-run.
|
||||
sudo apt-get "${apt_options[@]}" install -y --no-install-recommends \
|
||||
libsdl2-dev pkg-config woff2 python3-fonttools libgl1-mesa-dri xvfb xauth
|
||||
- name: Check formatting
|
||||
run: pnpm format:check
|
||||
- name: Lint Rust and packaging tools
|
||||
run: pnpm check
|
||||
- name: Run unit tests
|
||||
run: pnpm test
|
||||
- name: Generate native assets
|
||||
run: pnpm assets
|
||||
- name: Exercise desktop rendering and mocked weather
|
||||
env:
|
||||
LIBGL_ALWAYS_SOFTWARE: '1'
|
||||
run: xvfb-run -a -s '-screen 0 1920x1080x24' pnpm test:smoke
|
||||
- name: Set up the webOS SDK
|
||||
run: pnpm sdk
|
||||
- name: Cross-build and verify the native IPK and Homebrew feed
|
||||
id: package
|
||||
run: |
|
||||
export WEBOS_NDK="$GITHUB_WORKSPACE/.build/toolchain/arm-webos-linux-gnueabi_sdk-buildroot"
|
||||
pnpm build
|
||||
node tools/package.mjs
|
||||
node tools/repository.mjs
|
||||
- name: Upload release files
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: luma-release
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
dist/*.ipk
|
||||
dist/sha256sums
|
||||
dist/repo.json
|
||||
dist/description.html
|
||||
dist/app-icon-large.png
|
||||
- name: Upload native rendering diagnostics
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: native-rendering
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
include-hidden-files: true
|
||||
path: |
|
||||
.build/*.png
|
||||
.build/*-render.json
|
||||
|
||||
release:
|
||||
name: Publish release and Homebrew feed
|
||||
if: needs.release-gate.outputs.publish == 'true'
|
||||
needs: [build, release-gate]
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: luma-release
|
||||
path: release
|
||||
- name: Publish tested release files
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
RELEASE_TAG: ${{ needs.build.outputs.tag }}
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
printf 'Invalid release version: %s\n' "$RELEASE_TAG" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
state="$(gh api --paginate "repos/$GH_REPO/releases?per_page=100" \
|
||||
--jq ".[] | select(.tag_name == \"$RELEASE_TAG\") | .draft")"
|
||||
if [ "$state" = false ]; then
|
||||
printf 'Release %s is already published; skipping.\n' "$RELEASE_TAG"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
existing_tag="$(gh api "repos/$GH_REPO/git/matching-refs/tags/$RELEASE_TAG" \
|
||||
--jq ".[] | select(.ref == \"refs/tags/$RELEASE_TAG\") | .ref")"
|
||||
if [ -n "$existing_tag" ]; then
|
||||
tagged_commit="$(gh api "repos/$GH_REPO/commits/$RELEASE_TAG" --jq '.sha')"
|
||||
if [ "$tagged_commit" != "$COMMIT_SHA" ]; then
|
||||
printf 'Tag %s points to another commit; use a new app version.\n' "$RELEASE_TAG" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
files=(release/*.ipk release/sha256sums release/repo.json release/description.html release/app-icon-large.png)
|
||||
if [ "$state" = true ]; then
|
||||
gh release upload "$RELEASE_TAG" "${files[@]}" --clobber
|
||||
gh release edit "$RELEASE_TAG" --draft=false
|
||||
else
|
||||
gh release create "$RELEASE_TAG" "${files[@]}" \
|
||||
--target "$COMMIT_SHA" \
|
||||
--generate-notes \
|
||||
--title "Luma ${RELEASE_TAG#v}"
|
||||
fi
|
||||
@@ -0,0 +1,78 @@
|
||||
name: Release PR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
version:
|
||||
name: Maintain Version Packages PR
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Create or update the version PR
|
||||
id: changesets
|
||||
uses: changesets/action@v2
|
||||
with:
|
||||
version-script: pnpm version:release
|
||||
pr-title: Version Packages
|
||||
commit-message: Version Packages
|
||||
create-github-releases: false
|
||||
push-git-tags: false
|
||||
- name: Describe the release and run its CI checks
|
||||
if: steps.changesets.outputs.pr-number != ''
|
||||
uses: actions/github-script@v8
|
||||
env:
|
||||
RELEASE_PR_NUMBER: ${{ steps.changesets.outputs.pr-number }}
|
||||
with:
|
||||
script: |
|
||||
const pull_number = Number(process.env.RELEASE_PR_NUMBER);
|
||||
const { data: pull } = await github.rest.pulls.get({ ...context.repo, pull_number });
|
||||
const { data: file } = await github.rest.repos.getContent({
|
||||
...context.repo,
|
||||
path: 'package.json',
|
||||
ref: pull.head.sha,
|
||||
});
|
||||
const { version } = JSON.parse(Buffer.from(file.content, 'base64').toString('utf8'));
|
||||
await github.rest.pulls.update({
|
||||
...context.repo,
|
||||
pull_number,
|
||||
body: [
|
||||
'## Problem',
|
||||
'',
|
||||
'Merged changes are waiting for a coordinated app release.',
|
||||
'',
|
||||
'## Solution',
|
||||
'',
|
||||
`Release Luma **${version}** with the accumulated Changesets changelog.`,
|
||||
'',
|
||||
'Synchronize package.json, appinfo.json, the root Cargo.toml, Cargo.lock and the README IPK examples.',
|
||||
'Merging this PR into main publishes the verified IPK and Homebrew feed after CI passes.',
|
||||
].join('\n'),
|
||||
});
|
||||
// GITHUB_TOKEN-created PRs do not trigger pull_request workflows.
|
||||
// workflow_dispatch is explicitly allowed and checks the version branch's head commit.
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
...context.repo,
|
||||
workflow_id: 'ci.yml',
|
||||
ref: pull.head.ref,
|
||||
});
|
||||
Reference in new issue
Block a user