mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
CI: drone: simplify
Instead of a switch in a bash file we just properly name the pipeline steps. Also use zig build to produce the release artifact.
This commit is contained in:
parent
5b486b1851
commit
28e95b3240
@ -13,65 +13,65 @@ steps:
|
||||
commands:
|
||||
- ./ci/drone/linux_script_build
|
||||
|
||||
- name: test-1
|
||||
- name: behavior
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 1
|
||||
- ./ci/drone/test_linux_behavior
|
||||
|
||||
- name: test-2
|
||||
- name: std_Debug
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 2
|
||||
- ./ci/drone/test_linux_std_Debug
|
||||
|
||||
- name: test-3
|
||||
- name: std_ReleaseSafe
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 3
|
||||
- ./ci/drone/test_linux_std_ReleaseSafe
|
||||
|
||||
- name: test-4
|
||||
- name: std_ReleaseFast
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 4
|
||||
- ./ci/drone/test_linux_std_ReleaseFast
|
||||
|
||||
- name: test-5
|
||||
- name: std_ReleaseSmall
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 5
|
||||
- ./ci/drone/test_linux_std_ReleaseSmall
|
||||
|
||||
- name: test-6
|
||||
- name: misc
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 6
|
||||
- ./ci/drone/test_linux_misc
|
||||
|
||||
- name: test-7
|
||||
- name: cases
|
||||
depends_on:
|
||||
- build
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
commands:
|
||||
- ./ci/drone/linux_script_test 7
|
||||
- ./ci/drone/test_linux_cases
|
||||
|
||||
- name: finalize
|
||||
depends_on:
|
||||
- build
|
||||
- test-1
|
||||
- test-2
|
||||
- test-3
|
||||
- test-4
|
||||
- test-5
|
||||
- test-6
|
||||
- test-7
|
||||
- behavior
|
||||
- std_Debug
|
||||
- std_ReleaseSafe
|
||||
- std_ReleaseFast
|
||||
- std_ReleaseSmall
|
||||
- misc
|
||||
- cases
|
||||
image: ziglang/static-base:llvm14-aarch64-3
|
||||
environment:
|
||||
SRHT_OAUTH_TOKEN:
|
||||
|
||||
@ -42,7 +42,6 @@ git fetch --tags
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX="$DISTDIR" \
|
||||
-DCMAKE_PREFIX_PATH="$PREFIX" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_AR="$PREFIX/bin/ar" \
|
||||
@ -58,8 +57,11 @@ unset CC
|
||||
unset CXX
|
||||
samu install
|
||||
|
||||
# Here we rebuild Zig but this time using the Zig binary we just now produced to
|
||||
# build zig1.o rather than relying on the one built with stage0. See
|
||||
# https://github.com/ziglang/zig/issues/6830 for more details.
|
||||
cmake .. -DZIG_EXECUTABLE="$DISTDIR/bin/zig"
|
||||
samu install
|
||||
stage2/bin/zig build \
|
||||
--prefix "$DISTDIR" \
|
||||
--search-prefix "$PREFIX" \
|
||||
-Dstatic-llvm \
|
||||
-Drelease \
|
||||
-Dstrip \
|
||||
-Dtarget="$TARGET" \
|
||||
-Denable-stage1
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
BUILD_FLAGS="-Dskip-non-native"
|
||||
|
||||
case "$1" in
|
||||
1)
|
||||
./build/zig build $BUILD_FLAGS test-behavior
|
||||
./build/zig build $BUILD_FLAGS test-compiler-rt
|
||||
./build/zig build $BUILD_FLAGS test-fmt
|
||||
./build/zig build $BUILD_FLAGS docs
|
||||
;;
|
||||
2)
|
||||
# Debug
|
||||
./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
|
||||
;;
|
||||
3)
|
||||
# ReleaseSafe
|
||||
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
|
||||
;;
|
||||
4)
|
||||
# ReleaseFast
|
||||
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
|
||||
;;
|
||||
5)
|
||||
# ReleaseSmall
|
||||
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast
|
||||
;;
|
||||
6)
|
||||
./build/zig build $BUILD_FLAGS test-universal-libc
|
||||
./build/zig build $BUILD_FLAGS test-compare-output
|
||||
./build/zig build $BUILD_FLAGS test-standalone -Dskip-release-safe
|
||||
./build/zig build $BUILD_FLAGS test-stack-traces
|
||||
./build/zig build $BUILD_FLAGS test-cli
|
||||
./build/zig build $BUILD_FLAGS test-asm-link
|
||||
./build/zig build $BUILD_FLAGS test-translate-c
|
||||
;;
|
||||
7)
|
||||
./build/zig build $BUILD_FLAGS # test building self-hosted without LLVM
|
||||
./build/zig build $BUILD_FLAGS test-cases
|
||||
;;
|
||||
'')
|
||||
echo "error: expecting test group argument"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "error: unknown test group: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
8
ci/drone/test_linux_behavior
Executable file
8
ci/drone/test_linux_behavior
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-behavior -Dskip-non-native
|
||||
./build/zig build test-compiler-rt -Dskip-non-native
|
||||
./build/zig build test-fmt
|
||||
./build/zig build docs
|
||||
6
ci/drone/test_linux_cases
Executable file
6
ci/drone/test_linux_cases
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build -Dskip-non-native # test building self-hosted without LLVM
|
||||
./build/zig build -Dskip-non-native test-cases
|
||||
11
ci/drone/test_linux_misc
Executable file
11
ci/drone/test_linux_misc
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-universal-libc -Dskip-non-native
|
||||
./build/zig build test-compare-output -Dskip-non-native
|
||||
./build/zig build test-standalone -Dskip-non-native -Dskip-release-safe
|
||||
./build/zig build test-stack-traces -Dskip-non-native
|
||||
./build/zig build test-cli -Dskip-non-native
|
||||
./build/zig build test-asm-link -Dskip-non-native
|
||||
./build/zig build test-translate-c -Dskip-non-native
|
||||
5
ci/drone/test_linux_std_Debug
Executable file
5
ci/drone/test_linux_std_Debug
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small -Dskip-non-native
|
||||
5
ci/drone/test_linux_std_ReleaseFast
Executable file
5
ci/drone/test_linux_std_ReleaseFast
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
|
||||
5
ci/drone/test_linux_std_ReleaseSafe
Executable file
5
ci/drone/test_linux_std_ReleaseSafe
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small -Dskip-non-native -Dskip-single-threaded
|
||||
5
ci/drone/test_linux_std_ReleaseSmall
Executable file
5
ci/drone/test_linux_std_ReleaseSmall
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./ci/drone/linux_script_base
|
||||
|
||||
./build/zig build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast -Dskip-non-native
|
||||
Loading…
x
Reference in New Issue
Block a user