| author | |
| committer | |
| log | e5aa6fd115bb79b89c572a8cb3dd2c9713854253 |
| tree | 1dd971d0896635c0725eb63b9b1db966d97fc18d |
| parent | f1c2b30b7e269cce212d01860be0ea65a67ffe33 |
| parent | 114af83d3f01948d79263a7cf1f67175a1981a29 |
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/3679632 files changed, 332 insertions(+), 344 deletions(-)
ci/aarch64-freebsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/aarch64-freebsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -58,6 +54,7 @@ stage3-release/bin/zig build \ | ... | @@ -58,6 +54,7 @@ stage3-release/bin/zig build \ |
| 58 | -Doptimize=ReleaseFast \ | 54 | -Doptimize=ReleaseFast \ |
| 59 | -Dstrip \ | 55 | -Dstrip \ |
| 60 | -Dtarget=$TARGET \ | 56 | -Dtarget=$TARGET \ |
| 57 | -Dcpu=$MCPU \ | ||
| 61 | -Duse-zig-libcxx \ | 58 | -Duse-zig-libcxx \ |
| 62 | -Dversion-string="$(stage3-release/bin/zig version)" | 59 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 63 | 60 |
ci/aarch64-linux-debug.sh+4-10| ... | @@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH" | ... | @@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH" |
| 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 21 | 21 | ||
| 22 | mkdir build-debug | 22 | mkdir -p build-debug |
| 23 | cd build-debug | 23 | cd build-debug |
| 24 | 24 | ||
| 25 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 26 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 27 | |||
| 28 | cmake .. \ | 25 | cmake .. \ |
| 29 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 30 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 31 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 32 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 33 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 34 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 35 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 36 | -GNinja | 35 | -GNinja |
| 37 | 36 | ||
| 38 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 39 | # so that installation and testing do not get affected by them. | ||
| 40 | unset CC | ||
| 41 | unset CXX | ||
| 42 | |||
| 43 | ninja install | 37 | ninja install |
| 44 | 38 | ||
| 45 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 46 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 47 | 41 | ||
| 48 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 49 | stage3-debug/bin/zig build test docs \ | 42 | stage3-debug/bin/zig build test docs \ |
| 50 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 51 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -59,6 +52,7 @@ stage3-debug/bin/zig build \ | ... | @@ -59,6 +52,7 @@ stage3-debug/bin/zig build \ |
| 59 | -Denable-llvm \ | 52 | -Denable-llvm \ |
| 60 | -Dno-lib \ | 53 | -Dno-lib \ |
| 61 | -Dtarget=$TARGET \ | 54 | -Dtarget=$TARGET \ |
| 55 | -Dcpu=$MCPU \ | ||
| 62 | -Duse-zig-libcxx \ | 56 | -Duse-zig-libcxx \ |
| 63 | -Dversion-string="$(stage3-debug/bin/zig version)" | 57 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 64 | 58 |
ci/aarch64-linux-release.sh+4-10| ... | @@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH" | ... | @@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH" |
| 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 21 | 21 | ||
| 22 | mkdir build-release | 22 | mkdir -p build-release |
| 23 | cd build-release | 23 | cd build-release |
| 24 | 24 | ||
| 25 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 26 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 27 | |||
| 28 | cmake .. \ | 25 | cmake .. \ |
| 29 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 30 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 31 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 32 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 33 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 34 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 35 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 36 | -GNinja | 35 | -GNinja |
| 37 | 36 | ||
| 38 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 39 | # so that installation and testing do not get affected by them. | ||
| 40 | unset CC | ||
| 41 | unset CXX | ||
| 42 | |||
| 43 | ninja install | 37 | ninja install |
| 44 | 38 | ||
| 45 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 46 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 47 | 41 | ||
| 48 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 49 | stage3-release/bin/zig build test docs \ | 42 | stage3-release/bin/zig build test docs \ |
| 50 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 51 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -62,6 +55,7 @@ stage3-release/bin/zig build \ | ... | @@ -62,6 +55,7 @@ stage3-release/bin/zig build \ |
| 62 | -Doptimize=ReleaseFast \ | 55 | -Doptimize=ReleaseFast \ |
| 63 | -Dstrip \ | 56 | -Dstrip \ |
| 64 | -Dtarget=$TARGET \ | 57 | -Dtarget=$TARGET \ |
| 58 | -Dcpu=$MCPU \ | ||
| 65 | -Duse-zig-libcxx \ | 59 | -Duse-zig-libcxx \ |
| 66 | -Dversion-string="$(stage3-release/bin/zig version)" | 60 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 67 | 61 |
ci/aarch64-macos-debug.sh+5-3| ... | @@ -5,28 +5,29 @@ | ... | @@ -5,28 +5,29 @@ |
| 5 | set -x | 5 | set -x |
| 6 | set -e | 6 | set -e |
| 7 | 7 | ||
| 8 | ZIGDIR="$PWD" | ||
| 9 | TARGET="aarch64-macos-none" | 8 | TARGET="aarch64-macos-none" |
| 10 | MCPU="baseline" | 9 | MCPU="baseline" |
| 11 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | 10 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 12 | PREFIX="$HOME/$CACHE_BASENAME" | 11 | PREFIX="$HOME/$CACHE_BASENAME" |
| 13 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 14 | 13 | ||
| 14 | ZIGDIR="$PWD" | ||
| 15 | if [ ! -d "$PREFIX" ]; then | 15 | if [ ! -d "$PREFIX" ]; then |
| 16 | cd $HOME | 16 | cd $HOME |
| 17 | curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" | 17 | curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" |
| 18 | tar xf "$CACHE_BASENAME.tar.xz" | 18 | tar xf "$CACHE_BASENAME.tar.xz" |
| 19 | fi | 19 | fi |
| 20 | |||
| 21 | cd $ZIGDIR | 20 | cd $ZIGDIR |
| 22 | 21 | ||
| 22 | export PATH="$HOME/local/bin:$PATH" | ||
| 23 | |||
| 23 | # Override the cache directories because they won't actually help other CI runs | 24 | # Override the cache directories because they won't actually help other CI runs |
| 24 | # which will be testing alternate versions of zig, and ultimately would just | 25 | # which will be testing alternate versions of zig, and ultimately would just |
| 25 | # fill up space on the hard drive for no reason. | 26 | # fill up space on the hard drive for no reason. |
| 26 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 27 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 27 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 28 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 28 | 29 | ||
| 29 | mkdir build-debug | 30 | mkdir -p build-debug |
| 30 | cd build-debug | 31 | cd build-debug |
| 31 | 32 | ||
| 32 | cmake .. \ | 33 | cmake .. \ |
| ... | @@ -65,6 +66,7 @@ stage3-debug/bin/zig build \ | ... | @@ -65,6 +66,7 @@ stage3-debug/bin/zig build \ |
| 65 | -Denable-llvm \ | 66 | -Denable-llvm \ |
| 66 | -Dno-lib \ | 67 | -Dno-lib \ |
| 67 | -Dtarget=$TARGET \ | 68 | -Dtarget=$TARGET \ |
| 69 | -Dcpu=$MCPU \ | ||
| 68 | -Duse-zig-libcxx \ | 70 | -Duse-zig-libcxx \ |
| 69 | -Dversion-string="$(stage3-debug/bin/zig version)" | 71 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 70 | 72 |
ci/aarch64-macos-release.sh+5-3| ... | @@ -5,28 +5,29 @@ | ... | @@ -5,28 +5,29 @@ |
| 5 | set -x | 5 | set -x |
| 6 | set -e | 6 | set -e |
| 7 | 7 | ||
| 8 | ZIGDIR="$PWD" | ||
| 9 | TARGET="aarch64-macos-none" | 8 | TARGET="aarch64-macos-none" |
| 10 | MCPU="baseline" | 9 | MCPU="baseline" |
| 11 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | 10 | CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 12 | PREFIX="$HOME/$CACHE_BASENAME" | 11 | PREFIX="$HOME/$CACHE_BASENAME" |
| 13 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 14 | 13 | ||
| 14 | ZIGDIR="$PWD" | ||
| 15 | if [ ! -d "$PREFIX" ]; then | 15 | if [ ! -d "$PREFIX" ]; then |
| 16 | cd $HOME | 16 | cd $HOME |
| 17 | curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" | 17 | curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" |
| 18 | tar xf "$CACHE_BASENAME.tar.xz" | 18 | tar xf "$CACHE_BASENAME.tar.xz" |
| 19 | fi | 19 | fi |
| 20 | |||
| 21 | cd $ZIGDIR | 20 | cd $ZIGDIR |
| 22 | 21 | ||
| 22 | export PATH="$HOME/local/bin:$PATH" | ||
| 23 | |||
| 23 | # Override the cache directories because they won't actually help other CI runs | 24 | # Override the cache directories because they won't actually help other CI runs |
| 24 | # which will be testing alternate versions of zig, and ultimately would just | 25 | # which will be testing alternate versions of zig, and ultimately would just |
| 25 | # fill up space on the hard drive for no reason. | 26 | # fill up space on the hard drive for no reason. |
| 26 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 27 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 27 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 28 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 28 | 29 | ||
| 29 | mkdir build-release | 30 | mkdir -p build-release |
| 30 | cd build-release | 31 | cd build-release |
| 31 | 32 | ||
| 32 | cmake .. \ | 33 | cmake .. \ |
| ... | @@ -72,6 +73,7 @@ stage3-release/bin/zig build \ | ... | @@ -72,6 +73,7 @@ stage3-release/bin/zig build \ |
| 72 | -Doptimize=ReleaseFast \ | 73 | -Doptimize=ReleaseFast \ |
| 73 | -Dstrip \ | 74 | -Dstrip \ |
| 74 | -Dtarget=$TARGET \ | 75 | -Dtarget=$TARGET \ |
| 76 | -Dcpu=$MCPU \ | ||
| 75 | -Duse-zig-libcxx \ | 77 | -Duse-zig-libcxx \ |
| 76 | -Dversion-string="$(stage3-release/bin/zig version)" | 78 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 77 | 79 |
ci/aarch64-netbsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/aarch64-netbsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -58,6 +54,7 @@ stage3-release/bin/zig build \ | ... | @@ -58,6 +54,7 @@ stage3-release/bin/zig build \ |
| 58 | -Doptimize=ReleaseFast \ | 54 | -Doptimize=ReleaseFast \ |
| 59 | -Dstrip \ | 55 | -Dstrip \ |
| 60 | -Dtarget=$TARGET \ | 56 | -Dtarget=$TARGET \ |
| 57 | -Dcpu=$MCPU \ | ||
| 61 | -Duse-zig-libcxx \ | 58 | -Duse-zig-libcxx \ |
| 62 | -Dversion-string="$(stage3-release/bin/zig version)" | 59 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 63 | 60 |
ci/aarch64-openbsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/aarch64-openbsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -63,6 +59,7 @@ stage3-release/bin/zig build \ | ... | @@ -63,6 +59,7 @@ stage3-release/bin/zig build \ |
| 63 | -Doptimize=ReleaseFast \ | 59 | -Doptimize=ReleaseFast \ |
| 64 | -Dstrip \ | 60 | -Dstrip \ |
| 65 | -Dtarget=$TARGET \ | 61 | -Dtarget=$TARGET \ |
| 62 | -Dcpu=$MCPU \ | ||
| 66 | -Duse-zig-libcxx \ | 63 | -Duse-zig-libcxx \ |
| 67 | -Dversion-string="$(stage3-release/bin/zig version)" | 64 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 68 | 65 |
ci/aarch64-windows-debug.ps1 created+72| ... | @@ -0,0 +1,72 @@ | ||
| 1 | $TARGET = "aarch64-windows-gnu" | ||
| 2 | $MCPU = "baseline" | ||
| 3 | $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ||
| 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" | ||
| 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } | ||
| 6 | |||
| 7 | $Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" | ||
| 8 | |||
| 9 | function CheckLastExitCode { | ||
| 10 | if (!$?) { | ||
| 11 | exit 1 | ||
| 12 | } | ||
| 13 | return 0 | ||
| 14 | } | ||
| 15 | |||
| 16 | # Override the cache directories because they won't actually help other CI runs | ||
| 17 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 18 | # fill up space on the hard drive for no reason. | ||
| 19 | $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" | ||
| 20 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" | ||
| 21 | |||
| 22 | Write-Output "Building from source..." | ||
| 23 | New-Item -Force -Path 'build-debug' -ItemType Directory | ||
| 24 | Set-Location -Path 'build-debug' | ||
| 25 | |||
| 26 | # CMake gives a syntax error when file paths with backward slashes are used. | ||
| 27 | # Here, we use forward slashes only to work around this. | ||
| 28 | cmake .. ` | ||
| 29 | -GNinja ` | ||
| 30 | -DCMAKE_INSTALL_PREFIX="stage3-debug" ` | ||
| 31 | -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` | ||
| 32 | -DCMAKE_BUILD_TYPE=Debug ` | ||
| 33 | -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 34 | -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 35 | -DCMAKE_AR="$($ZIG -Replace "\\", "/")" ` | ||
| 36 | -DZIG_AR_WORKAROUND=ON ` | ||
| 37 | -DZIG_TARGET_TRIPLE="$TARGET" ` | ||
| 38 | -DZIG_TARGET_MCPU="$MCPU" ` | ||
| 39 | -DZIG_STATIC=ON ` | ||
| 40 | -DZIG_NO_LIB=ON | ||
| 41 | CheckLastExitCode | ||
| 42 | |||
| 43 | ninja install | ||
| 44 | CheckLastExitCode | ||
| 45 | |||
| 46 | # Must be done after zig cc is finished. | ||
| 47 | $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" | ||
| 48 | |||
| 49 | Write-Output "Main test suite..." | ||
| 50 | stage3-debug\bin\zig.exe build test docs ` | ||
| 51 | --maxrss $ZSF_MAX_RSS ` | ||
| 52 | --search-prefix "$PREFIX_PATH" ` | ||
| 53 | -Dstatic-llvm ` | ||
| 54 | -Dskip-non-native ` | ||
| 55 | -Denable-symlinks-windows ` | ||
| 56 | --test-timeout 30m | ||
| 57 | CheckLastExitCode | ||
| 58 | |||
| 59 | Write-Output "Build and test stage4..." | ||
| 60 | stage3-debug\bin\zig.exe build ` | ||
| 61 | --prefix stage4-debug ` | ||
| 62 | -Denable-llvm ` | ||
| 63 | -Dno-lib ` | ||
| 64 | -Doptimize=Debug ` | ||
| 65 | -Dtarget="$TARGET" ` | ||
| 66 | -Dcpu="$MCPU" ` | ||
| 67 | -Duse-zig-libcxx ` | ||
| 68 | -Dversion-string="$(stage3-debug\bin\zig.exe version)" | ||
| 69 | CheckLastExitCode | ||
| 70 | |||
| 71 | stage4-debug\bin\zig.exe test ..\test\behavior.zig | ||
| 72 | CheckLastExitCode | ||
ci/aarch64-windows-release.ps1 created+84| ... | @@ -0,0 +1,84 @@ | ||
| 1 | $TARGET = "aarch64-windows-gnu" | ||
| 2 | $MCPU = "baseline" | ||
| 3 | $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ||
| 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" | ||
| 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } | ||
| 6 | |||
| 7 | $Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" | ||
| 8 | |||
| 9 | function CheckLastExitCode { | ||
| 10 | if (!$?) { | ||
| 11 | exit 1 | ||
| 12 | } | ||
| 13 | return 0 | ||
| 14 | } | ||
| 15 | |||
| 16 | # Override the cache directories because they won't actually help other CI runs | ||
| 17 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 18 | # fill up space on the hard drive for no reason. | ||
| 19 | $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" | ||
| 20 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" | ||
| 21 | |||
| 22 | Write-Output "Building from source..." | ||
| 23 | New-Item -Force -Path 'build-release' -ItemType Directory | ||
| 24 | Set-Location -Path 'build-release' | ||
| 25 | |||
| 26 | # CMake gives a syntax error when file paths with backward slashes are used. | ||
| 27 | # Here, we use forward slashes only to work around this. | ||
| 28 | cmake .. ` | ||
| 29 | -GNinja ` | ||
| 30 | -DCMAKE_INSTALL_PREFIX="stage3-release" ` | ||
| 31 | -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` | ||
| 32 | -DCMAKE_BUILD_TYPE=Release ` | ||
| 33 | -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 34 | -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 35 | -DCMAKE_AR="$($ZIG -Replace "\\", "/")" ` | ||
| 36 | -DZIG_AR_WORKAROUND=ON ` | ||
| 37 | -DZIG_TARGET_TRIPLE="$TARGET" ` | ||
| 38 | -DZIG_TARGET_MCPU="$MCPU" ` | ||
| 39 | -DZIG_STATIC=ON ` | ||
| 40 | -DZIG_NO_LIB=ON | ||
| 41 | CheckLastExitCode | ||
| 42 | |||
| 43 | ninja install | ||
| 44 | CheckLastExitCode | ||
| 45 | |||
| 46 | # Must be done after zig cc is finished. | ||
| 47 | $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" | ||
| 48 | |||
| 49 | Write-Output "Main test suite..." | ||
| 50 | stage3-release\bin\zig.exe build test docs ` | ||
| 51 | --maxrss $ZSF_MAX_RSS ` | ||
| 52 | --search-prefix "$PREFIX_PATH" ` | ||
| 53 | -Dstatic-llvm ` | ||
| 54 | -Dskip-non-native ` | ||
| 55 | -Denable-symlinks-windows ` | ||
| 56 | --test-timeout 30m | ||
| 57 | CheckLastExitCode | ||
| 58 | |||
| 59 | # Ensure that the fuzzer at least compiles. | ||
| 60 | # https://codeberg.org/ziglang/zig/issues/31893 | ||
| 61 | # stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe | ||
| 62 | # CheckLastExitCode | ||
| 63 | # stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug | ||
| 64 | # CheckLastExitCode | ||
| 65 | |||
| 66 | # Ensure that stage3 and stage4 are byte-for-byte identical. | ||
| 67 | Write-Output "Build and compare stage4..." | ||
| 68 | stage3-release\bin\zig.exe build ` | ||
| 69 | --prefix stage4-release ` | ||
| 70 | -Denable-llvm ` | ||
| 71 | -Dno-lib ` | ||
| 72 | -Doptimize=ReleaseFast ` | ||
| 73 | -Dstrip ` | ||
| 74 | -Dtarget="$TARGET" ` | ||
| 75 | -Dcpu="$MCPU" ` | ||
| 76 | -Duse-zig-libcxx ` | ||
| 77 | -Dversion-string="$(stage3-release\bin\zig.exe version)" | ||
| 78 | CheckLastExitCode | ||
| 79 | |||
| 80 | # Compare-Object returns an error code if the files differ. | ||
| 81 | Write-Output "If the following command fails, it means nondeterminism has been" | ||
| 82 | Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical." | ||
| 83 | Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe) | ||
| 84 | CheckLastExitCode | ||
ci/aarch64-windows.ps1 deleted-85| ... | @@ -1,85 +0,0 @@ | ||
| 1 | $TARGET = "aarch64-windows-gnu" | ||
| 2 | $ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ||
| 3 | $MCPU = "baseline" | ||
| 4 | $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip" | ||
| 5 | $PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME" | ||
| 6 | $ZIG = "$PREFIX_PATH\bin\zig.exe" | ||
| 7 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } | ||
| 8 | |||
| 9 | if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) { | ||
| 10 | Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL" | ||
| 11 | Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "..\$ZIG_LLVM_CLANG_LLD_NAME.zip" | ||
| 12 | |||
| 13 | Write-Output "Extracting..." | ||
| 14 | Add-Type -AssemblyName System.IO.Compression.FileSystem ; | ||
| 15 | [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD\..\$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD\..") | ||
| 16 | } | ||
| 17 | |||
| 18 | function CheckLastExitCode { | ||
| 19 | if (!$?) { | ||
| 20 | exit 1 | ||
| 21 | } | ||
| 22 | return 0 | ||
| 23 | } | ||
| 24 | |||
| 25 | # Override the cache directories because they won't actually help other CI runs | ||
| 26 | # which will be testing alternate versions of zig, and ultimately would just | ||
| 27 | # fill up space on the hard drive for no reason. | ||
| 28 | $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" | ||
| 29 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" | ||
| 30 | |||
| 31 | Write-Output "Building from source..." | ||
| 32 | New-Item -Path 'build-release' -ItemType Directory | ||
| 33 | Set-Location -Path 'build-release' | ||
| 34 | |||
| 35 | # CMake gives a syntax error when file paths with backward slashes are used. | ||
| 36 | # Here, we use forward slashes only to work around this. | ||
| 37 | & cmake .. ` | ||
| 38 | -GNinja ` | ||
| 39 | -DCMAKE_INSTALL_PREFIX="stage3-release" ` | ||
| 40 | -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` | ||
| 41 | -DCMAKE_BUILD_TYPE=Release ` | ||
| 42 | -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 43 | -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` | ||
| 44 | -DCMAKE_AR="$ZIG" ` | ||
| 45 | -DZIG_AR_WORKAROUND=ON ` | ||
| 46 | -DZIG_TARGET_TRIPLE="$TARGET" ` | ||
| 47 | -DZIG_TARGET_MCPU="$MCPU" ` | ||
| 48 | -DZIG_STATIC=ON ` | ||
| 49 | -DZIG_NO_LIB=ON | ||
| 50 | CheckLastExitCode | ||
| 51 | |||
| 52 | ninja install | ||
| 53 | CheckLastExitCode | ||
| 54 | |||
| 55 | # Must be done after zig cc is finished. | ||
| 56 | $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" | ||
| 57 | |||
| 58 | Write-Output "Main test suite..." | ||
| 59 | & "stage3-release\bin\zig.exe" build test docs ` | ||
| 60 | --maxrss $ZSF_MAX_RSS ` | ||
| 61 | --search-prefix "$PREFIX_PATH" ` | ||
| 62 | -Dstatic-llvm ` | ||
| 63 | -Dskip-non-native ` | ||
| 64 | -Denable-symlinks-windows ` | ||
| 65 | --test-timeout 30m | ||
| 66 | CheckLastExitCode | ||
| 67 | |||
| 68 | # Ensure that stage3 and stage4 are byte-for-byte identical. | ||
| 69 | Write-Output "Build and compare stage4..." | ||
| 70 | & "stage3-release\bin\zig.exe" build ` | ||
| 71 | --prefix stage4-release ` | ||
| 72 | -Denable-llvm ` | ||
| 73 | -Dno-lib ` | ||
| 74 | -Doptimize=ReleaseFast ` | ||
| 75 | -Dstrip ` | ||
| 76 | -Dtarget="$TARGET" ` | ||
| 77 | -Duse-zig-libcxx ` | ||
| 78 | -Dversion-string="$(stage3-release\bin\zig version)" | ||
| 79 | CheckLastExitCode | ||
| 80 | |||
| 81 | # Compare-Object returns an error code if the files differ. | ||
| 82 | Write-Output "If the following command fails, it means nondeterminism has been" | ||
| 83 | Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical." | ||
| 84 | Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe) | ||
| 85 | CheckLastExitCode | ||
ci/loongarch64-linux-debug.sh+6-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-debug/bin/zig build test docs \ | 42 | stage3-debug/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -57,6 +52,7 @@ stage3-debug/bin/zig build \ | ... | @@ -57,6 +52,7 @@ stage3-debug/bin/zig build \ |
| 57 | -Denable-llvm \ | 52 | -Denable-llvm \ |
| 58 | -Dno-lib \ | 53 | -Dno-lib \ |
| 59 | -Dtarget=$TARGET \ | 54 | -Dtarget=$TARGET \ |
| 55 | -Dcpu=$MCPU \ | ||
| 60 | -Duse-zig-libcxx \ | 56 | -Duse-zig-libcxx \ |
| 61 | -Dversion-string="$(stage3-debug/bin/zig version)" | 57 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 62 | 58 |
ci/loongarch64-linux-release.sh+6-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-release/bin/zig build test docs \ | 42 | stage3-release/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -60,6 +55,7 @@ stage3-release/bin/zig build \ | ... | @@ -60,6 +55,7 @@ stage3-release/bin/zig build \ |
| 60 | -Doptimize=ReleaseFast \ | 55 | -Doptimize=ReleaseFast \ |
| 61 | -Dstrip \ | 56 | -Dstrip \ |
| 62 | -Dtarget=$TARGET \ | 57 | -Dtarget=$TARGET \ |
| 58 | -Dcpu=$MCPU \ | ||
| 63 | -Duse-zig-libcxx \ | 59 | -Duse-zig-libcxx \ |
| 64 | -Dversion-string="$(stage3-release/bin/zig version)" | 60 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 65 | 61 |
ci/powerpc64le-linux-debug.sh+5-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-debug/bin/zig build test docs \ | 42 | stage3-debug/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
ci/powerpc64le-linux-release.sh+5-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-release/bin/zig build test docs \ | 42 | stage3-release/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
ci/riscv64-linux-debug.sh+6-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-debug/bin/zig build test docs \ | 42 | stage3-debug/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -57,6 +52,7 @@ stage3-debug/bin/zig build \ | ... | @@ -57,6 +52,7 @@ stage3-debug/bin/zig build \ |
| 57 | -Denable-llvm \ | 52 | -Denable-llvm \ |
| 58 | -Dno-lib \ | 53 | -Dno-lib \ |
| 59 | -Dtarget=$TARGET \ | 54 | -Dtarget=$TARGET \ |
| 55 | -Dcpu=$MCPU \ | ||
| 60 | -Duse-zig-libcxx \ | 56 | -Duse-zig-libcxx \ |
| 61 | -Dversion-string="$(stage3-debug/bin/zig version)" | 57 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 62 | 58 |
ci/riscv64-linux-release.sh+6-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-release/bin/zig build test docs \ | 42 | stage3-release/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
| ... | @@ -60,6 +55,7 @@ stage3-release/bin/zig build \ | ... | @@ -60,6 +55,7 @@ stage3-release/bin/zig build \ |
| 60 | -Doptimize=ReleaseFast \ | 55 | -Doptimize=ReleaseFast \ |
| 61 | -Dstrip \ | 56 | -Dstrip \ |
| 62 | -Dtarget=$TARGET \ | 57 | -Dtarget=$TARGET \ |
| 58 | -Dcpu=$MCPU \ | ||
| 63 | -Duse-zig-libcxx \ | 59 | -Duse-zig-libcxx \ |
| 64 | -Dversion-string="$(stage3-release/bin/zig version)" | 60 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 65 | 61 |
ci/s390x-linux-debug.sh+5-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-debug/bin/zig build test docs \ | 42 | stage3-debug/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
ci/s390x-linux-release.sh+5-10| ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| 44 | export ZIG_LIB_DIR="$PWD/../lib" | 40 | export ZIG_LIB_DIR="$PWD/../lib" |
| 45 | 41 | ||
| 46 | # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. | ||
| 47 | stage3-release/bin/zig build test docs \ | 42 | stage3-release/bin/zig build test docs \ |
| 48 | --maxrss ${ZSF_MAX_RSS:-0} \ | 43 | --maxrss ${ZSF_MAX_RSS:-0} \ |
| 49 | -Dstatic-llvm \ | 44 | -Dstatic-llvm \ |
ci/x86_64-freebsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/x86_64-freebsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -62,6 +58,7 @@ stage3-release/bin/zig build \ | ... | @@ -62,6 +58,7 @@ stage3-release/bin/zig build \ |
| 62 | -Doptimize=ReleaseFast \ | 58 | -Doptimize=ReleaseFast \ |
| 63 | -Dstrip \ | 59 | -Dstrip \ |
| 64 | -Dtarget=$TARGET \ | 60 | -Dtarget=$TARGET \ |
| 61 | -Dcpu=$MCPU \ | ||
| 65 | -Duse-zig-libcxx \ | 62 | -Duse-zig-libcxx \ |
| 66 | -Dversion-string="$(stage3-release/bin/zig version)" | 63 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 67 | 64 |
ci/x86_64-linux-debug-llvm.sh+4-9| ... | @@ -19,16 +19,15 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ | ... | @@ -19,16 +19,15 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ |
| 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 21 | 21 | ||
| 22 | mkdir build-debug-llvm | 22 | mkdir -p build-debug-llvm |
| 23 | cd build-debug-llvm | 23 | cd build-debug-llvm |
| 24 | 24 | ||
| 25 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 26 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 27 | |||
| 28 | cmake .. \ | 25 | cmake .. \ |
| 29 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 30 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 31 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 32 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 33 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 34 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| ... | @@ -36,11 +35,6 @@ cmake .. \ | ... | @@ -36,11 +35,6 @@ cmake .. \ |
| 36 | -DZIG_EXTRA_BUILD_ARGS="-Duse-llvm=true" \ | 35 | -DZIG_EXTRA_BUILD_ARGS="-Duse-llvm=true" \ |
| 37 | -GNinja | 36 | -GNinja |
| 38 | 37 | ||
| 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 | 38 | ninja install |
| 45 | 39 | ||
| 46 | # Must be done after zig cc is finished. | 40 | # Must be done after zig cc is finished. |
| ... | @@ -75,6 +69,7 @@ stage3-debug/bin/zig build \ | ... | @@ -75,6 +69,7 @@ stage3-debug/bin/zig build \ |
| 75 | -Denable-llvm \ | 69 | -Denable-llvm \ |
| 76 | -Dno-lib \ | 70 | -Dno-lib \ |
| 77 | -Dtarget=$TARGET \ | 71 | -Dtarget=$TARGET \ |
| 72 | -Dcpu=$MCPU \ | ||
| 78 | -Duse-zig-libcxx \ | 73 | -Duse-zig-libcxx \ |
| 79 | -Dversion-string="$(stage3-debug/bin/zig version)" | 74 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 80 | 75 |
ci/x86_64-linux-debug.sh+4-9| ... | @@ -19,27 +19,21 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ | ... | @@ -19,27 +19,21 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_ |
| 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 21 | 21 | ||
| 22 | mkdir build-debug | 22 | mkdir -p build-debug |
| 23 | cd build-debug | 23 | cd build-debug |
| 24 | 24 | ||
| 25 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 26 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 27 | |||
| 28 | cmake .. \ | 25 | cmake .. \ |
| 29 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 30 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 31 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 32 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 33 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 34 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 35 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 36 | -GNinja | 35 | -GNinja |
| 37 | 36 | ||
| 38 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 39 | # so that installation and testing do not get affected by them. | ||
| 40 | unset CC | ||
| 41 | unset CXX | ||
| 42 | |||
| 43 | ninja install | 37 | ninja install |
| 44 | 38 | ||
| 45 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -74,6 +68,7 @@ stage3-debug/bin/zig build \ | ... | @@ -74,6 +68,7 @@ stage3-debug/bin/zig build \ |
| 74 | -Denable-llvm \ | 68 | -Denable-llvm \ |
| 75 | -Dno-lib \ | 69 | -Dno-lib \ |
| 76 | -Dtarget=$TARGET \ | 70 | -Dtarget=$TARGET \ |
| 71 | -Dcpu=$MCPU \ | ||
| 77 | -Duse-zig-libcxx \ | 72 | -Duse-zig-libcxx \ |
| 78 | -Dversion-string="$(stage3-debug/bin/zig version)" | 73 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 79 | 74 |
ci/x86_64-linux-release.sh+8-19| ... | @@ -25,27 +25,21 @@ cc -o bootstrap bootstrap.c | ... | @@ -25,27 +25,21 @@ cc -o bootstrap bootstrap.c |
| 25 | ./zig2 build -Dno-lib | 25 | ./zig2 build -Dno-lib |
| 26 | ./zig-out/bin/zig test test/behavior.zig | 26 | ./zig-out/bin/zig test test/behavior.zig |
| 27 | 27 | ||
| 28 | mkdir build-release | 28 | mkdir -p build-release |
| 29 | cd build-release | 29 | cd build-release |
| 30 | 30 | ||
| 31 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 32 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 33 | |||
| 34 | cmake .. \ | 31 | cmake .. \ |
| 35 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 32 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 36 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 33 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 37 | -DCMAKE_BUILD_TYPE=Release \ | 34 | -DCMAKE_BUILD_TYPE=Release \ |
| 35 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 36 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 38 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 37 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 39 | -DZIG_TARGET_MCPU="$MCPU" \ | 38 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 40 | -DZIG_STATIC=ON \ | 39 | -DZIG_STATIC=ON \ |
| 41 | -DZIG_NO_LIB=ON \ | 40 | -DZIG_NO_LIB=ON \ |
| 42 | -GNinja | 41 | -GNinja |
| 43 | 42 | ||
| 44 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 45 | # so that installation and testing do not get affected by them. | ||
| 46 | unset CC | ||
| 47 | unset CXX | ||
| 48 | |||
| 49 | ninja install | 43 | ninja install |
| 50 | 44 | ||
| 51 | # Must not be set while using the other `zig cc` which has its own zig lib dir. | 45 | # Must not be set while using the other `zig cc` which has its own zig lib dir. |
| ... | @@ -84,6 +78,7 @@ stage3-release/bin/zig build \ | ... | @@ -84,6 +78,7 @@ stage3-release/bin/zig build \ |
| 84 | -Doptimize=ReleaseFast \ | 78 | -Doptimize=ReleaseFast \ |
| 85 | -Dstrip \ | 79 | -Dstrip \ |
| 86 | -Dtarget=$TARGET \ | 80 | -Dtarget=$TARGET \ |
| 81 | -Dcpu=$MCPU \ | ||
| 87 | -Duse-zig-libcxx \ | 82 | -Duse-zig-libcxx \ |
| 88 | -Dversion-string="$(stage3-release/bin/zig version)" | 83 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 89 | 84 | ||
| ... | @@ -94,27 +89,21 @@ diff stage3-release/bin/zig stage4-release/bin/zig | ... | @@ -94,27 +89,21 @@ diff stage3-release/bin/zig stage4-release/bin/zig |
| 94 | # Ensure that updating the wasm binary from this commit will result in a viable build. | 89 | # Ensure that updating the wasm binary from this commit will result in a viable build. |
| 95 | stage3-release/bin/zig build update-zig1 | 90 | stage3-release/bin/zig build update-zig1 |
| 96 | 91 | ||
| 97 | mkdir ../build-new | 92 | mkdir -p ../build-new |
| 98 | cd ../build-new | 93 | cd ../build-new |
| 99 | 94 | ||
| 100 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 101 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 102 | unset ZIG_LIB_DIR | 95 | unset ZIG_LIB_DIR |
| 103 | 96 | ||
| 104 | cmake .. \ | 97 | cmake .. \ |
| 105 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 98 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 106 | -DCMAKE_BUILD_TYPE=Release \ | 99 | -DCMAKE_BUILD_TYPE=Release \ |
| 100 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 101 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 107 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 102 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 108 | -DZIG_TARGET_MCPU="$MCPU" \ | 103 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 109 | -DZIG_STATIC=ON \ | 104 | -DZIG_STATIC=ON \ |
| 110 | -DZIG_NO_LIB=ON \ | 105 | -DZIG_NO_LIB=ON \ |
| 111 | -GNinja \ | 106 | -GNinja |
| 112 | -DCMAKE_C_LINKER_DEPFILE_SUPPORTED=FALSE \ | ||
| 113 | -DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=FALSE | ||
| 114 | # https://github.com/ziglang/zig/issues/22213 | ||
| 115 | |||
| 116 | unset CC | ||
| 117 | unset CXX | ||
| 118 | 107 | ||
| 119 | ninja install | 108 | ninja install |
| 120 | 109 |
ci/x86_64-netbsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/x86_64-netbsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -62,6 +58,7 @@ stage3-release/bin/zig build \ | ... | @@ -62,6 +58,7 @@ stage3-release/bin/zig build \ |
| 62 | -Doptimize=ReleaseFast \ | 58 | -Doptimize=ReleaseFast \ |
| 63 | -Dstrip \ | 59 | -Dstrip \ |
| 64 | -Dtarget=$TARGET \ | 60 | -Dtarget=$TARGET \ |
| 61 | -Dcpu=$MCPU \ | ||
| 65 | -Duse-zig-libcxx \ | 62 | -Duse-zig-libcxx \ |
| 66 | -Dversion-string="$(stage3-release/bin/zig version)" | 63 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 67 | 64 |
ci/x86_64-openbsd-debug.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-debug | 22 | mkdir -p build-debug |
| 21 | cd build-debug | 23 | cd build-debug |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-debug" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Debug \ | 28 | -DCMAKE_BUILD_TYPE=Debug \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ | ... | @@ -55,6 +51,7 @@ stage3-debug/bin/zig build \ |
| 55 | -Denable-llvm \ | 51 | -Denable-llvm \ |
| 56 | -Dno-lib \ | 52 | -Dno-lib \ |
| 57 | -Dtarget=$TARGET \ | 53 | -Dtarget=$TARGET \ |
| 54 | -Dcpu=$MCPU \ | ||
| 58 | -Duse-zig-libcxx \ | 55 | -Duse-zig-libcxx \ |
| 59 | -Dversion-string="$(stage3-debug/bin/zig version)" | 56 | -Dversion-string="$(stage3-debug/bin/zig version)" |
| 60 | 57 |
ci/x86_64-openbsd-release.sh+6-9| ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" | ... | @@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" |
| 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" | 11 | PREFIX="$HOME/deps/$CACHE_BASENAME" |
| 12 | ZIG="$PREFIX/bin/zig" | 12 | ZIG="$PREFIX/bin/zig" |
| 13 | 13 | ||
| 14 | export PATH="$HOME/local/bin:$PATH" | ||
| 15 | |||
| 14 | # Override the cache directories because they won't actually help other CI runs | 16 | # 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 | 17 | # which will be testing alternate versions of zig, and ultimately would just |
| 16 | # fill up space on the hard drive for no reason. | 18 | # fill up space on the hard drive for no reason. |
| 17 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" | 19 | export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" |
| 18 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" | 20 | export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" |
| 19 | 21 | ||
| 20 | mkdir build-release | 22 | mkdir -p build-release |
| 21 | cd build-release | 23 | cd build-release |
| 22 | 24 | ||
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | ||
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | ||
| 25 | |||
| 26 | cmake .. \ | 25 | cmake .. \ |
| 27 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 26 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 28 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 27 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 29 | -DCMAKE_BUILD_TYPE=Release \ | 28 | -DCMAKE_BUILD_TYPE=Release \ |
| 29 | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ | ||
| 30 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 31 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 31 | -DZIG_TARGET_MCPU="$MCPU" \ | 32 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 32 | -DZIG_STATIC=ON \ | 33 | -DZIG_STATIC=ON \ |
| 33 | -DZIG_NO_LIB=ON \ | 34 | -DZIG_NO_LIB=ON \ |
| 34 | -GNinja | 35 | -GNinja |
| 35 | 36 | ||
| 36 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | ||
| 37 | # so that installation and testing do not get affected by them. | ||
| 38 | unset CC | ||
| 39 | unset CXX | ||
| 40 | |||
| 41 | ninja install | 37 | ninja install |
| 42 | 38 | ||
| 43 | # Must be done after zig cc is finished. | 39 | # Must be done after zig cc is finished. |
| ... | @@ -63,6 +59,7 @@ stage3-release/bin/zig build \ | ... | @@ -63,6 +59,7 @@ stage3-release/bin/zig build \ |
| 63 | -Doptimize=ReleaseFast \ | 59 | -Doptimize=ReleaseFast \ |
| 64 | -Dstrip \ | 60 | -Dstrip \ |
| 65 | -Dtarget=$TARGET \ | 61 | -Dtarget=$TARGET \ |
| 62 | -Dcpu=$MCPU \ | ||
| 66 | -Duse-zig-libcxx \ | 63 | -Duse-zig-libcxx \ |
| 67 | -Dversion-string="$(stage3-release/bin/zig version)" | 64 | -Dversion-string="$(stage3-release/bin/zig version)" |
| 68 | 65 |
ci/x86_64-windows-debug.ps1+21-5| ... | @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 | ... | @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 |
| 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" | 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" |
| 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } | 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } |
| 6 | 6 | ||
| 7 | $Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" | ||
| 8 | |||
| 7 | function CheckLastExitCode { | 9 | function CheckLastExitCode { |
| 8 | if (!$?) { | 10 | if (!$?) { |
| 9 | exit 1 | 11 | exit 1 |
| ... | @@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" | ... | @@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" |
| 18 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" | 20 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" |
| 19 | 21 | ||
| 20 | Write-Output "Building from source..." | 22 | Write-Output "Building from source..." |
| 21 | New-Item -Path 'build-debug' -ItemType Directory | 23 | New-Item -Force -Path 'build-debug' -ItemType Directory |
| 22 | Set-Location -Path 'build-debug' | 24 | Set-Location -Path 'build-debug' |
| 23 | 25 | ||
| 24 | # CMake gives a syntax error when file paths with backward slashes are used. | 26 | # CMake gives a syntax error when file paths with backward slashes are used. |
| ... | @@ -45,18 +47,32 @@ CheckLastExitCode | ... | @@ -45,18 +47,32 @@ CheckLastExitCode |
| 45 | $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" | 47 | $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" |
| 46 | 48 | ||
| 47 | Write-Output "Main test suite..." | 49 | Write-Output "Main test suite..." |
| 48 | stage3-debug\bin\zig build test docs ` | 50 | stage3-debug\bin\zig.exe build test docs ` |
| 49 | --maxrss $ZSF_MAX_RSS ` | 51 | --maxrss $ZSF_MAX_RSS ` |
| 50 | --search-prefix "$PREFIX_PATH" ` | 52 | --search-prefix "$PREFIX_PATH" ` |
| 51 | -Dstatic-llvm ` | 53 | -Dstatic-llvm ` |
| 52 | -Dskip-non-native ` | 54 | -Dskip-non-native ` |
| 53 | -Dskip-test-incremental ` | ||
| 54 | -Denable-symlinks-windows ` | 55 | -Denable-symlinks-windows ` |
| 55 | --test-timeout 30m | 56 | --test-timeout 30m |
| 56 | CheckLastExitCode | 57 | CheckLastExitCode |
| 57 | 58 | ||
| 59 | Write-Output "Build and test stage4..." | ||
| 60 | stage3-debug\bin\zig.exe build ` | ||
| 61 | --prefix stage4-debug ` | ||
| 62 | -Denable-llvm ` | ||
| 63 | -Dno-lib ` | ||
| 64 | -Doptimize=Debug ` | ||
| 65 | -Dtarget="$TARGET" ` | ||
| 66 | -Dcpu="$MCPU" ` | ||
| 67 | -Duse-zig-libcxx ` | ||
| 68 | -Dversion-string="$(stage3-debug\bin\zig.exe version)" | ||
| 69 | CheckLastExitCode | ||
| 70 | |||
| 71 | stage4-debug\bin\zig.exe test ..\test\behavior.zig | ||
| 72 | CheckLastExitCode | ||
| 73 | |||
| 58 | Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..." | 74 | Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..." |
| 59 | stage3-debug\bin\zig build-obj ` | 75 | stage3-debug\bin\zig.exe build-obj ` |
| 60 | -ofmt=c ` | 76 | -ofmt=c ` |
| 61 | -OReleaseSmall ` | 77 | -OReleaseSmall ` |
| 62 | --name compiler_rt ` | 78 | --name compiler_rt ` |
| ... | @@ -66,7 +82,7 @@ stage3-debug\bin\zig build-obj ` | ... | @@ -66,7 +82,7 @@ stage3-debug\bin\zig build-obj ` |
| 66 | ..\lib\compiler_rt.zig | 82 | ..\lib\compiler_rt.zig |
| 67 | CheckLastExitCode | 83 | CheckLastExitCode |
| 68 | 84 | ||
| 69 | stage3-debug\bin\zig test ` | 85 | stage3-debug\bin\zig.exe test ` |
| 70 | -ofmt=c ` | 86 | -ofmt=c ` |
| 71 | -femit-bin="behavior-x86_64-windows-msvc.c" ` | 87 | -femit-bin="behavior-x86_64-windows-msvc.c" ` |
| 72 | --test-no-exec ` | 88 | --test-no-exec ` |
ci/x86_64-windows-release.ps1+5-3| ... | @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 | ... | @@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2 |
| 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" | 4 | $ZIG = "$PREFIX_PATH\bin\zig.exe" |
| 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } | 5 | $ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } |
| 6 | 6 | ||
| 7 | $Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH" | ||
| 8 | |||
| 7 | function CheckLastExitCode { | 9 | function CheckLastExitCode { |
| 8 | if (!$?) { | 10 | if (!$?) { |
| 9 | exit 1 | 11 | exit 1 |
| ... | @@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" | ... | @@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" |
| 18 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" | 20 | $Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" |
| 19 | 21 | ||
| 20 | Write-Output "Building from source..." | 22 | Write-Output "Building from source..." |
| 21 | New-Item -Path 'build-release' -ItemType Directory | 23 | New-Item -Force -Path 'build-release' -ItemType Directory |
| 22 | Set-Location -Path 'build-release' | 24 | Set-Location -Path 'build-release' |
| 23 | 25 | ||
| 24 | # CMake gives a syntax error when file paths with backward slashes are used. | 26 | # CMake gives a syntax error when file paths with backward slashes are used. |
| ... | @@ -50,7 +52,6 @@ stage3-release\bin\zig.exe build test docs ` | ... | @@ -50,7 +52,6 @@ stage3-release\bin\zig.exe build test docs ` |
| 50 | --search-prefix "$PREFIX_PATH" ` | 52 | --search-prefix "$PREFIX_PATH" ` |
| 51 | -Dstatic-llvm ` | 53 | -Dstatic-llvm ` |
| 52 | -Dskip-non-native ` | 54 | -Dskip-non-native ` |
| 53 | -Dskip-test-incremental ` | ||
| 54 | -Denable-symlinks-windows ` | 55 | -Denable-symlinks-windows ` |
| 55 | --test-timeout 30m | 56 | --test-timeout 30m |
| 56 | CheckLastExitCode | 57 | CheckLastExitCode |
| ... | @@ -71,8 +72,9 @@ stage3-release\bin\zig.exe build ` | ... | @@ -71,8 +72,9 @@ stage3-release\bin\zig.exe build ` |
| 71 | -Doptimize=ReleaseFast ` | 72 | -Doptimize=ReleaseFast ` |
| 72 | -Dstrip ` | 73 | -Dstrip ` |
| 73 | -Dtarget="$TARGET" ` | 74 | -Dtarget="$TARGET" ` |
| 75 | -Dcpu="$MCPU" ` | ||
| 74 | -Duse-zig-libcxx ` | 76 | -Duse-zig-libcxx ` |
| 75 | -Dversion-string="$(stage3-release\bin\zig version)" | 77 | -Dversion-string="$(stage3-release\bin\zig.exe version)" |
| 76 | CheckLastExitCode | 78 | CheckLastExitCode |
| 77 | 79 | ||
| 78 | # Compare-Object returns an error code if the files differ. | 80 | # Compare-Object returns an error code if the files differ. |