authorgravatar for jay@jayschwa.netJay Petacat <jay@jayschwa.net> 2021-01-01 18:40:46-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-01 20:41:39-07:00
log993f4b5a06b5984d3d81e5910403cf15293f25b1
tree0fd4c7877f924b1462adf70fec77d0b1204fd315
parentd3ecbbebd33fffc2e283d0c6524c3647c894fa1b

ci: fix `git describe`

git describe is used for version string creation, but it had to be reverted in commit 69da6ba because it was broken in CI builds. Azure Pipelines and Drone perform shallow clones by default. This change reconfigures them to fetch history and tags. It adds tens of seconds, which is negligible compared to overall build and test time. Related: #6466, #6509, #7601

5 files changed, 10 insertions(+), 0 deletions(-)

ci/azure/linux_script+2
...@@ -49,6 +49,8 @@ PATH=$PWD/$WASMTIME:$PATH...@@ -49,6 +49,8 @@ PATH=$PWD/$WASMTIME:$PATH
49# Make the `zig version` number consistent.49# Make the `zig version` number consistent.
50# This will affect the cmake command below.50# This will affect the cmake command below.
51git config core.abbrev 951git config core.abbrev 9
52git fetch --unshallow || true
53git fetch --tags
5254
53export CC=gcc-755export CC=gcc-7
54export CXX=g++-756export CXX=g++-7
ci/azure/macos_script+2
...@@ -28,6 +28,8 @@ cd $ZIGDIR...@@ -28,6 +28,8 @@ cd $ZIGDIR
28# Make the `zig version` number consistent.28# Make the `zig version` number consistent.
29# This will affect the cmake command below.29# This will affect the cmake command below.
30git config core.abbrev 930git config core.abbrev 9
31git fetch --unshallow || true
32git fetch --tags
3133
32mkdir build34mkdir build
33cd build35cd build
ci/azure/windows_msvc_script.bat+2
...@@ -18,6 +18,8 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliar...@@ -18,6 +18,8 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliar
18REM Make the `zig version` number consistent.18REM Make the `zig version` number consistent.
19REM This will affect the cmake command below.19REM This will affect the cmake command below.
20git.exe config core.abbrev 920git.exe config core.abbrev 9
21git.exe fetch --unshallow
22git.exe fetch --tags
2123
22mkdir %ZIGBUILDDIR%24mkdir %ZIGBUILDDIR%
23cd %ZIGBUILDDIR%25cd %ZIGBUILDDIR%
ci/drone/linux_script+2
...@@ -14,6 +14,8 @@ pip3 install s3cmd...@@ -14,6 +14,8 @@ pip3 install s3cmd
14# Make the `zig version` number consistent.14# Make the `zig version` number consistent.
15# This will affect the cmake command below.15# This will affect the cmake command below.
16git config core.abbrev 916git config core.abbrev 9
17git fetch --unshallow || true
18git fetch --tags
1719
18mkdir build20mkdir build
19cd build21cd build
ci/srht/freebsd_script+2
...@@ -20,6 +20,8 @@ cd $ZIGDIR...@@ -20,6 +20,8 @@ cd $ZIGDIR
20# Make the `zig version` number consistent.20# Make the `zig version` number consistent.
21# This will affect the cmake command below.21# This will affect the cmake command below.
22git config core.abbrev 922git config core.abbrev 9
23git fetch --unshallow || true
24git fetch --tags
2325
24# SourceHut reports that it is a terminal that supports escape codes, but it26# SourceHut reports that it is a terminal that supports escape codes, but it
25# is a filthy liar. Here we tell Zig to not try to send any terminal escape27# is a filthy liar. Here we tell Zig to not try to send any terminal escape