From 463b90b977ba4817f6cf90a85e8609092f53dfd2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 26 Mar 2020 19:42:28 -0400 Subject: [PATCH] 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. --- ci/drone/linux_script | 32 +++++++++++++++++--------------- doc/langref.html.in | 4 ++++ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ci/drone/linux_script b/ci/drone/linux_script index a0d2406f89..da20068480 100755 --- a/ci/drone/linux_script +++ b/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" diff --git a/doc/langref.html.in b/doc/langref.html.in index cf57aa6b13..f98b9d674f 100644 --- a/doc/langref.html.in +++ b/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;