From baee38da4fad0de001065d8a0ecce426cb432ae4 Mon Sep 17 00:00:00 2001 From: Altagos Date: Thu, 7 May 2026 21:13:27 +0200 Subject: [PATCH] add ci pipelines --- ci/tasks/debug.yml | 24 ++++++++++++++++++++++++ ci/tasks/fast.yml | 24 ++++++++++++++++++++++++ ci/tasks/safe.yml | 24 ++++++++++++++++++++++++ ci/tasks/small.yml | 24 ++++++++++++++++++++++++ example/main.zig | 2 +- 5 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 ci/tasks/debug.yml create mode 100644 ci/tasks/fast.yml create mode 100644 ci/tasks/safe.yml create mode 100644 ci/tasks/small.yml diff --git a/ci/tasks/debug.yml b/ci/tasks/debug.yml new file mode 100644 index 0000000..2728213 --- /dev/null +++ b/ci/tasks/debug.yml @@ -0,0 +1,24 @@ +platform: linux + +image_resource: + type: registry-image + source: + repository: ghcr.io/jdx/mise + tag: latest + +inputs: + - name: pretty + +caches: + - path: /mise + - path: .cache/zig + - path: pretty/.zig-cache + +run: + dir: pretty + path: sh + args: + - -exc + - | + mise trust + zig build example -Doptimize=Debug --color off --summary all --verbose diff --git a/ci/tasks/fast.yml b/ci/tasks/fast.yml new file mode 100644 index 0000000..5310987 --- /dev/null +++ b/ci/tasks/fast.yml @@ -0,0 +1,24 @@ +platform: linux + +image_resource: + type: registry-image + source: + repository: ghcr.io/jdx/mise + tag: latest + +inputs: + - name: pretty + +caches: + - path: /mise + - path: .cache/zig + - path: pretty/.zig-cache + +run: + dir: pretty + path: sh + args: + - -exc + - | + mise trust + zig build example -Doptimize=ReleaseFast --color off --summary all --verbose diff --git a/ci/tasks/safe.yml b/ci/tasks/safe.yml new file mode 100644 index 0000000..220b65e --- /dev/null +++ b/ci/tasks/safe.yml @@ -0,0 +1,24 @@ +platform: linux + +image_resource: + type: registry-image + source: + repository: ghcr.io/jdx/mise + tag: latest + +inputs: + - name: pretty + +caches: + - path: /mise + - path: .cache/zig + - path: pretty/.zig-cache + +run: + dir: pretty + path: sh + args: + - -exc + - | + mise trust + zig build example -Doptimize=ReleaseSafe --color off --summary all --verbose diff --git a/ci/tasks/small.yml b/ci/tasks/small.yml new file mode 100644 index 0000000..e5cd187 --- /dev/null +++ b/ci/tasks/small.yml @@ -0,0 +1,24 @@ +platform: linux + +image_resource: + type: registry-image + source: + repository: ghcr.io/jdx/mise + tag: latest + +inputs: + - name: pretty + +caches: + - path: /mise + - path: .cache/zig + - path: pretty/.zig-cache + +run: + dir: pretty + path: sh + args: + - -exc + - | + mise trust + zig build example -Doptimize=ReleaseSmall --color off --summary all --verbose diff --git a/example/main.zig b/example/main.zig index 55b132f..e0a5d2b 100644 --- a/example/main.zig +++ b/example/main.zig @@ -219,7 +219,7 @@ pub fn main(init: std.process.Init) !void { str_allocated[3] = 'l'; str_allocated[4] = 'o'; - var buffer: [100]u8 = [_]u8{1} ** 100; + var buffer: [100]u8 = @splat(1); const buffer_ptr: *[100]u8 = &buffer; const buffer_many_ptr: [*]u8 = buffer_ptr; -- knotmirror 0.0.1