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:...@@ -32,12 +32,44 @@ steps:
32 commands:32 commands:
33 - ./ci/drone/linux_script_test 333 - ./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
35- name: finalize63- name: finalize
36 depends_on:64 depends_on:
37 - build65 - build
38 - test-166 - test-1
39 - test-267 - test-2
40 - test-368 - test-3
69 - test-4
70 - test-5
71 - test-6
72 - test-7
41 image: ziglang/static-base:llvm13-aarch64-173 image: ziglang/static-base:llvm13-aarch64-1
42 environment:74 environment:
43 SRHT_OAUTH_TOKEN:75 SRHT_OAUTH_TOKEN:
ci/drone/linux_script_build+7-1
...@@ -2,6 +2,13 @@...@@ -2,6 +2,13 @@
22
3. ./ci/drone/linux_script_base3. ./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
5PREFIX="/deps/local"12PREFIX="/deps/local"
6ZIG="$PREFIX/bin/zig"13ZIG="$PREFIX/bin/zig"
7TARGET="$TRIPLEARCH-linux-musl"14TARGET="$TRIPLEARCH-linux-musl"
...@@ -13,7 +20,6 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"...@@ -13,7 +20,6 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
13# The `CMAKE_AR` parameter will consider any spaces to20# The `CMAKE_AR` parameter will consider any spaces to
14# be part of the executable path rather than CLI args, so we have21# be part of the executable path rather than CLI args, so we have
15# to create wrapper scripts for `zig ar` and zig ranlib`.22# to create wrapper scripts for `zig ar` and zig ranlib`.
16
17cat <<'ENDFILE' >$PREFIX/bin/ar23cat <<'ENDFILE' >$PREFIX/bin/ar
18#!/bin/sh24#!/bin/sh
19/deps/local/bin/zig ar $@25/deps/local/bin/zig ar $@
ci/drone/linux_script_finalize+1-2
...@@ -13,8 +13,7 @@ pip3 install s3cmd...@@ -13,8 +13,7 @@ pip3 install s3cmd
13cd build13cd build
1414
15mv ../LICENSE "$DISTDIR/"15mv ../LICENSE "$DISTDIR/"
16# docs are disabled due to: https://github.com/ziglang/zig/issues/859716mv ../zig-cache/langref.html "$DISTDIR/"
17#mv ../zig-cache/langref.html "$DISTDIR/"
18mv "$DISTDIR/bin/zig" "$DISTDIR/"17mv "$DISTDIR/bin/zig" "$DISTDIR/"
19rmdir "$DISTDIR/bin"18rmdir "$DISTDIR/bin"
2019
ci/drone/linux_script_test+32-26
...@@ -2,29 +2,44 @@...@@ -2,29 +2,44 @@
22
3. ./ci/drone/linux_script_base3. ./ci/drone/linux_script_base
44
5# only release-fast builds of test suite due to: https://github.com/ziglang/zig/issues/85975BUILD_FLAGS="-Dskip-non-native"
6#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
11case "$1" in7case "$1" in
12 1)8 1)
13 steps="\9 ./build/zig build $BUILD_FLAGS test-behavior
14 test-stage2 \10 ./build/zig build $BUILD_FLAGS test-compiler-rt
15 test-fmt \11 ./build/zig build $BUILD_FLAGS test-fmt
16 test-behavior"12 ./build/zig build $BUILD_FLAGS docs
17 ;;13 ;;
18 2)14 2)
19 steps="test-std"15 # Debug
16 ./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
20 ;;17 ;;
21 3)18 3)
22 steps="\19 # ReleaseSafe
23 test-compiler-rt \20 ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small
24 test-minilibc \21 ;;
25 test-compare-output \22 4)
26 test-translate-c \23 # Releasefast
27 test-run-translated-c"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
28 ;;43 ;;
29 '')44 '')
30 echo "error: expecting test group argument"45 echo "error: expecting test group argument"
...@@ -35,12 +50,3 @@ case "$1" in...@@ -35,12 +50,3 @@ case "$1" in
35 exit 150 exit 1
36 ;;51 ;;
37esac52esac
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