ci: move Git repository unshallowing to the workflow

This commit is contained in:
Alex Rønne Petersen 2025-09-28 19:44:02 +02:00
parent acf8d5234f
commit 781cc731ed
No known key found for this signature in database
17 changed files with 18 additions and 89 deletions

View file

@ -18,6 +18,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: sh ci/x86_64-linux-debug.sh run: sh ci/x86_64-linux-debug.sh
x86_64-linux-debug-llvm: x86_64-linux-debug-llvm:
@ -26,6 +28,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: sh ci/x86_64-linux-debug-llvm.sh run: sh ci/x86_64-linux-debug-llvm.sh
x86_64-linux-release: x86_64-linux-release:
@ -34,6 +38,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: sh ci/x86_64-linux-release.sh run: sh ci/x86_64-linux-release.sh
aarch64-linux-debug: aarch64-linux-debug:
@ -41,6 +47,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: sh ci/aarch64-linux-debug.sh run: sh ci/aarch64-linux-debug.sh
aarch64-linux-release: aarch64-linux-release:
@ -48,6 +56,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: sh ci/aarch64-linux-release.sh run: sh ci/aarch64-linux-release.sh
aarch64-macos-debug: aarch64-macos-debug:
@ -55,6 +65,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: ci/aarch64-macos-debug.sh run: ci/aarch64-macos-debug.sh
aarch64-macos-release: aarch64-macos-release:
@ -62,6 +74,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: ci/aarch64-macos-release.sh run: ci/aarch64-macos-release.sh
x86_64-windows-debug: x86_64-windows-debug:
@ -70,6 +84,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: ci/x86_64-windows-debug.ps1 run: ci/x86_64-windows-debug.ps1
x86_64-windows-release: x86_64-windows-release:
@ -78,5 +94,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Test - name: Build and Test
run: ci/x86_64-windows-release.ps1 run: ci/x86_64-windows-release.ps1

View file

@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig"
export PATH="$HOME/local/bin:$PATH" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig"
export PATH="$HOME/local/bin:$PATH" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -21,11 +21,6 @@ fi
cd $ZIGDIR 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -21,11 +21,6 @@ fi
cd $ZIGDIR 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -22,14 +22,6 @@ function CheckLastExitCode {
return 0 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.157+7fdd60df1"
PREFIX="$HOME/deps/$CACHE_BASENAME" PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.157+7fdd60df1"
PREFIX="$HOME/deps/$CACHE_BASENAME" PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig"
export PATH="$HOME/local/bin:$PATH" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -13,11 +13,6 @@ ZIG="$PREFIX/bin/zig"
export PATH="$HOME/local/bin:$PATH" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.312+164c598cd"
PREFIX="$HOME/deps/$CACHE_BASENAME" PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -11,11 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.312+164c598cd"
PREFIX="$HOME/deps/$CACHE_BASENAME" PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -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" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -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" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -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" 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -22,14 +22,6 @@ function CheckLastExitCode {
return 0 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.

View file

@ -22,14 +22,6 @@ function CheckLastExitCode {
return 0 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 # 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 # which will be testing alternate versions of zig, and ultimately would just
# fill up space on the hard drive for no reason. # fill up space on the hard drive for no reason.