6 # Script assumes the presence of the following:
10 TARGET
="$ARCH-macos-none"
12 CACHE_BASENAME
="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
13 PREFIX
="$HOME/$CACHE_BASENAME"
18 # Make the `zig version` number consistent.
19 # This will affect the cmake command below.
20 git fetch
--unshallow || true
26 # Override the cache directories because they won't actually help other CI runs
27 # which will be testing alternate versions of zig, and ultimately would just
28 # fill up space on the hard drive for no reason.
29 export ZIG_GLOBAL_CACHE_DIR
="$PWD/zig-global-cache"
30 export ZIG_LOCAL_CACHE_DIR
="$PWD/zig-local-cache"
32 PATH
="$HOME/local/bin:$PATH" cmake .. \
33 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
34 -DCMAKE_PREFIX_PATH="$PREFIX" \
35 -DCMAKE_BUILD_TYPE=Debug \
36 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
37 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
38 -DZIG_TARGET_TRIPLE="$TARGET" \
39 -DZIG_TARGET_MCPU="$MCPU" \
44 $HOME/local
/bin
/ninja
install
46 stage3-debug
/bin
/zig build
test docs \
47 --zig-lib-dir "$PWD/../lib" \
51 --search-prefix "$PREFIX"