mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
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:
parent
8bbb4a2f81
commit
5f23b65901
4 changed files with 17 additions and 29 deletions
|
|
@ -1038,8 +1038,6 @@ set(BUILD_ZIG2_ARGS
|
|||
-lc
|
||||
--pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}"
|
||||
--pkg-end
|
||||
--pkg-begin compiler_rt "${CMAKE_SOURCE_DIR}/lib/compiler_rt.zig"
|
||||
--pkg-end
|
||||
)
|
||||
|
||||
if("${ZIG_EXECUTABLE}" STREQUAL "")
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ ARCH="$(uname -m)"
|
|||
DEPS_LOCAL="$HOME/local"
|
||||
OLD_ZIG="$DEPS_LOCAL/bin/zig"
|
||||
TARGET="${ARCH}-linux-musl"
|
||||
MCPU="baseline"
|
||||
|
||||
mkdir -p "$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
|
||||
tar x --strip-components=1 -f 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"
|
||||
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
|
||||
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"
|
||||
echo "building stage3-debug with zig version $($OLD_ZIG version)"
|
||||
|
||||
export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU"
|
||||
export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \
|
||||
-DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \
|
||||
-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
|
||||
"$OLD_ZIG" build \
|
||||
--search-prefix "$DEPS_LOCAL" \
|
||||
--zig-lib-dir "$(pwd)/../lib" \
|
||||
-Denable-stage1 \
|
||||
-Dstatic-llvm \
|
||||
-Drelease \
|
||||
-Duse-zig-libcxx \
|
||||
-Dtarget="$TARGET"
|
||||
|
||||
echo "Looking for non-conforming code formatting..."
|
||||
stage3/bin/zig fmt --check .. \
|
||||
zig-out/bin/zig fmt --check .. \
|
||||
--exclude ../test/cases/ \
|
||||
--exclude ../build
|
||||
|
||||
# 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 \
|
||||
-fwasmtime \
|
||||
-Dstatic-llvm \
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ MCPU="baseline"
|
|||
mkdir -p "$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
|
||||
tar x --strip-components=1 -f 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"
|
||||
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
|
||||
tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ Write-Output "Building Zig..."
|
|||
-Denable-stage1 `
|
||||
-Dstatic-llvm `
|
||||
-Drelease `
|
||||
-Dstrip `
|
||||
-Duse-zig-libcxx `
|
||||
-Dtarget="$TARGET"
|
||||
CheckLastExitCode
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue