From c5e26b8673cb7a62b71398820aa41549189b49d0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 25 Oct 2019 03:25:10 -0400 Subject: [PATCH] ci: force git name-rev to be 9 on all targets --- ci/azure/linux_script | 4 ++++ ci/azure/macos_script | 4 ++++ ci/drone/linux_script | 4 ++++ ci/srht/freebsd_script | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/ci/azure/linux_script b/ci/azure/linux_script index c4222f6ce4..b5237dc226 100755 --- a/ci/azure/linux_script +++ b/ci/azure/linux_script @@ -14,6 +14,10 @@ sudo apt-get remove -y llvm-* sudo rm -rf /usr/local/* sudo apt-get install -y libxml2-dev libclang-9-dev llvm-9 llvm-9-dev cmake s3cmd gcc-7 g++-7 qemu +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git config core.abbrev 9 + export CC=gcc-7 export CXX=g++-7 mkdir build diff --git a/ci/azure/macos_script b/ci/azure/macos_script index 74500ddf95..d5c986dd47 100755 --- a/ci/azure/macos_script +++ b/ci/azure/macos_script @@ -67,6 +67,10 @@ else s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$CACHE_BASENAME.tar.xz" "s3://ziglang.org/builds/$CACHE_BASENAME.tar.xz" fi +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git config core.abbrev 9 + cd $ZIGDIR mkdir build cd build diff --git a/ci/drone/linux_script b/ci/drone/linux_script index b11fd13de2..4dee1996f0 100755 --- a/ci/drone/linux_script +++ b/ci/drone/linux_script @@ -11,6 +11,10 @@ apk update apk add py3-pip xz perl-utils pip3 install s3cmd +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git config core.abbrev 9 + mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local diff --git a/ci/srht/freebsd_script b/ci/srht/freebsd_script index 213796f77c..5010fad5d8 100755 --- a/ci/srht/freebsd_script +++ b/ci/srht/freebsd_script @@ -8,6 +8,10 @@ CACHE_BASENAME="llvm+clang-9.0.0-freebsd-x86_64-release" PREFIX="$HOME/$CACHE_BASENAME" JOBS="-j$(sysctl -n hw.ncpu)" +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git config core.abbrev 9 + cd $HOME wget -nv "https://ziglang.org/builds/$CACHE_BASENAME.tar.xz" tar xf "$CACHE_BASENAME.tar.xz"