Files
moonmix/.gitea/workflows/ci.yaml
T
SpriteandClaude Opus 5.5 74d85ecdfc
CI / check (pull_request) Successful in 10s
CI / native (pull_request) Successful in 1m18s
Follow the desktop accent colour and colour scheme (XDG portal)
Read org.freedesktop.appearance accent-color and color-scheme from
org.freedesktop.portal.Settings over GDBus in the GTK stub and follow
SettingChanged. The accent recolours the selected tab, sliders, peak
meters and the checked Default button through an application-priority
GtkCssProvider (named colours and --accent-* variables too, for themes
that use them); the colour scheme sets the theme's dark/light variant.
Without a portal or accent the theme's own stays.

Colour conversion, WCAG contrast (readable foreground on the accent,
readable accent text on the window) and the CSS live in model/accent.mbt
with unit tests. The smoke test runs a fake portal on a private session
bus, switches the accent live from green to orange and renders the tabs
again (docs/screenshots/accent-*.png).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:28:19 +00:00

78 lines
2.7 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
# Pure MoonBit: type-check every package and run the model tests.
# Needs no audio/GUI libraries, so it runs on the default runner image
# (node:20-bullseye-like).
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install MoonBit
run: |
curl -fsSL --retry 5 https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
- name: moon check (all packages, no C compilation)
run: |
moon version --all
moon check --target native --deny-warn
moon fmt --check
# Native tests run in the trixie job: linking MoonBit's runtime needs
# -lpthread on bullseye's glibc 2.31.
- name: moon test (pure packages)
run: moon test --target wasm-gc
# Native build + headless smoke test. Debian bullseye (the default runner
# image) has no libwireplumber-0.5 and a too-old GTK4, so this job runs in
# a debian:trixie container (PipeWire 1.4, WirePlumber 0.5, GTK 4.18).
# The container has no Node, so actions/checkout cannot run; clone with git.
native:
runs-on: ubuntu-latest
container:
image: debian:trixie
steps:
- name: Install build and test dependencies
run: |
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
ca-certificates curl git build-essential pkg-config \
libpipewire-0.3-dev libwireplumber-0.5-dev libgtk-4-dev \
pipewire pipewire-bin wireplumber libgtk-4-bin \
adwaita-icon-theme fonts-dejavu-core \
dbus-daemon python3-gi gir1.2-glib-2.0
- name: Checkout
env:
TOKEN: ${{ github.token }}
run: |
git init -q .
git -c http.extraHeader="Authorization: token $TOKEN" \
fetch -q --depth 1 "${{ github.server_url }}/${{ github.repository }}.git" "${{ github.sha }}"
git checkout -q FETCH_HEAD
- name: Install MoonBit
run: |
curl -fsSL --retry 5 https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
- name: Build (native, links PipeWire/WirePlumber/GTK4)
run: |
moon test --target native -p model
moon build --target native
ldd _build/native/debug/build/cmd/moonmix/moonmix.exe | grep -E 'wireplumber|pipewire|gtk-4'
- name: Smoke test (private PipeWire + WirePlumber, broadway screenshots)
run: |
mkdir -p screenshots
tools/smoke-test.sh "$PWD/screenshots/moonmix"
ls -l screenshots