aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/check-unsafe-assertions.sh18
-rwxr-xr-xci/install-dependencies.sh21
-rwxr-xr-xci/run-build-and-tests.sh7
-rwxr-xr-xci/run-static-analysis.sh4
-rwxr-xr-xci/run-test-slice.sh5
-rwxr-xr-xci/test-documentation.sh27
6 files changed, 51 insertions, 31 deletions
diff --git a/ci/check-unsafe-assertions.sh b/ci/check-unsafe-assertions.sh
new file mode 100755
index 0000000000..233bd9dfbc
--- /dev/null
+++ b/ci/check-unsafe-assertions.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+make CHECK_ASSERTION_SIDE_EFFECTS=1 >compiler_output 2>compiler_error
+if test $? != 0
+then
+ echo >&2 "ERROR: The compiler could not verify the following assert()"
+ echo >&2 " calls are free of side-effects. Please replace with"
+ echo >&2 " ASSERT() calls."
+ grep undefined.reference.to..not_supposed_to_survive compiler_error |
+ sed -e s/:[^:]*$// | sort | uniq | tr ':' ' ' |
+ while read f l
+ do
+ printf "${f}:${l}\n "
+ awk -v start="$l" 'NR >= start { print; if (/\);/) exit }' $f
+ done
+ exit 1
+fi
+rm compiler_output compiler_error
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index da19dada2c..d061a47293 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -9,7 +9,7 @@ begin_group "Install dependencies"
P4WHENCE=https://cdist2.perforce.com/perforce/r23.2
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
-JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
+JGITWHENCE=https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
# Make sudo a no-op and execute the command directly when running as root.
# While using sudo would be fine on most platforms when we are root already,
@@ -71,7 +71,6 @@ ubuntu-*|i386/ubuntu-*|debian-*)
chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
rm -f "$CUSTOM_PATH/p4"
rm -f "$CUSTOM_PATH/p4d"
- echo >&2 "P4 download (optional) failed"
}
wget --quiet \
@@ -79,16 +78,12 @@ ubuntu-*|i386/ubuntu-*|debian-*)
tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
-C "$CUSTOM_PATH" --strip-components=1 \
"git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" &&
- rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" || {
- rm -f "$CUSTOM_PATH/git-lfs"
- echo >&2 "LFS download (optional) failed"
- }
+ rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ||
+ rm -f "$CUSTOM_PATH/git-lfs"
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit" &&
- chmod a+x "$CUSTOM_PATH/jgit" || {
- rm -f "$CUSTOM_PATH/jgit"
- echo >&2 "JGit download (optional) failed"
- }
+ chmod a+x "$CUSTOM_PATH/jgit" ||
+ rm -f "$CUSTOM_PATH/jgit"
;;
esac
;;
@@ -151,7 +146,7 @@ then
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
p4 -V
else
- echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
+ echo >&2 "::warning:: perforce wasn't installed, see above for clues why"
fi
if type git-lfs >/dev/null 2>&1
@@ -159,7 +154,7 @@ then
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
git-lfs version
else
- echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
+ echo >&2 "::warning:: git-lfs wasn't installed, see above for clues why"
fi
if type jgit >/dev/null 2>&1
@@ -167,7 +162,7 @@ then
echo "$(tput setaf 6)JGit Version$(tput sgr0)"
jgit version
else
- echo >&2 "WARNING: JGit wasn't installed, see above for clues why"
+ echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
fi
end_group "Install dependencies"
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index 1c69846723..01823fd0f1 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -5,11 +5,6 @@
. ${0%/*}/lib.sh
-case "$CI_OS_NAME" in
-windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
-*) ln -s "$cache_dir/.prove" t/.prove;;
-esac
-
run_tests=t
case "$jobname" in
@@ -20,7 +15,6 @@ linux-breaking-changes)
linux-TEST-vars)
export OPENSSL_SHA1_UNSAFE=YesPlease
export GIT_TEST_SPLIT_INDEX=yes
- export GIT_TEST_MERGE_ALGORITHM=recursive
export GIT_TEST_FULL_IN_PACK_ARRAY=true
export GIT_TEST_OE_SIZE=10
export GIT_TEST_OE_DELTA_SIZE=5
@@ -57,6 +51,7 @@ case "$jobname" in
--warnlevel 2 --werror \
--wrap-mode nofallback \
-Dfuzzers=true \
+ -Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
$MESONFLAGS
group "Build" meson compile -C build --
if test -n "$run_tests"
diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh
index 0d51e5ce0e..9e9c72681d 100755
--- a/ci/run-static-analysis.sh
+++ b/ci/run-static-analysis.sh
@@ -26,9 +26,11 @@ then
exit 1
fi
-make hdr-check ||
+make check-headers ||
exit 1
make check-pot
+${0%/*}/check-unsafe-assertions.sh
+
save_good_tree
diff --git a/ci/run-test-slice.sh b/ci/run-test-slice.sh
index e167e646f7..0444c79c02 100755
--- a/ci/run-test-slice.sh
+++ b/ci/run-test-slice.sh
@@ -5,11 +5,6 @@
. ${0%/*}/lib.sh
-case "$CI_OS_NAME" in
-windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
-*) ln -s "$cache_dir/.prove" t/.prove;;
-esac
-
group "Run tests" make --quiet -C t T="$(cd t &&
./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
tr '\n' ' ')" ||
diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh
index 6c018b673e..49f87f50fd 100755
--- a/ci/test-documentation.sh
+++ b/ci/test-documentation.sh
@@ -15,6 +15,13 @@ filter_log () {
"$1"
}
+check_docs () {
+ test -s "$1"/Documentation/git.html &&
+ test -s "$1"/Documentation/git.xml &&
+ test -s "$1"/Documentation/git.1 &&
+ grep "<meta name=\"generator\" content=\"$2 " "$1"/Documentation/git.html
+}
+
make check-builtins
make check-docs
@@ -23,10 +30,7 @@ make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
cat stderr.raw
filter_log stderr.raw >stderr.log
test ! -s stderr.log
-test -s Documentation/git.html
-test -s Documentation/git.xml
-test -s Documentation/git.1
-grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
+check_docs . AsciiDoc
rm -f stdout.log stderr.log stderr.raw
check_unignored_build_artifacts
@@ -37,10 +41,21 @@ make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
cat stderr.raw
filter_log stderr.raw >stderr.log
test ! -s stderr.log
-test -s Documentation/git.html
-grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
+check_docs . Asciidoctor
rm -f stdout.log stderr.log stderr.raw
check_unignored_build_artifacts
+# Build docs with Meson and AsciiDoc
+meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc
+meson compile -C build-asciidoc
+check_docs build-asciidoc AsciiDoc
+rm -rf build-asciidoc
+
+# Build docs with Meson and AsciiDoctor
+meson setup build-asciidoctor -Ddocs=html,man -Ddocs_backend=asciidoctor
+meson compile -C build-asciidoctor
+check_docs build-asciidoctor Asciidoctor
+rm -rf build-asciidoctor
+
save_good_tree