Move CI to Forgejo Actions and drop the GitHub-only files #7

Closed
opened 2026-11-12 21:36:18 +01:00 by omp-deck · 0 comments
Collaborator

Problem

CI lives in .github/workflows/build.yml and is written for GitHub-hosted
ubuntu-latest: it uses sudo, actions/upload-artifact, and publishes GitHub
Releases with softprops/action-gh-release. The repository is hosted on Forgejo
(lucas/nanoKontroller2), so this pipeline is dead weight there.

The repository also still carries GitHub-specific community files — .github/FUNDING.yml
and .github/ISSUE_TEMPLATE/{bug_report.md,feature_request.md} — which are to be
dropped without Forgejo replacements.

End state: .github/ is gone entirely, and a single Forgejo workflow at
.forgejo/workflows/build.yml proves every pushed commit and every pull request
compiles. The job runs on the stock docker runner label (a Debian trixie
image with Node.js, as configured on this instance), builds nothing else: no
artifacts, no .deb packaging, no release publishing.

Decisions already made for the implementer (do not revisit):

  • Runner: runs-on: docker, no container: override — the label's own image is used.
  • Checkout is pinned by commit: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 (bare form, no URL prefix).
  • CMake comes from lukka/get-cmake, referenced by absolute URL and pinned to commit f86dd60acae0d132056913e248bdabf0e0580b7a (release v4.4.5), keeping the existing cmakeVersion: "~4.2.2" input.
  • WirePlumber, RtMidi, cxxopts and concurrentqueue come from apt; only glaze and magic_enum are still built from source, pinned to tags v9.1.0 and v0.9.8.
  • Triggers: push on branches: ["**"] and pull_request on branches: ["**"]. No tag trigger.

Plan

Approach

Step 1 — Delete the GitHub directory outright.

Remove all four tracked files and the directory:

  • .github/workflows/build.yml
  • .github/FUNDING.yml
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md

No Forgejo issue templates (.forgejo/issue_template/) and no funding file are
created in their place — dropping them is the requested outcome. README.md
contains no CI badge and no reference to these files (checked), so nothing else
needs touching.

Step 2 — Create .forgejo/workflows/build.yml with exactly this content.

name: Build

on:
  push:
    branches: ["**"]
  pull_request:
    branches: ["**"]

jobs:
  build:
    runs-on: docker
    env:
      CC: gcc-14
      CXX: g++-14
      DEBIAN_FRONTEND: noninteractive

    steps:
      - name: Checkout repository
        uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

      - name: Install system dependencies
        run: |
          apt-get update
          apt-get install -y --no-install-recommends \
            ca-certificates \
            git \
            pkg-config \
            gcc-14 \
            g++-14 \
            libglib2.0-dev \
            libasound2-dev \
            libcxxopts-dev \
            libconcurrentqueue-dev \
            libwireplumber-0.5-dev \
            librtmidi-dev

      - name: Install CMake 4.2
        uses: https://github.com/lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a
        with:
          cmakeVersion: "~4.2.2"

      - name: Install glaze
        run: |
          git clone --depth=1 --branch v9.1.0 https://github.com/stephenberry/glaze.git /tmp/glaze
          cmake -S /tmp/glaze -B /tmp/glaze/build \
            -DCMAKE_BUILD_TYPE=Release \
            -DGLAZE_ENABLE_TESTS=OFF
          cmake --install /tmp/glaze/build

      - name: Install magic_enum
        run: |
          git clone --depth=1 --branch v0.9.8 https://github.com/Neargye/magic_enum.git /tmp/magic_enum
          cmake -S /tmp/magic_enum -B /tmp/magic_enum/build \
            -DCMAKE_BUILD_TYPE=Release
          cmake --install /tmp/magic_enum/build

      - name: Configure
        run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

      - name: Build
        run: cmake --build build --parallel $(nproc)

Why each deviation from the old workflow exists:

  • No sudo anywhere: the job runs as root inside the runner's container, and
    sudo is not installed in the Node base images.
  • WirePlumber from apt. trixie ships libwireplumber-0.5-dev 0.5.8-2, which
    provides the wireplumber-0.5 pkg-config file required by CMakeLists.txt:17,
    and pulls in libpipewire-0.3-dev and libglib2.0-dev as dependencies. The
    whole meson clone/build/install block, and with it meson, ninja-build,
    libspa-0.2-dev, libpipewire-0.3-dev, liblua5.4-dev and libsystemd-dev,
    are gone. The old Verify Installation step (pkg-config --modversion wireplumber-0.5) is dropped too: the configure step fails on the same
    condition, one step later.
  • RtMidi from apt. trixie's librtmidi-dev is 6.0.0-2 — the exact version the
    old workflow compiled from source — and provides the rtmidi pkg-config module
    used at CMakeLists.txt:21.
  • concurrentqueue from apt. trixie's libconcurrentqueue-dev 1.0.4 installs
    headers at /usr/include/concurrentqueue/moodycamel/, matching the include in
    src/main.cpp:8 (<concurrentqueue/moodycamel/concurrentqueue.h>), plus
    concurrentqueueConfig.cmake for find_package(concurrentqueue REQUIRED).
  • glaze and magic_enum stay from source because neither is packaged in Debian;
    they are header-only, so cmake --install without a build step is sufficient
    (as today). magic_enum is installed with no extra options, exactly as the
    current workflow does.
  • No version step. The old Determine version step fed
    -DPROJECT_VERSION_STRING only for CPack. No source file references a version
    (verified: no version match under src/ or includes/), and packaging is
    gone, so configure uses the 1.0.0 fallback at CMakeLists.txt:3-5.
  • No artifact upload and no release step: the pipeline's sole output is a
    pass/fail verdict, which also removes any dependence on this instance's
    artifact-storage support.

Critical files & anchors

  • .github/ — all four files deleted; the directory must not survive.
  • .forgejo/workflows/build.yml — the only new file.
  • CMakeLists.txt:1 — cmake_minimum_required(VERSION 4.2); trixie's CMake is
    3.31, which is why the get-cmake step is mandatory and must run before the
    glaze/magic_enum install steps (they invoke cmake).
  • CMakeLists.txt:12-21 — the find_package/pkg_check_modules list that the apt
    package set must satisfy: glaze, cxxopts, concurrentqueue, wireplumber-0.5,
    glib-2.0, gobject-2.0, alsa, rtmidi.

Verification

Forgejo Actions cannot be exercised locally; verification is the run itself.

  1. Push the branch carrying both changes to origin.
  2. Confirm the workflow was picked up and finished green — the new behaviour being
    proven is "a Forgejo runner builds this project from a clean container":
    • forgejo_read_commit_status on the pushed head SHA → combined state success,
      all checks finished.
    • forgejo_list_run_jobs → forgejo_read_job_log for the build job, and check
      in the log that:
      • the Install system dependencies step installed libwireplumber-0.5-dev
        and librtmidi-dev without error (no sudo: command not found, no
        Unable to locate package),
      • the Configure step printed no Could NOT find / None of the required 'wireplumber-0.5' found lines and ended with Generating done,
      • the Build step ended with a linked nanoKontroller2 target and the job
        exited 0.
  3. Confirm the deletions landed: .github/ resolves to nothing on the branch
    (git_status shows the four deletions staged/committed; forgejo_read_file_at_ref
    on .github/workflows/build.yml at the branch head returns not-found).

If the run never starts, the cause is Actions not being enabled for this
repository or no runner carrying the docker label being online — that is a
Forgejo administration matter outside this change; report it rather than
reworking the workflow.

Assumptions & contingencies

  • The docker label's image is Debian trixie or newer, and contains Node.js
    (stated by the repository owner; unverified from the repo). If apt-get install fails with Unable to locate package libwireplumber-0.5-dev or
    gcc-14, the image is older: add container: image: node:24-trixie under
    runs-on: docker in the job and re-run, changing nothing else.
  • WirePlumber 0.5.8 (trixie) is API-compatible with the 0.5.14 the old pipeline
    built.
    Same 0.5 series, but unverified against this source tree. If
    configure or compilation fails on missing WirePlumber symbols/headers, drop
    libwireplumber-0.5-dev from the apt list, add meson, ninja-build,
    libspa-0.2-dev, libpipewire-0.3-dev, liblua5.4-dev and libsystemd-dev,
    and restore the old from-source build before the Configure step:
    git clone https://gitlab.freedesktop.org/pipewire/wireplumber.git,
    git checkout 0.5.14, meson setup build --prefix=/usr --buildtype=release -Dsystem-lua=true -Dintrospection=disabled -Ddoc=disabled, meson compile -C build, meson install -C build (no sudo).
  • uses: actions/checkout@0c366fd… resolves on this instance via the runner's
    default actions URL. If the step fails to resolve the action, prefix it with the
    mirror it should come from (e.g.
    https://code.forgejo.org/actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98),
    keeping the same commit.
  • The runner can reach github.com and cmake.org for get-cmake, glaze and
    magic_enum. If outbound access is blocked, that is an infrastructure
    prerequisite, not a workflow defect — report it instead of substituting
    dependency sources.
  • glaze v9.1.0 compiles with GCC 14. If it rejects the compiler, pin glaze to
    the newest v9.x tag that builds and record the tag in the workflow; do not
    revert to tracking main.
## Problem CI lives in `.github/workflows/build.yml` and is written for GitHub-hosted `ubuntu-latest`: it uses `sudo`, `actions/upload-artifact`, and publishes GitHub Releases with `softprops/action-gh-release`. The repository is hosted on Forgejo (`lucas/nanoKontroller2`), so this pipeline is dead weight there. The repository also still carries GitHub-specific community files — `.github/FUNDING.yml` and `.github/ISSUE_TEMPLATE/{bug_report.md,feature_request.md}` — which are to be dropped without Forgejo replacements. End state: `.github/` is gone entirely, and a single Forgejo workflow at `.forgejo/workflows/build.yml` proves every pushed commit and every pull request compiles. The job runs on the stock `docker` runner label (a Debian **trixie** image with Node.js, as configured on this instance), builds nothing else: no artifacts, no `.deb` packaging, no release publishing. Decisions already made for the implementer (do not revisit): - Runner: `runs-on: docker`, **no** `container:` override — the label's own image is used. - Checkout is pinned by commit: `actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98` (bare form, no URL prefix). - CMake comes from `lukka/get-cmake`, referenced by absolute URL and pinned to commit `f86dd60acae0d132056913e248bdabf0e0580b7a` (release v4.4.5), keeping the existing `cmakeVersion: "~4.2.2"` input. - WirePlumber, RtMidi, cxxopts and concurrentqueue come from apt; only glaze and magic_enum are still built from source, pinned to tags `v9.1.0` and `v0.9.8`. - Triggers: `push` on `branches: ["**"]` and `pull_request` on `branches: ["**"]`. No tag trigger. ## Plan ### Approach **Step 1 — Delete the GitHub directory outright.** Remove all four tracked files and the directory: - `.github/workflows/build.yml` - `.github/FUNDING.yml` - `.github/ISSUE_TEMPLATE/bug_report.md` - `.github/ISSUE_TEMPLATE/feature_request.md` No Forgejo issue templates (`.forgejo/issue_template/`) and no funding file are created in their place — dropping them is the requested outcome. `README.md` contains no CI badge and no reference to these files (checked), so nothing else needs touching. **Step 2 — Create `.forgejo/workflows/build.yml` with exactly this content.** ```yaml name: Build on: push: branches: ["**"] pull_request: branches: ["**"] jobs: build: runs-on: docker env: CC: gcc-14 CXX: g++-14 DEBIAN_FRONTEND: noninteractive steps: - name: Checkout repository uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 - name: Install system dependencies run: | apt-get update apt-get install -y --no-install-recommends \ ca-certificates \ git \ pkg-config \ gcc-14 \ g++-14 \ libglib2.0-dev \ libasound2-dev \ libcxxopts-dev \ libconcurrentqueue-dev \ libwireplumber-0.5-dev \ librtmidi-dev - name: Install CMake 4.2 uses: https://github.com/lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a with: cmakeVersion: "~4.2.2" - name: Install glaze run: | git clone --depth=1 --branch v9.1.0 https://github.com/stephenberry/glaze.git /tmp/glaze cmake -S /tmp/glaze -B /tmp/glaze/build \ -DCMAKE_BUILD_TYPE=Release \ -DGLAZE_ENABLE_TESTS=OFF cmake --install /tmp/glaze/build - name: Install magic_enum run: | git clone --depth=1 --branch v0.9.8 https://github.com/Neargye/magic_enum.git /tmp/magic_enum cmake -S /tmp/magic_enum -B /tmp/magic_enum/build \ -DCMAKE_BUILD_TYPE=Release cmake --install /tmp/magic_enum/build - name: Configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release - name: Build run: cmake --build build --parallel $(nproc) ``` Why each deviation from the old workflow exists: - **No `sudo`** anywhere: the job runs as root inside the runner's container, and `sudo` is not installed in the Node base images. - **WirePlumber from apt.** trixie ships `libwireplumber-0.5-dev` 0.5.8-2, which provides the `wireplumber-0.5` pkg-config file required by `CMakeLists.txt:17`, and pulls in `libpipewire-0.3-dev` and `libglib2.0-dev` as dependencies. The whole meson clone/build/install block, and with it `meson`, `ninja-build`, `libspa-0.2-dev`, `libpipewire-0.3-dev`, `liblua5.4-dev` and `libsystemd-dev`, are gone. The old `Verify Installation` step (`pkg-config --modversion wireplumber-0.5`) is dropped too: the configure step fails on the same condition, one step later. - **RtMidi from apt.** trixie's `librtmidi-dev` is 6.0.0-2 — the exact version the old workflow compiled from source — and provides the `rtmidi` pkg-config module used at `CMakeLists.txt:21`. - **concurrentqueue from apt.** trixie's `libconcurrentqueue-dev` 1.0.4 installs headers at `/usr/include/concurrentqueue/moodycamel/`, matching the include in `src/main.cpp:8` (`<concurrentqueue/moodycamel/concurrentqueue.h>`), plus `concurrentqueueConfig.cmake` for `find_package(concurrentqueue REQUIRED)`. - **glaze and magic_enum stay from source** because neither is packaged in Debian; they are header-only, so `cmake --install` without a build step is sufficient (as today). `magic_enum` is installed with no extra options, exactly as the current workflow does. - **No version step.** The old `Determine version` step fed `-DPROJECT_VERSION_STRING` only for CPack. No source file references a version (verified: no `version` match under `src/` or `includes/`), and packaging is gone, so configure uses the `1.0.0` fallback at `CMakeLists.txt:3-5`. - **No artifact upload and no release step**: the pipeline's sole output is a pass/fail verdict, which also removes any dependence on this instance's artifact-storage support. ### Critical files & anchors - `.github/` — all four files deleted; the directory must not survive. - `.forgejo/workflows/build.yml` — the only new file. - `CMakeLists.txt:1` — `cmake_minimum_required(VERSION 4.2)`; trixie's CMake is 3.31, which is why the `get-cmake` step is mandatory and must run before the glaze/magic_enum install steps (they invoke `cmake`). - `CMakeLists.txt:12-21` — the `find_package`/`pkg_check_modules` list that the apt package set must satisfy: glaze, cxxopts, concurrentqueue, `wireplumber-0.5`, `glib-2.0`, `gobject-2.0`, `alsa`, `rtmidi`. ### Verification Forgejo Actions cannot be exercised locally; verification is the run itself. 1. Push the branch carrying both changes to `origin`. 2. Confirm the workflow was picked up and finished green — the new behaviour being proven is "a Forgejo runner builds this project from a clean container": - `forgejo_read_commit_status` on the pushed head SHA → combined state `success`, all checks finished. - `forgejo_list_run_jobs` → `forgejo_read_job_log` for the build job, and check in the log that: - the `Install system dependencies` step installed `libwireplumber-0.5-dev` and `librtmidi-dev` without error (no `sudo: command not found`, no `Unable to locate package`), - the `Configure` step printed no `Could NOT find` / `None of the required 'wireplumber-0.5' found` lines and ended with `Generating done`, - the `Build` step ended with a linked `nanoKontroller2` target and the job exited 0. 3. Confirm the deletions landed: `.github/` resolves to nothing on the branch (`git_status` shows the four deletions staged/committed; `forgejo_read_file_at_ref` on `.github/workflows/build.yml` at the branch head returns not-found). If the run never starts, the cause is Actions not being enabled for this repository or no runner carrying the `docker` label being online — that is a Forgejo administration matter outside this change; report it rather than reworking the workflow. ### Assumptions & contingencies - **The `docker` label's image is Debian trixie or newer, and contains Node.js** (stated by the repository owner; `unverified` from the repo). If `apt-get install` fails with `Unable to locate package libwireplumber-0.5-dev` or `gcc-14`, the image is older: add `container: image: node:24-trixie` under `runs-on: docker` in the job and re-run, changing nothing else. - **WirePlumber 0.5.8 (trixie) is API-compatible with the 0.5.14 the old pipeline built.** Same 0.5 series, but `unverified` against this source tree. If configure or compilation fails on missing WirePlumber symbols/headers, drop `libwireplumber-0.5-dev` from the apt list, add `meson`, `ninja-build`, `libspa-0.2-dev`, `libpipewire-0.3-dev`, `liblua5.4-dev` and `libsystemd-dev`, and restore the old from-source build before the `Configure` step: `git clone https://gitlab.freedesktop.org/pipewire/wireplumber.git`, `git checkout 0.5.14`, `meson setup build --prefix=/usr --buildtype=release -Dsystem-lua=true -Dintrospection=disabled -Ddoc=disabled`, `meson compile -C build`, `meson install -C build` (no `sudo`). - **`uses: actions/checkout@0c366fd…` resolves on this instance** via the runner's default actions URL. If the step fails to resolve the action, prefix it with the mirror it should come from (e.g. `https://code.forgejo.org/actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98`), keeping the same commit. - **The runner can reach github.com and cmake.org** for `get-cmake`, glaze and magic_enum. If outbound access is blocked, that is an infrastructure prerequisite, not a workflow defect — report it instead of substituting dependency sources. - **glaze v9.1.0 compiles with GCC 14.** If it rejects the compiler, pin glaze to the newest v9.x tag that builds and record the tag in the workflow; do not revert to tracking `main`.
lucas closed this issue 2026-11-12 22:16:43 +01:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lucas/nanoKontroller2#7
No description provided.