| author | |
| committer | |
| log | 28e95b324027e08be4f0dd48772970254299b976 |
| tree | 3310ffbf41d20de9fefdd72a445e1bd3d61d98c2 |
| parent | 5b486b1851ce3ee930236653fc0f8b0ec3eef5e6 |
Instead of a switch in a bash file we just properly name
the pipeline steps.
Also use zig build to produce the release artifact.10 files changed, 74 insertions(+), 78 deletions(-)
ci/drone/drone.yml+21-21| ... | ... | @@ -13,65 +13,65 @@ steps: |
| 13 | 13 | commands: |
| 14 | 14 | - ./ci/drone/linux_script_build |
| 15 | 15 | |
| 16 | - name: test-1 | |
| 16 | - name: behavior | |
| 17 | 17 | depends_on: |
| 18 | 18 | - build |
| 19 | 19 | image: ziglang/static-base:llvm14-aarch64-3 |
| 20 | 20 | commands: |
| 21 | - ./ci/drone/linux_script_test 1 | |
| 21 | - ./ci/drone/test_linux_behavior | |
| 22 | 22 | |
| 23 | - name: test-2 | |
| 23 | - name: std_Debug | |
| 24 | 24 | depends_on: |
| 25 | 25 | - build |
| 26 | 26 | image: ziglang/static-base:llvm14-aarch64-3 |
| 27 | 27 | commands: |
| 28 | - ./ci/drone/linux_script_test 2 | |
| 28 | - ./ci/drone/test_linux_std_Debug | |
| 29 | 29 | |
| 30 | - name: test-3 | |
| 30 | - name: std_ReleaseSafe | |
| 31 | 31 | depends_on: |
| 32 | 32 | - build |
| 33 | 33 | image: ziglang/static-base:llvm14-aarch64-3 |
| 34 | 34 | commands: |
| 35 | - ./ci/drone/linux_script_test 3 | |
| 35 | - ./ci/drone/test_linux_std_ReleaseSafe | |
| 36 | 36 | |
| 37 | - name: test-4 | |
| 37 | - name: std_ReleaseFast | |
| 38 | 38 | depends_on: |
| 39 | 39 | - build |
| 40 | 40 | image: ziglang/static-base:llvm14-aarch64-3 |
| 41 | 41 | commands: |
| 42 | - ./ci/drone/linux_script_test 4 | |
| 42 | - ./ci/drone/test_linux_std_ReleaseFast | |
| 43 | 43 | |
| 44 | - name: test-5 | |
| 44 | - name: std_ReleaseSmall | |
| 45 | 45 | depends_on: |
| 46 | 46 | - build |
| 47 | 47 | image: ziglang/static-base:llvm14-aarch64-3 |
| 48 | 48 | commands: |
| 49 | - ./ci/drone/linux_script_test 5 | |
| 49 | - ./ci/drone/test_linux_std_ReleaseSmall | |
| 50 | 50 | |
| 51 | - name: test-6 | |
| 51 | - name: misc | |
| 52 | 52 | depends_on: |
| 53 | 53 | - build |
| 54 | 54 | image: ziglang/static-base:llvm14-aarch64-3 |
| 55 | 55 | commands: |
| 56 | - ./ci/drone/linux_script_test 6 | |
| 56 | - ./ci/drone/test_linux_misc | |
| 57 | 57 | |
| 58 | - name: test-7 | |
| 58 | - name: cases | |
| 59 | 59 | depends_on: |
| 60 | 60 | - build |
| 61 | 61 | image: ziglang/static-base:llvm14-aarch64-3 |
| 62 | 62 | commands: |
| 63 | - ./ci/drone/linux_script_test 7 | |
| 63 | - ./ci/drone/test_linux_cases | |
| 64 | 64 | |
| 65 | 65 | - name: finalize |
| 66 | 66 | depends_on: |
| 67 | 67 | - build |
| 68 | - test-1 | |
| 69 | - test-2 | |
| 70 | - test-3 | |
| 71 | - test-4 | |
| 72 | - test-5 | |
| 73 | - test-6 | |
| 74 | - test-7 | |
| 68 | - behavior | |
| 69 | - std_Debug | |
| 70 | - std_ReleaseSafe | |
| 71 | - std_ReleaseFast | |
| 72 | - std_ReleaseSmall | |
| 73 | - misc | |
| 74 | - cases | |
| 75 | 75 | image: ziglang/static-base:llvm14-aarch64-3 |
| 76 | 76 | environment: |
| 77 | 77 | SRHT_OAUTH_TOKEN: |
ci/drone/linux_script_build+8-6| ... | ... | @@ -42,7 +42,6 @@ git fetch --tags |
| 42 | 42 | mkdir build |
| 43 | 43 | cd build |
| 44 | 44 | cmake .. \ |
| 45 | -DCMAKE_INSTALL_PREFIX="$DISTDIR" \ | |
| 46 | 45 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 47 | 46 | -DCMAKE_BUILD_TYPE=Release \ |
| 48 | 47 | -DCMAKE_AR="$PREFIX/bin/ar" \ |
| ... | ... | @@ -58,8 +57,11 @@ unset CC |
| 58 | 57 | unset CXX |
| 59 | 58 | samu install |
| 60 | 59 | |
| 61 | # Here we rebuild Zig but this time using the Zig binary we just now produced to | |
| 62 | # build zig1.o rather than relying on the one built with stage0. See | |
| 63 | # https://github.com/ziglang/zig/issues/6830 for more details. | |
| 64 | cmake .. -DZIG_EXECUTABLE="$DISTDIR/bin/zig" | |
| 65 | samu install | |
| 60 | stage2/bin/zig build \ | |
| 61 | --prefix "$DISTDIR" \ | |
| 62 | --search-prefix "$PREFIX" \ | |
| 63 | -Dstatic-llvm \ | |
| 64 | -Drelease \ | |
| 65 | -Dstrip \ | |
| 66 | -Dtarget="$TARGET" \ | |
| 67 | -Denable-stage1 |
ci/drone/linux_script_test deleted-51| ... | ... | @@ -1,51 +0,0 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | BUILD_FLAGS="-Dskip-non-native" | |
| 6 | ||
| 7 | case "$1" in | |
| 8 | 1) | |
| 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 | |
| 13 | ;; | |
| 14 | 2) | |
| 15 | # Debug | |
| 16 | ./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small | |
| 17 | ;; | |
| 18 | 3) | |
| 19 | # ReleaseSafe | |
| 20 | ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small -Dskip-non-native -Dskip-single-threaded | |
| 21 | ;; | |
| 22 | 4) | |
| 23 | # ReleaseFast | |
| 24 | ./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small -Dskip-non-native -Dskip-single-threaded | |
| 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-universal-libc | |
| 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-translate-c | |
| 38 | ;; | |
| 39 | 7) | |
| 40 | ./build/zig build $BUILD_FLAGS # test building self-hosted without LLVM | |
| 41 | ./build/zig build $BUILD_FLAGS test-cases | |
| 42 | ;; | |
| 43 | '') | |
| 44 | echo "error: expecting test group argument" | |
| 45 | exit 1 | |
| 46 | ;; | |
| 47 | *) | |
| 48 | echo "error: unknown test group: $1" | |
| 49 | exit 1 | |
| 50 | ;; | |
| 51 | esac |
ci/drone/test_linux_behavior created+8| ... | ... | @@ -0,0 +1,8 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-behavior -Dskip-non-native | |
| 6 | ./build/zig build test-compiler-rt -Dskip-non-native | |
| 7 | ./build/zig build test-fmt | |
| 8 | ./build/zig build docs |
ci/drone/test_linux_cases created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build -Dskip-non-native # test building self-hosted without LLVM | |
| 6 | ./build/zig build -Dskip-non-native test-cases |
ci/drone/test_linux_misc created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-universal-libc -Dskip-non-native | |
| 6 | ./build/zig build test-compare-output -Dskip-non-native | |
| 7 | ./build/zig build test-standalone -Dskip-non-native -Dskip-release-safe | |
| 8 | ./build/zig build test-stack-traces -Dskip-non-native | |
| 9 | ./build/zig build test-cli -Dskip-non-native | |
| 10 | ./build/zig build test-asm-link -Dskip-non-native | |
| 11 | ./build/zig build test-translate-c -Dskip-non-native |
ci/drone/test_linux_std_Debug created+5| ... | ... | @@ -0,0 +1,5 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small -Dskip-non-native |
ci/drone/test_linux_std_ReleaseFast created+5| ... | ... | @@ -0,0 +1,5 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small -Dskip-non-native -Dskip-single-threaded |
ci/drone/test_linux_std_ReleaseSafe created+5| ... | ... | @@ -0,0 +1,5 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small -Dskip-non-native -Dskip-single-threaded |
ci/drone/test_linux_std_ReleaseSmall created+5| ... | ... | @@ -0,0 +1,5 @@ |
| 1 | #!/bin/sh | |
| 2 | ||
| 3 | . ./ci/drone/linux_script_base | |
| 4 | ||
| 5 | ./build/zig build test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast -Dskip-non-native |