289 Commits

Author SHA1 Message Date
trag1c
f0ade53fd2 ci: add a script and workflow for requesting i18n review 2025-04-10 16:40:28 -07:00
Jeffrey C. Ollie
a7a57011f0 ci: simplify debian 12 check 2025-03-19 14:44:31 -05:00
Mitchell Hashimoto
7b8c2232d3 build: distribute gresource c/h with source tarball
This introduces the concept of a "dist resource" (specifically a
`GhosttyDist.Resource` type). This is a resource that may be present in
dist tarballs but not in the source tree. If the resource is present and
we're not in a Git checkout, then we use it directly instead of
generating it.

This is used for the first time in this commit for the gresource c/h
files, which depend on a variety of external tools (blueprint-compiler,
glib-compile-resources, etc.) that we do not want to require downstream
users/packagers to have and we also do not want to worry about them
having the right versions.

This also adds a check for `distcheck` to ensure our distribution
contains all the expected files.
2025-03-19 11:52:03 -07:00
Mitchell Hashimoto
f7999444eb ci: zig fmt check (#6802)
This adds a CI test to ensure that all Zig files are properly formatted.
This avoids unrelated diff noise in future PRs.

This also runs `zig fmt` once to clean up all formatting issues for
future PRs.

I also introduced a new `xsm` (extra small) runner profile to use less
resources for our tiny tasks.
2025-03-18 14:39:34 -07:00
Jeffrey C. Ollie
07ec421cd3 CI: Add checks for blueprint compiler / Nix refactors (#6801)
1. Refactored Nix devshell/package to make it easier to keep
LD_LIBRARY_PATH & buildInputs in sync (plus make it easier to re-use in
other Nix environment).
2. Added a CI job to ensure that Blueprints are formatted correctly and
that they will compile using `blueprint-compiler` 0.16.0.
3. Reformatted all Blueprints with `blueprint-compiler format`.
2025-03-18 16:37:34 -05:00
Jeffrey C. Ollie
648e0a06ab CI: Add checks for blueprint compiler / Nix refactors
1. Refactored Nix devshell/package to make it easier to keep
   LD_LIBRARY_PATH & buildInputs in sync (plus make it easier to re-use
   in other Nix environment).
2. Added a CI job to ensure that Blueprints are formatted correctly and
   that they will compile using `blueprint-compiler` 0.16.0.
3. Reformatted all Blueprints with `blueprint-compiler format`.
2025-03-18 16:12:49 -05:00
Mitchell Hashimoto
4d0bf303c6 ci: zig fmt check
This adds a CI test to ensure that all Zig files are properly formatted.
This avoids unrelated diff noise in future PRs.
2025-03-18 13:58:49 -07:00
Mitchell Hashimoto
bab8c28c8b zig build dist and distcheck for source tarballs
This moves the source tarball creation process into the Zig build system
and follows the autotools-standard naming conventions of `dist` and
`distcheck`.

The `dist` target creates a source tarball in the `PREFIX/dist`
directory. The tarball is named `ghostty-VERSION.tar.gz` as expected by
standard source tarball conventions.

The `distcheck` target does the same as `dist`, but also takes the
resulting tarball, extracts it, and runs tests on the extracted source
to verify the source tarball works as expected.

This commit also updates CI:

  1. Tagged releases now use the new `zig build distcheck` command.
  2. Tip releases now use the new `zig build dist` command.
  3. A new test build tests that source tarball generation works on
     every commit.
2025-03-18 12:41:55 -07:00
Leah Amelia Chen
e3fbbe8fe3 ci(test/translations): ignore untranslated entries 2025-03-18 12:32:55 +01:00
Jeffrey C. Ollie
1d040dd17d debian workflow: remove unused ZIG_VERSION arg 2025-03-17 10:54:44 -05:00
Jeffrey C. Ollie
5cd8ebdafd update zon2nix
Upstream is now mostly pure Zig and the build.zig.zon.* files are
generated directly by zon2nix. The JSON file is no longer used as an
intermediate file but is retained for downstream packager usage.
2025-03-16 01:09:52 -05:00
Leorize
009b53c45e termio, flatpak: implement process watcher with xev
This allows `termio.Exec` to track processes spawned via
`FlatpakHostCommand`, finally allowing Ghostty to function as a
Flatpak.

Alongside this is a few bug fixes:

* Don't add ghostty to PATH when running in flatpak mode since it's
  unreachable.
* Correctly handle exit status returned by Flatpak. Previously this was
  not processed and contains extra status bits.
* Use correct type for PID returned by Flatpak.
2025-03-15 07:29:13 -07:00
Mitchell Hashimoto
221f905a1c pkg/glfw
Closes #6702

This removes our mach-glfw dependency and replaces it with an in-tree
pkg/glfw that includes both the source for compiling glfw as well as the
Zig bindings. This matches the pattern from our other packages.

This is based on the upstream mach-glfw work and therefore includes the
original license and copyright information.

The reasoning is stated in the issue but to summarize for the commit:

  - mach-glfw is no longer maintained, so we have to take ownership
  - mach-glfw depended on some large blobs of header files to enable
    cross-compilation but this isn't something we actually care about,
    so we can (and do) drop the blobs
  - mach-glfw blobs were hosted on mach hosts. given mach-glfw is
    unmaintained, we can't rely on this hosting
  - mach-glfw relied on a "glfw" package which was owned by another
    person to be Zig 0.14 compatible, but we no longer need to rely on
    this
  - mach-glfw builds were outdated based on latest Zig practices
2025-03-13 20:52:33 -07:00
Mitchell Hashimoto
66c83648c8 ci: debian 12 build should use zig 0.14 2025-03-12 16:29:17 -07:00
Leah Amelia Chen
5851bad4a0 ci: add check that ensures POT files are up to date 2025-03-03 10:19:58 +01:00
Jeffrey C. Ollie
36e6ed3339 build: fix colorscheme update 2025-02-15 23:39:40 -06:00
Jeffrey C. Ollie
b0d68324a6 gtk: fix multiple build args in docker build 2025-02-15 18:11:42 -06:00
Jeffrey C. Ollie
fb35d10981 gtk: add Zig version as arg to Debian 12 build 2025-02-15 18:01:07 -06:00
Jeffrey C. Ollie
191b19f9a5 gtk: add debian build to list of required checks 2025-02-15 17:58:25 -06:00
Jeffrey C. Ollie
c7b3cbd397 gtk: only test Debian 12 builds on amd64 2025-02-15 17:57:19 -06:00
Jeffrey C. Ollie
0ce1342263 gtk: fix building on Debian 12
`std.debug.assert(x)` _is not_ the same as `if (!x) unreachable`
because the function call is not `inline`. Since it's not inline the
Zig compiler will try to compile any code that might otherwise be
unreachable.

Also, added a CI test that compiles Ghostty in a Debian 12 container to
ensure that regressions do not happen.
2025-02-15 16:53:53 -06:00
Mitchell Hashimoto
baa47ff24e ci: test requires build-snap 2025-02-15 07:24:25 -08:00
Mitchell Hashimoto
88a6b542b3 ci: move snap testing into our big test workflow 2025-02-15 07:20:55 -08:00
Mitchell Hashimoto
494273cf08 ci: snap workflow requires git history 2025-02-15 07:10:31 -08:00
Mitchell Hashimoto
9944fd5958 ci: temporary apt installs required for namespace 2025-02-15 07:06:40 -08:00
Mitchell Hashimoto
c7635201ab Add snap to nix, add arm64 builders 2025-02-15 07:06:40 -08:00
Ken VanDine
e6c9dc7040 Only run snap workflow on push and PR 2025-02-15 07:06:40 -08:00
Ken VanDine
818c81282b Added snap build workflow 2025-02-15 07:06:40 -08:00
Jeffrey C. Ollie
25c5ecf553 gtk: require libadwaita
This commit removes support for building without libadwaita.
2025-02-14 21:49:51 -06:00
Jeffrey C. Ollie
74f222abec macOS: update additional references to Sparkle 2.6.3->2.6.4 2025-02-13 10:35:38 -06:00
Jeffrey C. Ollie
1e3cd89516 macOS: use Nix to get Zig deps 2025-02-12 08:21:16 -06:00
Jeffrey C. Ollie
3a8c934b19 nix: use zig2nix to manage nix cache/deps
This brings the internal package more in line with how the nixpkgs
package is built. It also handles recursive dependencies better than the
current system.
2025-02-11 08:25:34 -08:00
Mitchell Hashimoto
dda242c96e ci: update publish job 2025-01-30 13:58:17 -08:00
Mitchell Hashimoto
dbc4edc583 ci: separate publish and release workflows
This now requires a separate manually triggered `publish` workflow to be
run after the release completes in order to transition the release to
the `published` state.

Practically today this only means that the release will be published to
the macOS auto-updater, but in the future we could add additional steps
such as creating a GH release or some other notifications.

Importantly, this lets us verify the release in the uploaded location
before general users are notified of the update.
2025-01-29 16:39:35 -08:00
Mitchell Hashimoto
f5add68100 ci: required checks must be named separately 2025-01-10 13:31:28 -08:00
Mitchell Hashimoto
6237377a59 ci: avoid "successful failure" of status check job by inspecting needs
Thanks to @ryanec for this tip.
2025-01-10 13:28:21 -08:00
Mitchell Hashimoto
2fb0d99f00 ci: add required checks jobs
This is a hack to make it easier for our GitHub branching rules to
require a single check to pass before merging. This lets us describe the
required checks in code rather than via the GH UI.
2025-01-10 12:57:41 -08:00
Mitchell Hashimoto
be0370cb0e ci: test gtk-wayland in the GTK matrix 2025-01-10 09:41:14 -08:00
Bryan Lee
37256ec6a2 ci: move version output after variable definition 2025-01-09 10:31:41 +08:00
Bryan Lee
bec690532d ci: update zig version regex in windows build 2025-01-09 10:24:00 +08:00
Mitchell Hashimoto
405fe377d2 wuffs: update, add jpeg decoding, add simple tests (#4250)
1. Update wuffs to v0.4.0-alpha.9
2. Add JPEG decoding
3. Add basic unit tests for image decoding
4. Add CI jobs to run wuffs unit tests.
2025-01-02 15:24:28 -08:00
Mitchell Hashimoto
0ef24f3c75 ci: only test pkgs on Linux 2025-01-02 15:08:42 -08:00
Mitchell Hashimoto
7a5ef3da2b remove sentry test for macOS, remove windows check 2025-01-02 13:34:23 -08:00
Jeffrey C. Ollie
cb8d30f938 core: add build option to disable sentry 2025-01-02 13:32:45 -08:00
Jeffrey C. Ollie
652079b26c wuffs: update, add jpeg decoding, add simple tests 2025-01-01 22:48:30 -06:00
Mitchell Hashimoto
3f7c3afaf9 ci: source tarball files must not be quoted 2024-12-31 12:47:50 -08:00
Mitchell Hashimoto
a857d56fb6 ci: proper blob file setup for source tarballs on release 2024-12-31 12:43:33 -08:00
Mitchell Hashimoto
b7dba0c5f5 macos: disable auto-updates for local builds (#3943)
The auto-update prompt isn't useful for local (source) builds. Disable
it by default by setting Sparkle's SUEnableAutomaticChecks Info.plist
key to NO (false) for all build configurations.

We then selectively re-enable it by deleting that Info.plist key from
our release workflows. We delete the key instead of setting its value to
YES (true) to give us Sparkle's default behavior of prompting the user
to enable update checks on the second application launch. (YES tells
Sparkle to skip that prompt and silently enable update checks.)

See also: https://sparkle-project.org/documentation/customization/

(This is a safer alternative to #3273.)

Fixes: #3179
2024-12-29 13:26:35 -08:00
Mitchell Hashimoto
3b8a0ed2b8 CI: Update release-tag.yml to include the version in the source archive and prefix within (#3490)
Continuing from #3043 I agree that it seems idiomatic to have an archive
with format <name>-<version>.tar.gz and matching prefix for packaging,
RPM and Debian packaging guides seem to assume this format and the
automated extract tooling assumes it too.

# Testing
I haven't tested running this workflow, and am unsure about the yaml
substitution at lines 105-106

# Breaking changes
This would break existing packaging scripts, not sure how we want to
version it
2024-12-29 13:25:28 -08:00
Mitchell Hashimoto
9c15d8de35 ci: keep old source tarballs as well 2024-12-29 13:24:28 -08:00