authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 00:56:44-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 00:56:44-07:00
loge18d310afd5ee73f0058d905eb7d102989e0da82
treed824d7ab92c47b7a4b495923c27c74da9b3bf66c
parent7829c73ccf34e0808b69a2dd11844bb8bd0a5750

CI: build from old zig on x86_64-linux debug

This is to work around OOM on the CI server. Once #13560 is complete, we can avoid having to replace the tarballs so often.

4 files changed, 17 insertions(+), 29 deletions(-)

CMakeLists.txt-2
...@@ -1041,8 +1041,6 @@ set(BUILD_ZIG2_ARGS...@@ -1041,8 +1041,6 @@ set(BUILD_ZIG2_ARGS
1041 -lc1041 -lc
1042 --pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}"1042 --pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}"
1043 --pkg-end1043 --pkg-end
1044 --pkg-begin compiler_rt "${CMAKE_SOURCE_DIR}/lib/compiler_rt.zig"
1045 --pkg-end
1046)1044)
10471045
1048if("${ZIG_EXECUTABLE}" STREQUAL "")1046if("${ZIG_EXECUTABLE}" STREQUAL "")
ci/linux/build-x86_64-debug.sh+14-24
...@@ -8,13 +8,13 @@ ARCH="$(uname -m)"...@@ -8,13 +8,13 @@ ARCH="$(uname -m)"
8DEPS_LOCAL="$HOME/local"8DEPS_LOCAL="$HOME/local"
9OLD_ZIG="$DEPS_LOCAL/bin/zig"9OLD_ZIG="$DEPS_LOCAL/bin/zig"
10TARGET="${ARCH}-linux-musl"10TARGET="${ARCH}-linux-musl"
11MCPU="baseline"
1211
13mkdir -p "$DEPS_LOCAL"12mkdir -p "$DEPS_LOCAL"
14cd "$DEPS_LOCAL"13cd "$DEPS_LOCAL"
1514
16wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz15OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
17tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz16wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
17tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
1818
19wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz19wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
20tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz20tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
...@@ -29,34 +29,24 @@ export PATH=$DEPS_LOCAL/bin:$PATH...@@ -29,34 +29,24 @@ export PATH=$DEPS_LOCAL/bin:$PATH
29cd "$ZIGDIR"29cd "$ZIGDIR"
30echo "building stage3-debug with zig version $($OLD_ZIG version)"30echo "building stage3-debug with zig version $($OLD_ZIG version)"
3131
32export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU"32"$OLD_ZIG" build \
33export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU"33 --search-prefix "$DEPS_LOCAL" \
3434 --zig-lib-dir "$(pwd)/../lib" \
35mkdir build35 -Denable-stage1 \
36cd build36 -Dstatic-llvm \
37cmake .. \37 -Drelease \
38 -DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \38 -Duse-zig-libcxx \
39 -DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \39 -Dtarget="$TARGET"
40 -DCMAKE_BUILD_TYPE=Debug \
41 -DZIG_STATIC=ON \
42 -DZIG_USE_LLVM_CONFIG=OFF
43
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.
46unset CC
47unset CXX
48
49make -j2 install
5040
51echo "Looking for non-conforming code formatting..."41echo "Looking for non-conforming code formatting..."
52stage3/bin/zig fmt --check .. \42zig-out/bin/zig fmt --check .. \
53 --exclude ../test/cases/ \43 --exclude ../test/cases/ \
54 --exclude ../build44 --exclude ../build
5545
56# simultaneously test building self-hosted without LLVM and with 32-bit arm46# simultaneously test building self-hosted without LLVM and with 32-bit arm
57stage3/bin/zig build -Dtarget=arm-linux-musleabihf47zig-out/bin/zig build -Dtarget=arm-linux-musleabihf
5848
59stage3/bin/zig build test \49zig-out/bin/zig build test docs \
60 -fqemu \50 -fqemu \
61 -fwasmtime \51 -fwasmtime \
62 -Dstatic-llvm \52 -Dstatic-llvm \
ci/linux/build-x86_64-release.sh+3-2
...@@ -13,8 +13,9 @@ MCPU="baseline"...@@ -13,8 +13,9 @@ MCPU="baseline"
13mkdir -p "$DEPS_LOCAL"13mkdir -p "$DEPS_LOCAL"
14cd "$DEPS_LOCAL"14cd "$DEPS_LOCAL"
1515
16wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz16OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
17tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz17wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
18tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
1819
19wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz20wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
20tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz21tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
ci/windows/build.ps1-1
...@@ -40,7 +40,6 @@ Write-Output "Building Zig..."...@@ -40,7 +40,6 @@ Write-Output "Building Zig..."
40 -Denable-stage1 `40 -Denable-stage1 `
41 -Dstatic-llvm `41 -Dstatic-llvm `
42 -Drelease `42 -Drelease `
43 -Dstrip `
44 -Duse-zig-libcxx `43 -Duse-zig-libcxx `
45 -Dtarget="$TARGET"44 -Dtarget="$TARGET"
46CheckLastExitCode45CheckLastExitCode