From af217d05066713a13519234cf74755f454b5a68a Mon Sep 17 00:00:00 2001
From: Egor Ivkov <e.o.ivkov@gmail.com>
Date: Fri, 1 Mar 2024 16:21:29 +0300
Subject: [PATCH] test/fuzz: shallow clone oss-fuzz

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
---
 .gitlab-ci.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 377b45241c..966d85eada 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -79,9 +79,10 @@ fuzz-check-build:
     script:
       # Clone oss-fuzz instead of adding it as a submodule
       # as we don't want it to be checked by static analyzers - it's used only for fuzzing
-      - git clone https://github.com/google/oss-fuzz.git
+      - git clone --depth=1 https://github.com/google/oss-fuzz.git
       - cd oss-fuzz
       # Checkout a fixed oss-fuzz commit to guarantee reproducible builds
+      - git fetch --depth=1 origin e8e124996508f1e4ffe566896638c7213ab440d5
       - git checkout e8e124996508f1e4ffe566896638c7213ab440d5
       - python3 infra/helper.py build_image --no-pull --external ..
       - python3 infra/helper.py build_fuzzers --external .. --sanitizer=address
@@ -96,9 +97,10 @@ fuzz-run:
     script:
       # Clone oss-fuzz instead of adding it as a submodule
       # as we don't want it to be checked by static analyzers - it's used only for fuzzing
-      - git clone https://github.com/google/oss-fuzz.git
+      - git clone --depth=1 https://github.com/google/oss-fuzz.git
       - cd oss-fuzz
       # Checkout a fixed oss-fuzz commit to guarantee reproducible builds
+      - git fetch --depth=1 origin e8e124996508f1e4ffe566896638c7213ab440d5
       - git checkout e8e124996508f1e4ffe566896638c7213ab440d5
       - python3 infra/helper.py build_image --no-pull --external ..
       - python3 infra/helper.py build_fuzzers --external .. --sanitizer=address
-- 
GitLab