ci: add freebsd tests (#8466)

This commit is contained in:
Mitchell Hashimoto
2025-08-30 12:59:01 -07:00
committed by GitHub
3 changed files with 71 additions and 7 deletions

View File

@@ -70,13 +70,15 @@ pub const Runtime = enum {
gtk,
pub fn default(target: std.Target) Runtime {
// The Linux default is GTK because it is a full featured application.
if (target.os.tag == .linux) return .@"gtk-ng";
// Otherwise, we do NONE so we don't create an exe and we
// create libghostty. On macOS, Xcode is used to build the app
// that links to libghostty.
return .none;
return switch (target.os.tag) {
// The Linux and FreeBSD default is GTK because it is a full
// featured application.
.linux, .freebsd => .@"gtk-ng",
// Otherwise, we do NONE so we don't create an exe and we create
// libghostty. On macOS, Xcode is used to build the app that links
// to libghostty.
else => .none,
};
}
};

View File

@@ -131,6 +131,13 @@ pub const VTable = struct {
};
test Benchmark {
// This test fails on FreeBSD so skip:
//
// /home/runner/work/ghostty/ghostty/src/benchmark/Benchmark.zig:165:5: 0x3cd2de1 in decltest.Benchmark (ghostty-test)
// try testing.expect(result.duration > 0);
// ^
if (builtin.os.tag == .freebsd) return error.SkipZigTest;
const testing = std.testing;
const Simple = struct {
const Self = @This();