Skip to content

Commit 3ba70b4

Browse files
committed
fix nightly build and add current stable build to CI
1 parent b40e0f1 commit 3ba70b4

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ jobs:
4141
# Stable Zig Builds
4242
#
4343

44-
- name: Setup Zig Stable (0.14.0)
44+
- name: Setup Zig Stable (0.15.1)
4545
# note(jae): 2024-09-15
4646
# Uses download mirror first as preferred by Zig Foundation
4747
# see: https://ziglang.org/news/migrate-to-self-hosting/
4848
uses: mlugg/setup-zig@v2
4949
with:
50-
version: "0.14.0"
50+
version: "0.15.1"
5151

5252
- name: Build Minimal Example (Zig Stable)
5353
run: zig build -Dandroid=true --verbose
@@ -94,6 +94,25 @@ jobs:
9494
# adb shell monkey --kill-process-after-error --monitor-native-crashes --pct-touch 100 -p com.zig.sdl2 --throttle 1000 -v 2
9595
# working-directory: examples/sdl2
9696

97+
#
98+
# Previous Stable Zig Build
99+
#
100+
101+
- name: Setup Zig Previous Stable (0.14.0)
102+
uses: mlugg/setup-zig@v2
103+
with:
104+
version: "0.14.0"
105+
106+
- name: Build Minimal Example (Zig Stable)
107+
run: zig build -Dandroid=true --verbose
108+
working-directory: examples/minimal
109+
110+
- name: Build SDL2 Example (Zig Stable)
111+
run: |
112+
zig build -Dandroid=true --verbose
113+
zig build -Dandroid=true -Dcrash-on-exception --verbose
114+
working-directory: examples/sdl2
115+
97116
#
98117
# Nightly Zig Builds
99118
#

src/androidbuild/builtin_options_update.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,9 @@ fn make(step: *Step, _: Build.Step.MakeOptions) !void {
4343

4444
const package_name_path = builtin_options_update.package_name_stdout.getPath3(b, step);
4545

46-
// NOTE(jae): 2025-07-23
47-
// As of Zig 0.15.0-dev.1092+d772c0627, package_name_path.openFile("") is not possible as it assumes you're appending *something*
48-
const file = try package_name_path.root_dir.handle.openFile(package_name_path.sub_path, .{});
49-
5046
// Read package name from stdout and strip line feed / carriage return
5147
// ie. "com.zig.sdl2\n\r"
52-
const package_name_filedata = try file.readToEndAlloc(b.allocator, 8192);
48+
const package_name_filedata = try package_name_path.root_dir.handle.readFileAlloc(b.allocator, package_name_path.sub_path, 8192);
5349
const package_name_stripped = std.mem.trimRight(u8, package_name_filedata, " \r\n");
5450
const package_name: [:0]const u8 = try b.allocator.dupeZ(u8, package_name_stripped);
5551

0 commit comments

Comments
 (0)