Files
moonmix/.gitea/workflows/ci.yaml
T
nandi 72d767b089
CI / check (push) Successful in 6s
CI / native (push) Successful in 59s
Run CI on Depot Ubuntu 24.04 runners and cancel superseded runs
- Move the check and native jobs from ubuntu-latest to depot-ubuntu-24.04-4
- Keep the native job in a debian:trixie container (Ubuntu 24.04 has only WirePlumber 0.4)
- Add job timeouts: 15 minutes for check, 30 for native
- Cancel in-progress CI runs when a newer run starts on the same ref
- Update the README CI notes to match
2026-11-28 21:50:21 -08:00

81 lines
2.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# Pure MoonBit: type-check every package and run the portable model tests
# directly on the Depot Ubuntu 24.04 runner.
check:
runs-on: depot-ubuntu-24.04-4
timeout-minutes: 15
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
- name: moon test (pure packages)
run: moon test --target wasm-gc
# Native build + headless smoke test. Ubuntu 24.04 (the Depot host image)
# only ships WirePlumber 0.4, 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: depot-ubuntu-24.04-4
container:
image: debian:trixie
timeout-minutes: 30
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