authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-10-04 14:03:49-04:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-10-04 19:18:19-04:00
log4e590fadb5367d0400fd7e192f519caf3435e07b
tree75a2704e05a316a4c557c8a5c97a653f2fa9fd20
parent65e4926c5b6ca936b460afd1d1e43474b2bc320d

ci drone: enable more testsuite

Upstream LLVM fixes #8597, no longer need `-Dskip-debug` and others. Additionally, due to the nature of drone.io server pool, it is beneficial to know which aarch64 CPU brand is in use. - drop `-Dskip-debug` and others - invoke `lscpu` prior to build - enable more testsuite consistent with ci azure - remove workaround for (already closed) #6830 closes #8597

4 files changed, 72 insertions(+), 29 deletions(-)

ci/drone/drone.yml+32
......@@ -32,12 +32,44 @@ steps:
3232 commands:
3333 - ./ci/drone/linux_script_test 3
3434
35- name: test-4
36 depends_on:
37 - build
38 image: ziglang/static-base:llvm13-aarch64-1
39 commands:
40 - ./ci/drone/linux_script_test 4
41
42- name: test-5
43 depends_on:
44 - build
45 image: ziglang/static-base:llvm13-aarch64-1
46 commands:
47 - ./ci/drone/linux_script_test 5
48
49- name: test-6
50 depends_on:
51 - build
52 image: ziglang/static-base:llvm13-aarch64-1
53 commands:
54 - ./ci/drone/linux_script_test 6
55
56- name: test-7
57 depends_on:
58 - build
59 image: ziglang/static-base:llvm13-aarch64-1
60 commands:
61 - ./ci/drone/linux_script_test 7
62
3563- name: finalize
3664 depends_on:
3765 - build
3866 - test-1
3967 - test-2
4068 - test-3
69 - test-4
70 - test-5
71 - test-6
72 - test-7
4173 image: ziglang/static-base:llvm13-aarch64-1
4274 environment:
4375 SRHT_OAUTH_TOKEN:
ci/drone/linux_script_build+7-1
......@@ -2,6 +2,13 @@
22
33. ./ci/drone/linux_script_base
44
5# Probe CPU/brand details.
6# TODO: `lscpu` is changing package names in EDGE to `util-linux-misc`
7apk update
8apk add util-linux
9echo "lscpu:"
10lscpu | sed 's,^, : ,'
11
512PREFIX="/deps/local"
613ZIG="$PREFIX/bin/zig"
714TARGET="$TRIPLEARCH-linux-musl"
......@@ -13,7 +20,6 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
1320# The `CMAKE_AR` parameter will consider any spaces to
1421# be part of the executable path rather than CLI args, so we have
1522# to create wrapper scripts for `zig ar` and zig ranlib`.
16
1723cat <<'ENDFILE' >$PREFIX/bin/ar
1824#!/bin/sh
1925/deps/local/bin/zig ar $@
ci/drone/linux_script_finalize+1-2
......@@ -13,8 +13,7 @@ pip3 install s3cmd
1313cd build
1414
1515mv ../LICENSE "$DISTDIR/"
16# docs are disabled due to: https://github.com/ziglang/zig/issues/8597
17#mv ../zig-cache/langref.html "$DISTDIR/"
16mv ../zig-cache/langref.html "$DISTDIR/"
1817mv "$DISTDIR/bin/zig" "$DISTDIR/"
1918rmdir "$DISTDIR/bin"
2019
ci/drone/linux_script_test+32-26
......@@ -2,29 +2,44 @@
22
33. ./ci/drone/linux_script_base
44
5# only release-fast builds of test suite due to: https://github.com/ziglang/zig/issues/8597
6#
7# Some test suite components will be missing because they do not support
8# forcing -OReleaseFast
9#
10# see `zig build --help` for the full list of test-* components
5BUILD_FLAGS="-Dskip-non-native"
6
117case "$1" in
128 1)
13 steps="\
14 test-stage2 \
15 test-fmt \
16 test-behavior"
9 ./build/zig build $BUILD_FLAGS test-behavior
10 ./build/zig build $BUILD_FLAGS test-compiler-rt
11 ./build/zig build $BUILD_FLAGS test-fmt
12 ./build/zig build $BUILD_FLAGS docs
1713 ;;
1814 2)
19 steps="test-std"
15 # Debug
16 ./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
2017 ;;
2118 3)
22 steps="\
23 test-compiler-rt \
24 test-minilibc \
25 test-compare-output \
26 test-translate-c \
27 test-run-translated-c"
19 # ReleaseSafe
20 ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small
21 ;;
22 4)
23 # Releasefast
24 ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small
25 ;;
26 5)
27 # ReleaseSmall
28 ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast
29 ;;
30 6)
31 ./build/zig build $BUILD_FLAGS test-minilibc
32 ./build/zig build $BUILD_FLAGS test-compare-output
33 ./build/zig build $BUILD_FLAGS test-standalone -Dskip-release-safe
34 ./build/zig build $BUILD_FLAGS test-stack-traces
35 ./build/zig build $BUILD_FLAGS test-cli
36 ./build/zig build $BUILD_FLAGS test-asm-link
37 ./build/zig build $BUILD_FLAGS test-runtime-safety
38 ./build/zig build $BUILD_FLAGS test-translate-c
39 ;;
40 7)
41 ./build/zig build $BUILD_FLAGS # test building self-hosted without LLVM
42 ./build/zig build $BUILD_FLAGS test-stage2
2843 ;;
2944 '')
3045 echo "error: expecting test group argument"
......@@ -35,12 +50,3 @@ case "$1" in
3550 exit 1
3651 ;;
3752esac
38
39# only release-fast builds of test suite due to: https://github.com/ziglang/zig/issues/8597
40./build/zig build \
41 -Drelease \
42 -Dskip-debug \
43 -Dskip-release-small \
44 -Dskip-release-safe \
45 -Dskip-non-native \
46 $steps