build: Melos, a Dart check and every path for the single repository

- Melos 8.9 as the root's dev dependency, with scripts across the
  workspace (analyze, test:dart, test:flutter, generate, check) and its
  filters (--diff, --include-dependents); cli_util overridden to 0.5.2
  for it, since Learn's flutter_launcher_icons asks for 0.4 and uses only
  its logger, unchanged in 0.5.
- tool/check.dart in place of tool/check.sh: packages, formatting of our
  own files, analysis, the tools' tests, then every package's tests
  through Melos (--changed-since=<commit> for only what changed and what
  depends on it). tool/pre-push is the hook: the signature check, then
  the checks. CI generates every server's code and runs the same check.
- The images build from the root with a workspace narrowed to what they
  need (tool/workspace_only.sh); compose, the deploy's migration test,
  the snap, the release script, the editor's launch files and Learn's
  asset tools (run from apps/learn) follow the new layout.
- The project's source is named as project-halkyon/halkyon (source link,
  snap, F-Droid listing, release uploads); the AGPL packages carry the
  licence's own text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-19 20:39:09 +02:00
commit af1dbee509
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1,5 +1,5 @@
# CI: every push of a branch runs the checks of the pre-push hook (tool/check.sh); a push to main is
# then deployed to learn.halkyon.eu (deploy/redeploy.sh; paused until 22 Oct 2026, see the deploy
# CI: every push of a branch runs the checks of the pre-push hook (tool/check.dart, every app's and
# shared package's); a push to main is then deployed to learn.halkyon.eu (deploy/redeploy.sh; paused until 22 Oct 2026, see the deploy
# job). Both jobs run on the runner on learn.halkyon.eu's server, directly on the host as an
# unprivileged user (deploy/runner/). A commit that passed the checks before isn't checked again
# (see "Checked before?").
@ -24,8 +24,8 @@ jobs:
env:
# The Flutter the app is developed with; move it together with the local one.
FLUTTER_VERSION: 3.47.5
# The Serverpod CLI, for the generated-code check: the server's Serverpod version
# (the root pubspec's overrides); move it together with them.
# The Serverpod CLI, for the generated-code check: the servers' Serverpod version
# (every package pins it); move it together with them.
SERVERPOD_VERSION: 4.0.4
steps:
# Before anything else runs, the job proves it can neither see nor reach production
@ -103,9 +103,10 @@ jobs:
if: env.CHECKED_BEFORE != 'true'
run: flutter pub get --enforce-lockfile || flutter pub get --enforce-lockfile
# The generated code (the server's lib/src/generated, the client package) is
# The generated code (each server's lib/src/generated, its client package) is
# committed, so it has to be exactly what the generator makes of the models and
# endpoints: a model changed without regenerating fails here.
# endpoints: a model changed without regenerating fails here. Every server package,
# the apps' and the shared module, through Melos' `generate` script.
- name: Generated code
if: env.CHECKED_BEFORE != 'true'
run: |
@ -113,7 +114,7 @@ jobs:
if ! "$bin/serverpod" --no-analytics version 2>/dev/null | grep -qx "Serverpod version: $SERVERPOD_VERSION"; then
dart install "serverpod_cli@$SERVERPOD_VERSION"
fi
(cd halkyon_learn_server && "$bin/serverpod" --no-analytics generate)
PATH="$bin:$PATH" dart run melos run generate
if [ -n "$(git status --porcelain)" ]; then
git status --short
echo 'The generated code differs from what the generator makes now: run `serverpod generate` and commit.' >&2
@ -136,7 +137,7 @@ jobs:
- name: Checks
if: env.CHECKED_BEFORE != 'true'
run: tool/check.sh
run: dart run tool/check.dart
# Reached only when every step above passed. Marks older than 90 days go.
- name: Remember the commit