From 58b925d4c3154803191f5e8e76a63c528ccf816c Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Sat, 10 Feb 2024 22:20:24 -0500 Subject: [PATCH 1/3] fix(bench): update std options format --- src/bench/codepoint-width.zig | 4 ++-- src/bench/grapheme-break.zig | 4 ++-- src/bench/stream.zig | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bench/codepoint-width.zig b/src/bench/codepoint-width.zig index c6b11c72d..ce44bccb0 100644 --- a/src/bench/codepoint-width.zig +++ b/src/bench/codepoint-width.zig @@ -56,8 +56,8 @@ const Mode = enum { table, }; -pub const std_options = struct { - pub const log_level: std.log.Level = .debug; +pub const std_options: std.Options = .{ + .log_level = .debug, }; pub fn main() !void { diff --git a/src/bench/grapheme-break.zig b/src/bench/grapheme-break.zig index 7decd525d..bbe2171d5 100644 --- a/src/bench/grapheme-break.zig +++ b/src/bench/grapheme-break.zig @@ -48,8 +48,8 @@ const Mode = enum { table, }; -pub const std_options = struct { - pub const log_level: std.log.Level = .debug; +pub const std_options: std.Options = .{ + .log_level = .debug, }; pub fn main() !void { diff --git a/src/bench/stream.zig b/src/bench/stream.zig index 61a0b4318..5312a3d0e 100644 --- a/src/bench/stream.zig +++ b/src/bench/stream.zig @@ -70,8 +70,8 @@ const Mode = enum { @"gen-rand", }; -pub const std_options = struct { - pub const log_level: std.log.Level = .debug; +pub const std_options: std.Options = .{ + .log_level = .debug, }; pub fn main() !void { From 615482d2d34368cc0c51655e6ce857ec0e19ed34 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 10 Feb 2024 19:32:14 -0800 Subject: [PATCH 2/3] ci: build benchmarks --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7a93b83f..28305f2c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,6 +40,25 @@ jobs: - name: Test Build run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }} + build-bench: + runs-on: namespace-profile-ghostty-md + needs: test + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # Install Nix and use that to run our tests so our environment matches exactly. + - uses: cachix/install-nix-action@v24 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: ghostty + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + + - name: Build Benchmarks + run: nix develop -c zig build -Dapp-runtime=glfw -Demit-bench + build-linux-libghostty: runs-on: namespace-profile-ghostty-md needs: test From 0c741828734358d101f6b86336fe714e24736618 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 10 Feb 2024 19:42:25 -0800 Subject: [PATCH 3/3] ci: build bench on larger instance --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28305f2c0..a70452fc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,8 @@ jobs: run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }} build-bench: - runs-on: namespace-profile-ghostty-md + # We build benchmarks on large because it uses ReleaseFast + runs-on: namespace-profile-ghostty-lg needs: test steps: - name: Checkout code