authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-10 03:04:58+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-10 03:04:58+02:00
logcb1fe0e578de6ebda4650a8404a85a3bb6e2476a
treeac564738a6ab76ddece77871d4ee19ee2a9fb3db
parenta76ce771082c3bf126e9ed745607bc8dadb56c61
parentc461befcf95699ec9d1d5e68fd1a87f1c520d497

Merge pull request 'ci: build/run all darwin module tests on `aarch64-macos`' (#35256) from alexrp/zig:maccatalyst-ci into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35256

10 files changed, 38 insertions(+), 2 deletions(-)

ci/aarch64-macos-debug.sh+7-1
......@@ -48,7 +48,13 @@ stage3-debug/bin/zig build test docs \
4848 --zig-lib-dir "$PWD/../lib" \
4949 -Denable-macos-sdk \
5050 -Dstatic-llvm \
51 -Dskip-non-native \
51 -Dskip-spirv \
52 -Dskip-wasm \
53 -Dskip-linux \
54 -Dskip-freebsd \
55 -Dskip-netbsd \
56 -Dskip-openbsd \
57 -Dskip-windows \
5258 --search-prefix "$PREFIX" \
5359 --test-timeout 2m
5460
ci/aarch64-macos-release.sh+7-1
......@@ -47,7 +47,13 @@ stage3-release/bin/zig build test docs \
4747 --zig-lib-dir "$PWD/../lib" \
4848 -Denable-macos-sdk \
4949 -Dstatic-llvm \
50 -Dskip-non-native \
50 -Dskip-spirv \
51 -Dskip-wasm \
52 -Dskip-linux \
53 -Dskip-freebsd \
54 -Dskip-netbsd \
55 -Dskip-openbsd \
56 -Dskip-windows \
5157 --search-prefix "$PREFIX" \
5258 --test-timeout 2m
5359
lib/std/math/acos.zig+4
......@@ -337,6 +337,8 @@ fn acosBinary128(x: f128) f128 {
337337}
338338
339339test "acosBinary16.special" {
340 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
341
340342 try testing.expectApproxEqAbs(0x1.92p0, acosBinary16(0x0p+0), math.floatEpsAt(f16, 0x1.92p0));
341343 try testing.expectApproxEqAbs(0x1.92p1, acosBinary16(-0x1p+0), math.floatEpsAt(f16, 0x1.92p1));
342344 try testing.expectEqual(0x0p+0, acosBinary16(0x1p+0));
......@@ -348,6 +350,8 @@ test "acosBinary16.special" {
348350}
349351
350352test "acosBinary16" {
353 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
354
351355 try testing.expectApproxEqAbs(0x1.834p0, acosBinary16(0x1.db4p-5), math.floatEpsAt(f16, 0x1.834p0));
352356 try testing.expectApproxEqAbs(0x1.d48p0, acosBinary16(-0x1.068p-2), math.floatEpsAt(f16, 0x1.d48p0));
353357 try testing.expectApproxEqAbs(0x1.b7cp0, acosBinary16(-0x1.2c4p-3), math.floatEpsAt(f16, 0x1.b7cp0));
lib/std/math/asin.zig+4
......@@ -326,6 +326,8 @@ fn asinBinary128(x: f128) f128 {
326326}
327327
328328test "asinBinary16.special" {
329 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
330
329331 try testing.expectApproxEqAbs(0x1.92p0, asinBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p0));
330332 try testing.expectApproxEqAbs(-0x1.92p0, asinBinary16(-0x1p+0), math.floatEpsAt(f16, -0x1.92p0));
331333 try testing.expectEqual(0x0p+0, asinBinary16(0x0p+0));
......@@ -338,6 +340,8 @@ test "asinBinary16.special" {
338340}
339341
340342test "asinBinary16" {
343 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
344
341345 try testing.expectApproxEqAbs(-0x1.e4cp-6, asinBinary16(-0x1.e4cp-6), math.floatEpsAt(f16, -0x1.e4cp-6));
342346 try testing.expectApproxEqAbs(0x1.2a8p0, asinBinary16(0x1.d68p-1), math.floatEpsAt(f16, 0x1.2a8p0));
343347 try testing.expectApproxEqAbs(-0x1.eep-1, asinBinary16(-0x1.a4cp-1), math.floatEpsAt(f16, -0x1.eep-1));
lib/std/math/atan.zig+5
......@@ -11,6 +11,7 @@
1111// https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atanf.c
1212// https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atan.c
1313
14const builtin = @import("builtin");
1415const std = @import("../std.zig");
1516const math = std.math;
1617const mem = std.mem;
......@@ -480,6 +481,8 @@ fn atanBinary128(x: f128) f128 {
480481}
481482
482483test "atanBinary16.special" {
484 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
485
483486 try testing.expectEqual(0x0p+0, atanBinary16(0x0p+0));
484487 try testing.expectEqual(-0x0p+0, atanBinary16(-0x0p+0));
485488 try testing.expectApproxEqAbs(0x1.92p-1, atanBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p-1));
......@@ -490,6 +493,8 @@ test "atanBinary16.special" {
490493}
491494
492495test "atanBinary16" {
496 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
497
493498 try testing.expectApproxEqAbs(-0x1.74cp-2, atanBinary16(-0x1.864p-2), math.floatEpsAt(f16, -0x1.74cp-2));
494499 try testing.expectApproxEqAbs(-0x1.374p0, atanBinary16(-0x1.59cp1), math.floatEpsAt(f16, -0x1.374p0));
495500 try testing.expectApproxEqAbs(-0x1.11cp0, atanBinary16(-0x1.d2cp0), math.floatEpsAt(f16, -0x1.11cp0));
lib/std/math/hypot.zig+4
......@@ -98,7 +98,9 @@ test hypot {
9898}
9999
100100test "hypot.correct" {
101 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
101102 if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869
103
102104 inline for (.{ f16, f32, f64, f128 }) |T| {
103105 inline for (hypot_test_cases) |v| {
104106 const a: T, const b: T, const c: T = v;
......@@ -108,7 +110,9 @@ test "hypot.correct" {
108110}
109111
110112test "hypot.precise" {
113 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
111114 if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869
115
112116 inline for (.{ f16, f32, f64 }) |T| { // f128 seems to be 5 ulp
113117 inline for (hypot_test_cases) |v| {
114118 const a: T, const b: T, const c: T = v;
test/behavior/cast.zig+1
......@@ -1722,6 +1722,7 @@ test "cast f16 to wider types" {
17221722 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
17231723 if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
17241724 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
1725 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
17251726
17261727 const S = struct {
17271728 fn doTheTest() !void {
test/behavior/vector.zig+1
......@@ -278,6 +278,7 @@ test "array to vector with element type coercion" {
278278 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
279279 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
280280 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
281 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
281282
282283 const S = struct {
283284 fn doTheTest() !void {
test/behavior/widening.zig+1
......@@ -42,6 +42,7 @@ test "float widening" {
4242 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
4343 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
4444 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
45 if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
4546
4647 var a: f16 = 12.34;
4748 var b: f32 = a;
test/tests.zig+4
......@@ -2722,6 +2722,10 @@ fn addOneModuleTest(
27222722 // Don't run spirv binaries
27232723 _ = these_tests.getEmittedBin();
27242724 step.dependOn(&these_tests.step);
2725 } else if (target.cpu.arch == .x86_64 and target.os.tag.isDarwin()) {
2726 // https://codeberg.org/ziglang/zig/issues/35267
2727 _ = these_tests.getEmittedBin();
2728 step.dependOn(&these_tests.step);
27252729 } else {
27262730 const run = b.addRunArtifact(these_tests);
27272731 run.skip_foreign_checks = true;