commit cb1fe0e578de6ebda4650a8404a85a3bb6e2476a (tree)
parent a76ce771082c3bf126e9ed745607bc8dadb56c61
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sun, 10 May 2026 03:04:58 +0200
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
Diffstat:
10 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh
@@ -48,7 +48,13 @@ stage3-debug/bin/zig build test docs \
--zig-lib-dir "$PWD/../lib" \
-Denable-macos-sdk \
-Dstatic-llvm \
- -Dskip-non-native \
+ -Dskip-spirv \
+ -Dskip-wasm \
+ -Dskip-linux \
+ -Dskip-freebsd \
+ -Dskip-netbsd \
+ -Dskip-openbsd \
+ -Dskip-windows \
--search-prefix "$PREFIX" \
--test-timeout 2m
diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh
@@ -47,7 +47,13 @@ stage3-release/bin/zig build test docs \
--zig-lib-dir "$PWD/../lib" \
-Denable-macos-sdk \
-Dstatic-llvm \
- -Dskip-non-native \
+ -Dskip-spirv \
+ -Dskip-wasm \
+ -Dskip-linux \
+ -Dskip-freebsd \
+ -Dskip-netbsd \
+ -Dskip-openbsd \
+ -Dskip-windows \
--search-prefix "$PREFIX" \
--test-timeout 2m
diff --git a/lib/std/math/acos.zig b/lib/std/math/acos.zig
@@ -337,6 +337,8 @@ fn acosBinary128(x: f128) f128 {
}
test "acosBinary16.special" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectApproxEqAbs(0x1.92p0, acosBinary16(0x0p+0), math.floatEpsAt(f16, 0x1.92p0));
try testing.expectApproxEqAbs(0x1.92p1, acosBinary16(-0x1p+0), math.floatEpsAt(f16, 0x1.92p1));
try testing.expectEqual(0x0p+0, acosBinary16(0x1p+0));
@@ -348,6 +350,8 @@ test "acosBinary16.special" {
}
test "acosBinary16" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectApproxEqAbs(0x1.834p0, acosBinary16(0x1.db4p-5), math.floatEpsAt(f16, 0x1.834p0));
try testing.expectApproxEqAbs(0x1.d48p0, acosBinary16(-0x1.068p-2), math.floatEpsAt(f16, 0x1.d48p0));
try testing.expectApproxEqAbs(0x1.b7cp0, acosBinary16(-0x1.2c4p-3), math.floatEpsAt(f16, 0x1.b7cp0));
diff --git a/lib/std/math/asin.zig b/lib/std/math/asin.zig
@@ -326,6 +326,8 @@ fn asinBinary128(x: f128) f128 {
}
test "asinBinary16.special" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectApproxEqAbs(0x1.92p0, asinBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p0));
try testing.expectApproxEqAbs(-0x1.92p0, asinBinary16(-0x1p+0), math.floatEpsAt(f16, -0x1.92p0));
try testing.expectEqual(0x0p+0, asinBinary16(0x0p+0));
@@ -338,6 +340,8 @@ test "asinBinary16.special" {
}
test "asinBinary16" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectApproxEqAbs(-0x1.e4cp-6, asinBinary16(-0x1.e4cp-6), math.floatEpsAt(f16, -0x1.e4cp-6));
try testing.expectApproxEqAbs(0x1.2a8p0, asinBinary16(0x1.d68p-1), math.floatEpsAt(f16, 0x1.2a8p0));
try testing.expectApproxEqAbs(-0x1.eep-1, asinBinary16(-0x1.a4cp-1), math.floatEpsAt(f16, -0x1.eep-1));
diff --git a/lib/std/math/atan.zig b/lib/std/math/atan.zig
@@ -11,6 +11,7 @@
// https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atanf.c
// https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atan.c
+const builtin = @import("builtin");
const std = @import("../std.zig");
const math = std.math;
const mem = std.mem;
@@ -480,6 +481,8 @@ fn atanBinary128(x: f128) f128 {
}
test "atanBinary16.special" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectEqual(0x0p+0, atanBinary16(0x0p+0));
try testing.expectEqual(-0x0p+0, atanBinary16(-0x0p+0));
try testing.expectApproxEqAbs(0x1.92p-1, atanBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p-1));
@@ -490,6 +493,8 @@ test "atanBinary16.special" {
}
test "atanBinary16" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
+
try testing.expectApproxEqAbs(-0x1.74cp-2, atanBinary16(-0x1.864p-2), math.floatEpsAt(f16, -0x1.74cp-2));
try testing.expectApproxEqAbs(-0x1.374p0, atanBinary16(-0x1.59cp1), math.floatEpsAt(f16, -0x1.374p0));
try testing.expectApproxEqAbs(-0x1.11cp0, atanBinary16(-0x1.d2cp0), math.floatEpsAt(f16, -0x1.11cp0));
diff --git a/lib/std/math/hypot.zig b/lib/std/math/hypot.zig
@@ -98,7 +98,9 @@ test hypot {
}
test "hypot.correct" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869
+
inline for (.{ f16, f32, f64, f128 }) |T| {
inline for (hypot_test_cases) |v| {
const a: T, const b: T, const c: T = v;
@@ -108,7 +110,9 @@ test "hypot.correct" {
}
test "hypot.precise" {
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869
+
inline for (.{ f16, f32, f64 }) |T| { // f128 seems to be 5 ulp
inline for (hypot_test_cases) |v| {
const a: T, const b: T, const c: T = v;
diff --git a/test/behavior/cast.zig b/test/behavior/cast.zig
@@ -1722,6 +1722,7 @@ test "cast f16 to wider types" {
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
const S = struct {
fn doTheTest() !void {
diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig
@@ -278,6 +278,7 @@ test "array to vector with element type coercion" {
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
const S = struct {
fn doTheTest() !void {
diff --git a/test/behavior/widening.zig b/test/behavior/widening.zig
@@ -42,6 +42,7 @@ test "float widening" {
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
+ if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest;
var a: f16 = 12.34;
var b: f32 = a;
diff --git a/test/tests.zig b/test/tests.zig
@@ -2722,6 +2722,10 @@ fn addOneModuleTest(
// Don't run spirv binaries
_ = these_tests.getEmittedBin();
step.dependOn(&these_tests.step);
+ } else if (target.cpu.arch == .x86_64 and target.os.tag.isDarwin()) {
+ // https://codeberg.org/ziglang/zig/issues/35267
+ _ = these_tests.getEmittedBin();
+ step.dependOn(&these_tests.step);
} else {
const run = b.addRunArtifact(these_tests);
run.skip_foreign_checks = true;