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.
This commit is contained in:
Andrew Kelley 2022-11-22 00:56:44 -07:00
parent 8bbb4a2f81
commit 5f23b65901
4 changed files with 17 additions and 29 deletions

View File

@ -1038,8 +1038,6 @@ set(BUILD_ZIG2_ARGS
-lc -lc
--pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}" --pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}"
--pkg-end --pkg-end
--pkg-begin compiler_rt "${CMAKE_SOURCE_DIR}/lib/compiler_rt.zig"
--pkg-end
) )
if("${ZIG_EXECUTABLE}" STREQUAL "") if("${ZIG_EXECUTABLE}" STREQUAL "")

View File

@ -8,13 +8,13 @@ ARCH="$(uname -m)"
DEPS_LOCAL="$HOME/local" DEPS_LOCAL="$HOME/local"
OLD_ZIG="$DEPS_LOCAL/bin/zig" OLD_ZIG="$DEPS_LOCAL/bin/zig"
TARGET="${ARCH}-linux-musl" TARGET="${ARCH}-linux-musl"
MCPU="baseline"
mkdir -p "$DEPS_LOCAL" mkdir -p "$DEPS_LOCAL"
cd "$DEPS_LOCAL" cd "$DEPS_LOCAL"
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz tar 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
cd "$ZIGDIR" cd "$ZIGDIR"
echo "building stage3-debug with zig version $($OLD_ZIG version)" echo "building stage3-debug with zig version $($OLD_ZIG version)"
export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU" "$OLD_ZIG" build \
export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU" --search-prefix "$DEPS_LOCAL" \
--zig-lib-dir "$(pwd)/../lib" \
mkdir build -Denable-stage1 \
cd build -Dstatic-llvm \
cmake .. \ -Drelease \
-DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \ -Duse-zig-libcxx \
-DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \ -Dtarget="$TARGET"
-DCMAKE_BUILD_TYPE=Debug \
-DZIG_STATIC=ON \
-DZIG_USE_LLVM_CONFIG=OFF
# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
# so that installation and testing do not get affected by them.
unset CC
unset CXX
make -j2 install
echo "Looking for non-conforming code formatting..." echo "Looking for non-conforming code formatting..."
stage3/bin/zig fmt --check .. \ zig-out/bin/zig fmt --check .. \
--exclude ../test/cases/ \ --exclude ../test/cases/ \
--exclude ../build --exclude ../build
# simultaneously test building self-hosted without LLVM and with 32-bit arm # simultaneously test building self-hosted without LLVM and with 32-bit arm
stage3/bin/zig build -Dtarget=arm-linux-musleabihf zig-out/bin/zig build -Dtarget=arm-linux-musleabihf
stage3/bin/zig build test \ zig-out/bin/zig build test docs \
-fqemu \ -fqemu \
-fwasmtime \ -fwasmtime \
-Dstatic-llvm \ -Dstatic-llvm \

View File

@ -13,8 +13,9 @@ MCPU="baseline"
mkdir -p "$DEPS_LOCAL" mkdir -p "$DEPS_LOCAL"
cd "$DEPS_LOCAL" cd "$DEPS_LOCAL"
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz

View File

@ -40,7 +40,6 @@ Write-Output "Building Zig..."
-Denable-stage1 ` -Denable-stage1 `
-Dstatic-llvm ` -Dstatic-llvm `
-Drelease ` -Drelease `
-Dstrip `
-Duse-zig-libcxx ` -Duse-zig-libcxx `
-Dtarget="$TARGET" -Dtarget="$TARGET"
CheckLastExitCode CheckLastExitCode