Skip to content

Commit 4547aa8

Browse files
authored
Merge branch 'main' into dynamic-highway
2 parents 5184ff5 + bd7c5cc commit 4547aa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2758
-1959
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build.zig.zon.nix linguist-generated=true
22
build.zig.zon.txt linguist-generated=true
3-
build.zig.zon2json-lock linguist-generated=true
3+
build.zig.zon.json linguist-generated=true
44
vendor/** linguist-vendored
55
website/** linguist-documentation
66
pkg/breakpad/vendor/** linguist-vendored

.github/workflows/release-tag.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,18 @@ jobs:
7777
needs: [setup]
7878
env:
7979
GHOSTTY_VERSION: ${{ needs.setup.outputs.version }}
80+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
81+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
8082
steps:
8183
- uses: actions/checkout@v4
8284

85+
- name: Setup Cache
86+
uses: namespacelabs/[email protected]
87+
with:
88+
path: |
89+
/nix
90+
/zig
91+
8392
- uses: cachix/install-nix-action@v30
8493
with:
8594
nix_path: nixpkgs=channel:nixos-unstable
@@ -91,8 +100,8 @@ jobs:
91100

92101
- name: Create Tarball
93102
run: |
94-
git archive --format=tgz --prefix="ghostty-${GHOSTTY_VERSION}/" -o "ghostty-${GHOSTTY_VERSION}.tar.gz" HEAD
95-
git archive --format=tgz --prefix=ghostty-source/ -o ghostty-source.tar.gz HEAD
103+
nix develop -c zig build distcheck
104+
cp zig-out/dist/ghostty-${GHOSTTY_VERSION}.tar.gz .
96105
97106
- name: Sign Tarball
98107
run: |
@@ -108,8 +117,6 @@ jobs:
108117
path: |-
109118
ghostty-${{ env.GHOSTTY_VERSION }}.tar.gz
110119
ghostty-${{ env.GHOSTTY_VERSION }}.tar.gz.minisig
111-
ghostty-source.tar.gz
112-
ghostty-source.tar.gz.minisig
113120
114121
build-macos:
115122
needs: [setup]

.github/workflows/release-tip.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,17 @@ jobs:
101101
)
102102
}}
103103
runs-on: namespace-profile-ghostty-md
104+
env:
105+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
106+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
104107
steps:
105108
- uses: actions/checkout@v4
109+
- name: Setup Cache
110+
uses: namespacelabs/[email protected]
111+
with:
112+
path: |
113+
/nix
114+
/zig
106115
- uses: cachix/install-nix-action@v30
107116
with:
108117
nix_path: nixpkgs=channel:nixos-unstable
@@ -111,12 +120,17 @@ jobs:
111120
name: ghostty
112121
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
113122
- name: Create Tarball
114-
run: git archive --format=tgz --prefix=ghostty-source/ -o ghostty-source.tar.gz HEAD
123+
run: |
124+
rm -rf zig-out/dist
125+
nix develop -c zig build distcheck
126+
cp zig-out/dist/*.tar.gz ghostty-source.tar.gz
127+
115128
- name: Sign Tarball
116129
run: |
117130
echo -n "${{ secrets.MINISIGN_KEY }}" > minisign.key
118131
echo -n "${{ secrets.MINISIGN_PASSWORD }}" > minisign.password
119132
nix develop -c minisign -S -m ghostty-source.tar.gz -s minisign.key < minisign.password
133+
120134
- name: Update Release
121135
uses: softprops/action-gh-release@v2
122136
with:

.github/workflows/test.yml

+131-6
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ name: Test
88
jobs:
99
required:
1010
name: "Required Checks: Test"
11-
runs-on: namespace-profile-ghostty-sm
11+
runs-on: namespace-profile-ghostty-xsm
1212
needs:
1313
- build-bench
14+
- build-dist
15+
- build-flatpak
1416
- build-linux
1517
- build-linux-libghostty
1618
- build-nix
@@ -27,8 +29,10 @@ jobs:
2729
- alejandra
2830
- typos
2931
- translations
32+
- blueprint-compiler
3033
- test-pkg-linux
3134
- test-debian-12
35+
- zig-fmt
3236
steps:
3337
- id: status
3438
name: Determine status
@@ -79,6 +83,40 @@ jobs:
7983
- name: Build Benchmarks
8084
run: nix develop -c zig build -Dapp-runtime=glfw -Demit-bench
8185

86+
build-flatpak:
87+
strategy:
88+
fail-fast: false
89+
runs-on: namespace-profile-ghostty-sm
90+
needs: test
91+
env:
92+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
93+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
94+
steps:
95+
- name: Checkout code
96+
uses: actions/checkout@v4
97+
98+
- name: Setup Cache
99+
uses: namespacelabs/[email protected]
100+
with:
101+
path: |
102+
/nix
103+
/zig
104+
105+
# Install Nix and use that to run our tests so our environment matches exactly.
106+
- uses: cachix/install-nix-action@v30
107+
with:
108+
nix_path: nixpkgs=channel:nixos-unstable
109+
- uses: cachix/cachix-action@v15
110+
with:
111+
name: ghostty
112+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
113+
114+
- name: Build with Flatpak
115+
run: |
116+
nix develop -c \
117+
zig build \
118+
-Dflatpak=true
119+
82120
build-linux:
83121
strategy:
84122
fail-fast: false
@@ -174,6 +212,35 @@ jobs:
174212
- name: Test NixOS package build
175213
run: nix build .#ghostty
176214

215+
build-dist:
216+
runs-on: namespace-profile-ghostty-md
217+
needs: test
218+
env:
219+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
220+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
221+
steps:
222+
- name: Checkout code
223+
uses: actions/checkout@v4
224+
225+
- name: Setup Cache
226+
uses: namespacelabs/[email protected]
227+
with:
228+
path: |
229+
/nix
230+
/zig
231+
232+
# Install Nix and use that to run our tests so our environment matches exactly.
233+
- uses: cachix/install-nix-action@v30
234+
with:
235+
nix_path: nixpkgs=channel:nixos-unstable
236+
- uses: cachix/cachix-action@v15
237+
with:
238+
name: ghostty
239+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
240+
241+
- name: Build and Check Source Tarball
242+
run: nix develop -c zig build distcheck
243+
177244
build-macos:
178245
runs-on: namespace-profile-ghostty-macos
179246
needs: test
@@ -547,9 +614,36 @@ jobs:
547614
- name: test
548615
run: nix develop -c zig build test --system ${{ steps.deps.outputs.deps }}
549616

617+
zig-fmt:
618+
if: github.repository == 'ghostty-org/ghostty'
619+
runs-on: namespace-profile-ghostty-xsm
620+
timeout-minutes: 60
621+
env:
622+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
623+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
624+
steps:
625+
- uses: actions/checkout@v4 # Check out repo so we can lint it
626+
- name: Setup Cache
627+
uses: namespacelabs/[email protected]
628+
with:
629+
path: |
630+
/nix
631+
/zig
632+
- uses: cachix/install-nix-action@v30
633+
with:
634+
nix_path: nixpkgs=channel:nixos-unstable
635+
- uses: cachix/cachix-action@v15
636+
with:
637+
name: ghostty
638+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
639+
skipPush: true
640+
useDaemon: false # sometimes fails on short jobs
641+
- name: zig fmt
642+
run: nix develop -c zig fmt --check .
643+
550644
prettier:
551645
if: github.repository == 'ghostty-org/ghostty'
552-
runs-on: namespace-profile-ghostty-sm
646+
runs-on: namespace-profile-ghostty-xsm
553647
timeout-minutes: 60
554648
env:
555649
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
@@ -576,7 +670,7 @@ jobs:
576670

577671
alejandra:
578672
if: github.repository == 'ghostty-org/ghostty'
579-
runs-on: namespace-profile-ghostty-sm
673+
runs-on: namespace-profile-ghostty-xsm
580674
timeout-minutes: 60
581675
env:
582676
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
@@ -603,7 +697,7 @@ jobs:
603697

604698
typos:
605699
if: github.repository == 'ghostty-org/ghostty'
606-
runs-on: namespace-profile-ghostty-sm
700+
runs-on: namespace-profile-ghostty-xsm
607701
timeout-minutes: 60
608702
env:
609703
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
@@ -662,7 +756,39 @@ jobs:
662756
msgcmp "$old_pot" po/com.mitchellh.ghostty.pot --use-untranslated
663757
664758
# Compare all other POs to current POT
665-
for f in po/*.po; do msgcmp "$f" po/com.mitchellh.ghostty.pot; done
759+
for f in po/*.po; do
760+
# Ignore untranslated entries
761+
msgcmp --use-untranslated "$f" po/com.mitchellh.ghostty.pot;
762+
done
763+
764+
blueprint-compiler:
765+
if: github.repository == 'ghostty-org/ghostty'
766+
runs-on: namespace-profile-ghostty-sm
767+
timeout-minutes: 60
768+
env:
769+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
770+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
771+
steps:
772+
- uses: actions/checkout@v4 # Check out repo so we can lint it
773+
- name: Setup Cache
774+
uses: namespacelabs/[email protected]
775+
with:
776+
path: |
777+
/nix
778+
/zig
779+
- uses: cachix/install-nix-action@v30
780+
with:
781+
nix_path: nixpkgs=channel:nixos-unstable
782+
- uses: cachix/cachix-action@v15
783+
with:
784+
name: ghostty
785+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
786+
skipPush: true
787+
useDaemon: false # sometimes fails on short jobs
788+
- name: check blueprints
789+
run: nix develop -c ./nix/build-support/check-blueprints.sh
790+
- name: check unchanged
791+
run: git diff --exit-code
666792

667793
test-pkg-linux:
668794
strategy:
@@ -720,4 +846,3 @@ jobs:
720846
file: src/build/docker/debian/Dockerfile
721847
build-args: |
722848
DISTRO_VERSION=12
723-
ZIG_VERSION=0.14.0

.github/workflows/update-colorschemes.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ jobs:
6666
commit-message: "deps: Update iTerm2 color schemes"
6767
add-paths: |
6868
build.zig.zon
69-
build.zig.zon2json-lock
7069
build.zig.zon.nix
7170
build.zig.zon.txt
71+
build.zig.zon.json
7272
body: |
7373
Upstream revision: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/${{ steps.zig_fetch.outputs.upstream_rev }}
7474
labels: dependencies

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
/po/README_TRANSLATORS.md @ghostty-org/localization
160160
/po/com.mitchellh.ghostty.pot @ghostty-org/localization
161161
/po/de_DE.UTF-8.po @ghostty-org/de_DE
162+
/po/nb_NO.UTF-8.po @ghostty-org/nb_NO
162163
/po/zh_CN.UTF-8.po @ghostty-org/zh_CN
163164

164165
# Packaging - Snap

build.zig

+18-12
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,31 @@ pub fn build(b: *std.Build) !void {
1515

1616
// Ghostty dependencies used by many artifacts.
1717
const deps = try buildpkg.SharedDeps.init(b, &config);
18-
const exe = try buildpkg.GhosttyExe.init(b, &config, &deps);
1918
if (config.emit_helpgen) deps.help_strings.install();
2019

20+
// Ghostty executable, the actual runnable Ghostty program.
21+
const exe = try buildpkg.GhosttyExe.init(b, &config, &deps);
22+
2123
// Ghostty docs
22-
if (config.emit_docs) {
23-
const docs = try buildpkg.GhosttyDocs.init(b, &deps);
24-
docs.install();
25-
}
24+
const docs = try buildpkg.GhosttyDocs.init(b, &deps);
25+
if (config.emit_docs) docs.install();
2626

2727
// Ghostty webdata
28-
if (config.emit_webdata) {
29-
const webdata = try buildpkg.GhosttyWebdata.init(b, &deps);
30-
webdata.install();
31-
}
28+
const webdata = try buildpkg.GhosttyWebdata.init(b, &deps);
29+
if (config.emit_webdata) webdata.install();
3230

3331
// Ghostty bench tools
34-
if (config.emit_bench) {
35-
const bench = try buildpkg.GhosttyBench.init(b, &deps);
36-
bench.install();
32+
const bench = try buildpkg.GhosttyBench.init(b, &deps);
33+
if (config.emit_bench) bench.install();
34+
35+
// Ghostty dist tarball
36+
const dist = try buildpkg.GhosttyDist.init(b, &config);
37+
{
38+
const step = b.step("dist", "Build the dist tarball");
39+
step.dependOn(dist.install_step);
40+
const check_step = b.step("distcheck", "Install and validate the dist tarball");
41+
check_step.dependOn(dist.check_step);
42+
check_step.dependOn(dist.install_step);
3743
}
3844

3945
// If we're not building libghostty, then install the exe and resources.

build.zig.zon

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
},
1515
.vaxis = .{
1616
// rockorager/libvaxis
17-
.url = "git+https://github.com/rockorager/libvaxis#1e24e0dfb509e974e1c8713bcd119d0ae032a8c7",
18-
.hash = "vaxis-0.1.0-BWNV_MHyCAARemSCSwwc3sA1etNgv7ge0BCIXspX6CZv",
17+
.url = "git+https://github.com/rockorager/libvaxis#4182b7fa42f27cf14a71dbdb54cfd82c5c6e3447",
18+
.hash = "vaxis-0.1.0-BWNV_MHyCAA0rNbPTr50Z44PyEdNP9zQSnHcXBXoo3Ti",
1919
.lazy = true,
2020
},
2121
.z2d = .{
@@ -48,15 +48,15 @@
4848
},
4949
.zf = .{
5050
// natecraddock/zf
51-
.url = "https://github.com/natecraddock/zf/archive/03176fcf23fda543cc02a8675e92c1fe3b1ee2eb.tar.gz",
52-
.hash = "zf-0.10.3-OIRy8bKIAACV6JaNNncXA68Nw2BUAD9JVfQdzjyoZQ-J",
51+
.url = "https://github.com/natecraddock/zf/archive/1039cf75447a8d5b8d481fedb914fe848d246276.tar.gz",
52+
.hash = "zf-0.10.3-OIRy8bKIAADhjqtdjVaDfONRuI7RVl5gMbhCoOwiBWV5",
5353
.lazy = true,
5454
},
5555
.gobject = .{
5656
// https://github.com/jcollie/ghostty-gobject based on zig_gobject
5757
// Temporary until we generate them at build time automatically.
58-
.url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-11-16-1/ghostty-gobject-0.14.0-2025-03-11-16-1.tar.gz",
59-
.hash = "gobject-0.2.0-Skun7H6DlQDWCiNQtdE5TXYcCvx7MyjW01OQe5M_n_jV",
58+
.url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.0-2025-03-18-21-1/ghostty-gobject-0.14.0-2025-03-18-21-1.tar.zst",
59+
.hash = "gobject-0.2.0-Skun7IWDlQAOKu4BV7LapIxL9Imbq1JRmzvcIkazvAxR",
6060
.lazy = true,
6161
},
6262

@@ -103,8 +103,8 @@
103103
// Other
104104
.apple_sdk = .{ .path = "./pkg/apple-sdk" },
105105
.iterm2_themes = .{
106-
.url = "https://github.com/mbadolato/iTerm2-Color-Schemes/archive/e21d5ffd19605741d0e3e19d7c5a8c6c25648673.tar.gz",
107-
.hash = "N-V-__8AAABBKARxrVb9mEr7T5TUQbbqPiHxdBoOAmsChg2a",
106+
.url = "https://github.com/mbadolato/iTerm2-Color-Schemes/archive/e348884a00ef6c98dc837a873c4a867c9164d8a0.tar.gz",
107+
.hash = "N-V-__8AAOCKKgR3_ixUa8LPz0Zz8okA9C6A3kXVLbmdLsGP",
108108
.lazy = true,
109109
},
110110
},

0 commit comments

Comments
 (0)