zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 5f23b659018825aaf10a157c58cbbe92c64e16ef (tree)
parent 8bbb4a2f81b46f2a72a81575b9a9158b0d0bd94c
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 22 Nov 2022 00:56:44 -0700

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.

Diffstat:
MCMakeLists.txt | 2--
Mci/linux/build-x86_64-debug.sh | 38++++++++++++++------------------------
Mci/linux/build-x86_64-release.sh | 5+++--
Mci/windows/build.ps1 | 1-
4 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -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 "") diff --git a/ci/linux/build-x86_64-debug.sh b/ci/linux/build-x86_64-debug.sh @@ -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 \ diff --git a/ci/linux/build-x86_64-release.sh b/ci/linux/build-x86_64-release.sh @@ -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 diff --git a/ci/windows/build.ps1 b/ci/windows/build.ps1 @@ -40,7 +40,6 @@ Write-Output "Building Zig..." -Denable-stage1 ` -Dstatic-llvm ` -Drelease ` - -Dstrip ` -Duse-zig-libcxx ` -Dtarget="$TARGET" CheckLastExitCode