| author | |
| committer | |
| log | ac24e6caf5a79573f16d2ccc273d907ad2199032 |
| tree | ba98bb22d2c8e3289a9d098add163e5f79c7e7c9 |
| parent | 421c3c3cc57f05bf53678ee79230c66200a69081 |
| parent | d6e9b9eb642542cd0e113a73285680b443a6a9f1 |
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/313774 files changed, 154 insertions(+), 0 deletions(-)
.forgejo/workflows/ci.yaml+21| ... | @@ -59,6 +59,27 @@ jobs: | ... | @@ -59,6 +59,27 @@ jobs: |
| 59 | run: sh ci/aarch64-linux-release.sh | 59 | run: sh ci/aarch64-linux-release.sh |
| 60 | timeout-minutes: 120 | 60 | timeout-minutes: 120 |
| 61 | 61 | ||
| 62 | aarch64-netbsd-debug: | ||
| 63 | runs-on: [self-hosted, aarch64-netbsd] | ||
| 64 | steps: | ||
| 65 | - name: Checkout | ||
| 66 | uses: https://codeberg.org/ziglang/checkout@19af6bac491e2534a4687a50ee84fa7f13258d28 | ||
| 67 | with: | ||
| 68 | fetch-depth: 0 | ||
| 69 | - name: Build and Test | ||
| 70 | run: sh ci/aarch64-netbsd-debug.sh | ||
| 71 | timeout-minutes: 300 | ||
| 72 | aarch64-netbsd-release: | ||
| 73 | runs-on: [self-hosted, aarch64-netbsd] | ||
| 74 | steps: | ||
| 75 | - name: Checkout | ||
| 76 | uses: https://codeberg.org/ziglang/checkout@19af6bac491e2534a4687a50ee84fa7f13258d28 | ||
| 77 | with: | ||
| 78 | fetch-depth: 0 | ||
| 79 | - name: Build and Test | ||
| 80 | run: sh ci/aarch64-netbsd-release.sh | ||
| 81 | timeout-minutes: 240 | ||
| 82 | |||
| 62 | aarch64-macos-debug: | 83 | aarch64-macos-debug: |
| 63 | runs-on: [self-hosted, aarch64-macos] | 84 | runs-on: [self-hosted, aarch64-macos] |
| 64 | steps: | 85 | steps: |
ci/aarch64-netbsd-debug.sh created+63| ... | @@ -0,0 +1,63 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Requires cmake ninja-build | ||
| 4 | |||
| 5 | set -x | ||
| 6 | set -e | ||
| 7 | |||
| 8 | TARGET="aarch64-netbsd-none" | ||
| 9 | MCPU="baseline" | ||
| 10 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.2287+eb3f16db5" | ||
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | ||
| 12 | ZIG="$PREFIX/bin/zig" | ||
| 13 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | ||
| 15 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 16 | # fill up space on the hard drive for no reason. | ||
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | ||
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | ||
| 19 | |||
| 20 | mkdir build-debug | ||
| 21 | cd build-debug | ||
| 22 | |||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | ||
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | ||
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | ||
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | ||
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | ||
| 32 | -DZIG_STATIC=ON \ | ||
| 33 | -DZIG_NO_LIB=ON \ | ||
| 34 | -GNinja \ | ||
| 35 | -DCMAKE_C_LINKER_DEPFILE_SUPPORTED=FALSE \ | ||
| 36 | -DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=FALSE | ||
| 37 | # https://github.com/ziglang/zig/issues/22213 | ||
| 38 | |||
| 39 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 40 | # so that installation and testing do not get affected by them. | ||
| 41 | unset CC | ||
| 42 | unset CXX | ||
| 43 | |||
| 44 | ninja install | ||
| 45 | |||
| 46 | stage3-debug/bin/zig build test docs \ | ||
| 47 | --maxrss ${ZSF_MAX_RSS:-0} \ | ||
| 48 | -Dstatic-llvm \ | ||
| 49 | -Dskip-non-native \ | ||
| 50 | -Dskip-test-incremental \ | ||
| 51 | --search-prefix "$PREFIX" \ | ||
| 52 | --zig-lib-dir "$PWD/../lib" \ | ||
| 53 | --test-timeout 4m | ||
| 54 | |||
| 55 | stage3-debug/bin/zig build \ | ||
| 56 | --prefix stage4-debug \ | ||
| 57 | -Denable-llvm \ | ||
| 58 | -Dno-lib \ | ||
| 59 | -Dtarget=$TARGET \ | ||
| 60 | -Duse-zig-libcxx \ | ||
| 61 | -Dversion-string="$(stage3-debug/bin/zig version)" | ||
| 62 | |||
| 63 | stage4-debug/bin/zig test ../test/behavior.zig | ||
ci/aarch64-netbsd-release.sh created+69| ... | @@ -0,0 +1,69 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Requires cmake ninja-build | ||
| 4 | |||
| 5 | set -x | ||
| 6 | set -e | ||
| 7 | |||
| 8 | TARGET="aarch64-netbsd-none" | ||
| 9 | MCPU="baseline" | ||
| 10 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.2287+eb3f16db5" | ||
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | ||
| 12 | ZIG="$PREFIX/bin/zig" | ||
| 13 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | ||
| 15 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 16 | # fill up space on the hard drive for no reason. | ||
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | ||
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | ||
| 19 | |||
| 20 | mkdir build-release | ||
| 21 | cd build-release | ||
| 22 | |||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | ||
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | ||
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | ||
| 29 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | ||
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | ||
| 32 | -DZIG_STATIC=ON \ | ||
| 33 | -DZIG_NO_LIB=ON \ | ||
| 34 | -GNinja \ | ||
| 35 | -DCMAKE_C_LINKER_DEPFILE_SUPPORTED=FALSE \ | ||
| 36 | -DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=FALSE | ||
| 37 | # https://github.com/ziglang/zig/issues/22213 | ||
| 38 | |||
| 39 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 40 | # so that installation and testing do not get affected by them. | ||
| 41 | unset CC | ||
| 42 | unset CXX | ||
| 43 | |||
| 44 | ninja install | ||
| 45 | |||
| 46 | stage3-release/bin/zig build test docs \ | ||
| 47 | --maxrss ${ZSF_MAX_RSS:-0} \ | ||
| 48 | -Dstatic-llvm \ | ||
| 49 | -Dskip-non-native \ | ||
| 50 | -Dskip-test-incremental \ | ||
| 51 | --search-prefix "$PREFIX" \ | ||
| 52 | --zig-lib-dir "$PWD/../lib" \ | ||
| 53 | --test-timeout 4m | ||
| 54 | |||
| 55 | # Ensure that stage3 and stage4 are byte-for-byte identical. | ||
| 56 | stage3-release/bin/zig build \ | ||
| 57 | --prefix stage4-release \ | ||
| 58 | -Denable-llvm \ | ||
| 59 | -Dno-lib \ | ||
| 60 | -Doptimize=ReleaseFast \ | ||
| 61 | -Dstrip \ | ||
| 62 | -Dtarget=$TARGET \ | ||
| 63 | -Duse-zig-libcxx \ | ||
| 64 | -Dversion-string="$(stage3-release/bin/zig version)" | ||
| 65 | |||
| 66 | # diff returns an error code if the files differ. | ||
| 67 | echo "If the following command fails, it means nondeterminism has been" | ||
| 68 | echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." | ||
| 69 | diff stage3-release/bin/zig stage4-release/bin/zig | ||
test/error_traces.zig+1| ... | @@ -436,6 +436,7 @@ pub fn addCases(cases: *@import("tests.zig").ErrorTracesContext) void { | ... | @@ -436,6 +436,7 @@ pub fn addCases(cases: *@import("tests.zig").ErrorTracesContext) void { |
| 436 | .{ .x86_64, .linux }, | 436 | .{ .x86_64, .linux }, |
| 437 | .{ .x86, .linux }, | 437 | .{ .x86, .linux }, |
| 438 | .{ .aarch64, .freebsd }, | 438 | .{ .aarch64, .freebsd }, |
| 439 | .{ .aarch64, .netbsd }, | ||
| 439 | .{ .aarch64, .linux }, | 440 | .{ .aarch64, .linux }, |
| 440 | .{ .loongarch64, .linux }, | 441 | .{ .loongarch64, .linux }, |
| 441 | .{ .powerpc64le, .linux }, | 442 | .{ .powerpc64le, .linux }, |