| author | |
| committer | |
| log | 41594c19034bc609066870f2fc5011929d820ade |
| tree | 65affeaf03ffe4174dc2d68cd6ca417082618ec6 |
| parent | b3c8c0df0dc1a23625d823a1c1878004c6b0bc9e |
| parent | 424061381b7dc9fab5a5cd04af699bc88c5f0434 |
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/313544 files changed, 154 insertions(+), 0 deletions(-)
.forgejo/workflows/ci.yaml+21| ... | ... | @@ -17,6 +17,27 @@ permissions: |
| 17 | 17 | contents: read |
| 18 | 18 | |
| 19 | 19 | jobs: |
| 20 | aarch64-freebsd-debug: | |
| 21 | runs-on: [self-hosted, aarch64-freebsd] | |
| 22 | steps: | |
| 23 | - name: Checkout | |
| 24 | uses: https://codeberg.org/ziglang/checkout@19af6bac491e2534a4687a50ee84fa7f13258d28 | |
| 25 | with: | |
| 26 | fetch-depth: 0 | |
| 27 | - name: Build and Test | |
| 28 | run: sh ci/aarch64-freebsd-debug.sh | |
| 29 | timeout-minutes: 240 | |
| 30 | aarch64-freebsd-release: | |
| 31 | runs-on: [self-hosted, aarch64-freebsd] | |
| 32 | steps: | |
| 33 | - name: Checkout | |
| 34 | uses: https://codeberg.org/ziglang/checkout@19af6bac491e2534a4687a50ee84fa7f13258d28 | |
| 35 | with: | |
| 36 | fetch-depth: 0 | |
| 37 | - name: Build and Test | |
| 38 | run: sh ci/aarch64-freebsd-release.sh | |
| 39 | timeout-minutes: 180 | |
| 40 | ||
| 20 | 41 | aarch64-linux-debug: |
| 21 | 42 | runs-on: [self-hosted, aarch64-linux] |
| 22 | 43 | steps: |
ci/aarch64-freebsd-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-freebsd-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 2m | |
| 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-freebsd-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-freebsd-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 2m | |
| 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| ... | ... | @@ -435,6 +435,7 @@ pub fn addCases(cases: *@import("tests.zig").ErrorTracesContext) void { |
| 435 | 435 | .{ .x86_64, .netbsd }, |
| 436 | 436 | .{ .x86_64, .linux }, |
| 437 | 437 | .{ .x86, .linux }, |
| 438 | .{ .aarch64, .freebsd }, | |
| 438 | 439 | .{ .aarch64, .linux }, |
| 439 | 440 | .{ .loongarch64, .linux }, |
| 440 | 441 | .{ .powerpc64le, .linux }, |