From 781cc731ed81be33a13d5f1c85c7dc6bc8ec5218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 28 Sep 2025 19:44:02 +0200 Subject: [PATCH] ci: move Git repository unshallowing to the workflow --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ ci/aarch64-linux-debug.sh | 5 ----- ci/aarch64-linux-release.sh | 5 ----- ci/aarch64-macos-debug.sh | 5 ----- ci/aarch64-macos-release.sh | 5 ----- ci/aarch64-windows.ps1 | 8 -------- ci/loongarch64-linux-debug.sh | 5 ----- ci/loongarch64-linux-release.sh | 5 ----- ci/riscv64-linux-debug.sh | 5 ----- ci/riscv64-linux-release.sh | 5 ----- ci/x86_64-freebsd-debug.sh | 5 ----- ci/x86_64-freebsd-release.sh | 5 ----- ci/x86_64-linux-debug-llvm.sh | 5 ----- ci/x86_64-linux-debug.sh | 5 ----- ci/x86_64-linux-release.sh | 5 ----- ci/x86_64-windows-debug.ps1 | 8 -------- ci/x86_64-windows-release.ps1 | 8 -------- 17 files changed, 18 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13f5b56895..253e400979 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: sh ci/x86_64-linux-debug.sh x86_64-linux-debug-llvm: @@ -26,6 +28,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: sh ci/x86_64-linux-debug-llvm.sh x86_64-linux-release: @@ -34,6 +38,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: sh ci/x86_64-linux-release.sh aarch64-linux-debug: @@ -41,6 +47,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: sh ci/aarch64-linux-debug.sh aarch64-linux-release: @@ -48,6 +56,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: sh ci/aarch64-linux-release.sh aarch64-macos-debug: @@ -55,6 +65,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: ci/aarch64-macos-debug.sh aarch64-macos-release: @@ -62,6 +74,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: ci/aarch64-macos-release.sh x86_64-windows-debug: @@ -70,6 +84,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: ci/x86_64-windows-debug.ps1 x86_64-windows-release: @@ -78,5 +94,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build and Test run: ci/x86_64-windows-release.ps1 diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index 179ae99f00..67514c87d8 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index 2988e939f8..11fb70aa64 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 93d05a9c22..4b32093673 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -21,11 +21,6 @@ fi cd $ZIGDIR -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 55915e71fd..1db6d16fa0 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -21,11 +21,6 @@ fi cd $ZIGDIR -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/aarch64-windows.ps1 b/ci/aarch64-windows.ps1 index 83b0f0a9b1..0bebaefb68 100644 --- a/ci/aarch64-windows.ps1 +++ b/ci/aarch64-windows.ps1 @@ -22,14 +22,6 @@ function CheckLastExitCode { return 0 } -# Make the `zig version` number consistent. -# This will affect the `zig build` command below which uses `git describe`. -git fetch --tags - -if ((git rev-parse --is-shallow-repository) -eq "true") { - git fetch --unshallow # `git describe` won't work on a shallow repo -} - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index 3ccedd24c9..6db4459944 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.157+7fdd60df1" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index 0ae4403ee0..58cc46aee8 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.157+7fdd60df1" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 334dc8d8ee..c7660962e3 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 1ee76c1512..65f46cbbd9 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 5d0cac676c..b2d0c0b53f 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.312+164c598cd" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index c57c1ebf47..c3c901c5e4 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.312+164c598cd" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index 8bec5f8d26..306fbef755 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/deps/wasmtime-v29.0.0-x86_64-linux:$HOME/deps/qemu-linux-x86_64-10.1.0/bin:$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index 1b1a19b874..3506510acf 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/deps/wasmtime-v29.0.0-x86_64-linux:$HOME/deps/qemu-linux-x86_64-10.1.0/bin:$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index 9540a87d11..06cf9cb307 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig" export PATH="$HOME/deps/wasmtime-v29.0.0-x86_64-linux:$HOME/deps/qemu-linux-x86_64-10.1.0/bin:$HOME/local/bin:$PATH" -# Make the `zig version` number consistent. -# This will affect the cmake command below. -git fetch --unshallow || true -git fetch --tags - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 969de8dcc7..f44c5a04f7 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -22,14 +22,6 @@ function CheckLastExitCode { return 0 } -# Make the `zig version` number consistent. -# This will affect the `zig build` command below which uses `git describe`. -git fetch --tags - -if ((git rev-parse --is-shallow-repository) -eq "true") { - git fetch --unshallow # `git describe` won't work on a shallow repo -} - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index d387a215e8..c419cd309d 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -22,14 +22,6 @@ function CheckLastExitCode { return 0 } -# Make the `zig version` number consistent. -# This will affect the `zig build` command below which uses `git describe`. -git fetch --tags - -if ((git rev-parse --is-shallow-repository) -eq "true") { - git fetch --unshallow # `git describe` won't work on a shallow repo -} - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason.