Skip to content

Build with CMake - #48

Merged
omarchybot merged 9 commits into
masterfrom
build-with-cmake
Nov 12, 2026
Merged

omarchybot merged 9 commits into
masterfrom
build-with-cmake

Conversation

@omarchybot

@omarchybot omarchybot commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Every Omarchy app is moving to the same build: CMake, with the sources compiled once as a static library that the app and its tests both link, and the same bin/build, bin/test and GitHub Actions workflow in every repository. Hype was on qmake with two .pro files listing every source twice, its tests ran only by hand, and its Python command tests weren't run by anything.

CMakeLists.txt keeps everything hype.pro set: the Qt modules, the resources, -fno-exceptions and link-time optimization (the reason the installed binary is a quarter smaller), -Wall -Wextra, zlib and libwebp, and the Qt 6.9 floor, which find_package now enforces. The tests are now built the same way, without exceptions and with LTO, since they link the same objects. A Qt from the installer under build/qt/ still wins over an older system Qt, and CMAKE_PREFIX_PATH replaces HYPE_QMAKE for picking another. libwebp is found through pkg-config, which also finds Homebrew's, so the include and library paths #46 adds for macOS shouldn't be needed on top of this.

bin/test is now ctest, running two tests, each offscreen on its own so a bare ctest works as well: hype_tests, the C++ suite, and hype_commands, the Python tests of the headless commands, exports and shutdown. test_trials.py stays out, since it needs the trial importer's own Python packages. The C++ tests read exported PDFs back with Qt Pdf, which Arch ships in qt6-webengine; the app builds without it, and testing without it fails with that name rather than quietly running nothing. Because the script no longer exports HYPE_GUI_TESTS=1, the C++ window-level tests now run unless HYPE_GUI_TESTS=0, the same default as before from the other end.

The workflow builds and tests in an Arch container as an ordinary user, installing the dependencies listed by Hype's package in omarchy-pkgs, which is where packaging lives. The in-repo pkgbuild/PKGBUILD and bin/install keep working and gain only cmake and pkgconf here; #54, on top of this, removes them. The tests need packages the omarchy-pkgs PKGBUILD doesn't list yet: qt6-webengine and python, plus fonts to paint slides with (ttf-jetbrains-mono, Hype's default, and noto-fonts, whose families the font picker test folds), and cmake and pkgconf to build. CI needs omacom/omarchy-pkgs#2573, which adds them: until it lands, hype_tests fails here for want of Qt Pdf, and with that pull request's PKGBUILD this branch and every pull request on top of it pass both tests. The portal tests stay behind HYPE_PORTAL_TESTS=1, because they claim the portal's name on the session bus and must not do that on a desktop.

Several open pull requests touch hype.pro, tests/tests.pro or bin/ (#35, #37, #46). Their source lines need no counterpart here: a new file in src/ is picked up by the glob.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex XHigh.

Omarchy's apps now build the same way: one CMakeLists.txt with the sources as a static library shared by the app and its tests, and identical bin/build, bin/test, bin/install and CI across every app. Everything the two .pro files set carries over: the modules, the resources, -fno-exceptions with link-time optimization, -Wall -Wextra, zlib and libwebp (now found through pkg-config), and the Qt 6.9 floor, with a toolchain under build/qt/ still preferred.

bin/test now runs ctest, which takes the C++ suite and the Python command tests, which nothing ran before. With the environment no longer set by the script, the window-level tests run unless HYPE_GUI_TESTS=0, rather than only when it is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No blocking issue remains in this review; the latest test-script change appears safe to merge.

Summary

Hype moves from qmake to CMake, shares compiled sources between the app and C++ tests, and runs both C++ and Python tests through ctest.

  • Hype and its tests build from one shared CMake library.
  • One test command runs Hype's C++ and command checks.
  • Pull requests and main-branch pushes build and test Hype on Arch.

Reviews (8) · Last reviewed commit: "Fail the tests when ctest finds none" · Reviewed by Greptile

Comment thread CMakeLists.txt Resolved
omarchybot and others added 6 commits November 11, 2026 23:06
A bare Arch container has no fonts, so slides painted nothing and the font picker had one family to choose from. test_trials needs the trial importer's own Python packages, which only that tooling uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundled toolchain was prepended to the search path, which CMake searches before the environment variable, so the documented override couldn't select another Qt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The font picker folds Noto's many families into a few, and the test that it rebuilds on a font change relies on that fold being there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The core library's objects are LTO-only, so the test link says so rather than relying on the linker plugin. qt6-wayland supplies Qt's native Wayland platform plugin; without it Hype runs under XWayland. The HYPE_GUI_TESTS note now says it covers the C++ window-level tests, since test_shutdown always opens the editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
ctest -R matches test names, not Qt test functions; -V is what shows those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package lives in omarchy-pkgs, so CI now reads the dependency list from there, and this change keeps the in-repo PKGBUILD and bin/install as they were apart from what building with CMake needs. Each test sets its own offscreen platform so a bare ctest works too, and a test whose dependency is missing fails with what to install rather than vanishing from the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .github/workflows/test.yml Resolved
omarchybot and others added 2 commits November 12, 2026 00:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ctest succeeds on an empty build directory, so a test target that stopped being registered would have turned CI green without running anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot
omarchybot merged commit 900bc47 into master Nov 12, 2026
1 of 2 checks passed
@omarchybot omarchybot mentioned this pull request Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants