Commit 463b90b977

Andrew Kelley <andrew@ziglang.org>
2020-03-27 00:42:28
ci: fix aarch64 linux
This patch adds a workaround for #4822, disables one failing langref example, and enables the rest of the test suite. You win some, you lose some.
1 parent ab20b35
Changed files (2)
ci/drone/linux_script
@@ -15,29 +15,31 @@ pip3 install s3cmd
 # This will affect the cmake command below.
 git config core.abbrev 9
 
+# This patch is a workaround for
+# https://github.com/ziglang/zig/issues/4822
+patch <<'END_PATCH'
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -430,7 +430,6 @@ set(BUILD_LIBSTAGE2_ARGS "build-lib"
+     --cache on
+     --output-dir "${CMAKE_BINARY_DIR}"
+     ${LIBSTAGE2_RELEASE_ARG}
+-    --bundle-compiler-rt
+     -fPIC
+     -lc
+     ${LIBSTAGE2_WINDOWS_ARGS}
+END_PATCH
+
 mkdir build
 cd build
 cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local
 
 make -j$(nproc) install
-./zig build test-fmt test-behavior test-std test-compiler-rt -Dskip-release -Dskip-non-native
-# TODO test-compare-output is hitting https://github.com/ziglang/zig/issues/3526
-./zig build test-standalone test-stack-traces
-# TODO test-cli is hitting https://github.com/ziglang/zig/issues/3526
-./zig build test-asm-link test-runtime-safety
-# TODO test-translate-c is hitting https://github.com/ziglang/zig/issues/3526
-# TODO disabled until we are shipping self-hosted
-#./zig build test-gen-h
-# TODO test-compile-errors is hitting https://github.com/ziglang/zig/issues/3526
-# TODO building docs is hitting https://github.com/ziglang/zig/issues/3526
-
-# TODO full test suite:
-#./zig build test
+./zig build test -Dskip-release -Dskip-non-native
 
 if [ -z "$DRONE_PULL_REQUEST" ]; then
   mv ../LICENSE "$DISTDIR/"
-  # TODO uncomment when the docs are generated
-  # mv ../zig-cache/langref.html "$DISTDIR/"
+  mv ../zig-cache/langref.html "$DISTDIR/"
   mv "$DISTDIR/bin/zig" "$DISTDIR/"
   rmdir "$DISTDIR/bin"
 
doc/langref.html.in
@@ -4984,6 +4984,10 @@ test "implicit unsigned integer to signed integer" {
 }
 
 test "float widening" {
+    // Note: there is an open issue preventing this from working on aarch64:
+    // https://github.com/ziglang/zig/issues/3282
+    if (std.Target.current.cpu.arch == .aarch64) return error.SkipZigTest;
+
     var a: f16 = 12.34;
     var b: f32 = a;
     var c: f64 = b;