std.crypto: make ff.ct_unprotected.limbsCmpLt compile (#19741)
[zig.git] / ci / aarch64-linux-release.sh
blob87c908807b801693cb1d05223fc74ef71c4787be
1 #!/bin/sh
3 # Requires cmake ninja-build
5 set -x
6 set -e
8 ARCH="$(uname -m)"
9 TARGET="$ARCH-linux-musl"
10 MCPU="baseline"
11 CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.203+d3bc1cfc4"
12 PREFIX="$HOME/deps/$CACHE_BASENAME"
13 ZIG="$PREFIX/bin/zig"
15 export PATH="$HOME/deps/wasmtime-v10.0.2-$ARCH-linux:$PATH"
17 # Make the `zig version` number consistent.
18 # This will affect the cmake command below.
19 git fetch --unshallow || true
20 git fetch --tags
22 export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
23 export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25 rm -rf build-release
26 mkdir build-release
27 cd build-release
29 # Override the cache directories because they won't actually help other CI runs
30 # which will be testing alternate versions of zig, and ultimately would just
31 # fill up space on the hard drive for no reason.
32 export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
33 export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
35 cmake .. \
36 -DCMAKE_INSTALL_PREFIX="stage3-release" \
37 -DCMAKE_PREFIX_PATH="$PREFIX" \
38 -DCMAKE_BUILD_TYPE=Release \
39 -DZIG_TARGET_TRIPLE="$TARGET" \
40 -DZIG_TARGET_MCPU="$MCPU" \
41 -DZIG_STATIC=ON \
42 -DZIG_NO_LIB=ON \
43 -GNinja
45 # Now cmake will use zig as the C/C++ compiler. We reset the environment variables
46 # so that installation and testing do not get affected by them.
47 unset CC
48 unset CXX
50 ninja install
52 # TODO: move this to a build.zig step (check-fmt)
53 echo "Looking for non-conforming code formatting..."
54 stage3-release/bin/zig fmt --check .. \
55 --exclude ../test/cases/ \
56 --exclude ../build-release
58 # simultaneously test building self-hosted without LLVM and with 32-bit arm
59 stage3-release/bin/zig build \
60 -Dtarget=arm-linux-musleabihf \
61 -Dno-lib
63 # TODO: add -fqemu back to this line
64 stage3-release/bin/zig build test docs \
65 --maxrss 24696061952 \
66 -fwasmtime \
67 -Dstatic-llvm \
68 -Dtarget=native-native-musl \
69 --search-prefix "$PREFIX" \
70 --zig-lib-dir "$PWD/../lib"
72 # Look for HTML errors.
73 # TODO: move this to a build.zig flag (-Denable-tidy)
74 tidy --drop-empty-elements no -qe "../zig-out/doc/langref.html"
76 # Ensure that updating the wasm binary from this commit will result in a viable build.
77 stage3-release/bin/zig build update-zig1
79 rm -rf ../build-new
80 mkdir ../build-new
81 cd ../build-new
83 export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
84 export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
85 export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
86 export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
88 cmake .. \
89 -DCMAKE_PREFIX_PATH="$PREFIX" \
90 -DCMAKE_BUILD_TYPE=Release \
91 -DZIG_TARGET_TRIPLE="$TARGET" \
92 -DZIG_TARGET_MCPU="$MCPU" \
93 -DZIG_STATIC=ON \
94 -DZIG_NO_LIB=ON \
95 -GNinja
97 unset CC
98 unset CXX
100 ninja install
102 stage3/bin/zig test ../test/behavior.zig
103 stage3/bin/zig build -p stage4 \
104 -Dstatic-llvm \
105 -Dtarget=native-native-musl \
106 -Dno-lib \
107 --search-prefix "$PREFIX" \
108 --zig-lib-dir "$PWD/../lib"
109 stage4/bin/zig test ../test/behavior.zig