Merge branch 'ps/rust-balloon' into ps/ci-rust

* ps/rust-balloon:
  ci: enable Rust for breaking-changes jobs
  ci: convert "pedantic" job into full build with breaking changes
  BreakingChanges: announce Rust becoming mandatory
  varint: reimplement as test balloon for Rust
  varint: use explicit width for integers
  help: report on whether or not Rust is enabled
  Makefile: introduce infrastructure to build internal Rust library
  Makefile: reorder sources after includes
  meson: add infrastructure to build internal Rust library
This commit is contained in:
Junio C Hamano
2025-10-07 10:55:39 -07:00
20 changed files with 410 additions and 131 deletions

View File

@@ -30,8 +30,12 @@ alpine-*)
bash cvs gnupg perl-cgi perl-dbd-sqlite perl-io-tty >/dev/null
;;
fedora-*|almalinux-*)
case "$jobname" in
*-meson)
MESON_DEPS="meson ninja";;
esac
dnf -yq update >/dev/null &&
dnf -yq install shadow-utils sudo make gcc findutils diffutils perl python3 gawk gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
dnf -yq install shadow-utils sudo make pkg-config gcc findutils diffutils perl python3 gawk gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel $MESON_DEPS cargo >/dev/null
;;
ubuntu-*|i386/ubuntu-*|debian-*)
# Required so that apt doesn't wait for user input on certain packages.
@@ -58,7 +62,7 @@ ubuntu-*|i386/ubuntu-*|debian-*)
make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
libemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
libsecret-1-dev libpcre2-dev meson ninja-build pkg-config \
libsecret-1-dev libpcre2-dev meson ninja-build pkg-config cargo \
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
case "$distro" in

View File

@@ -5,11 +5,12 @@
. ${0%/*}/lib.sh
run_tests=t
case "$jobname" in
linux-breaking-changes)
fedora-breaking-changes-musl|linux-breaking-changes)
export WITH_BREAKING_CHANGES=YesPlease
export WITH_RUST=YesPlease
MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
MESONFLAGS="$MESONFLAGS -Drust=enabled"
;;
linux-TEST-vars)
export OPENSSL_SHA1_UNSAFE=YesPlease
@@ -35,12 +36,6 @@ linux-sha256)
linux-reftable|linux-reftable-leaks|osx-reftable)
export GIT_TEST_DEFAULT_REF_FORMAT=reftable
;;
pedantic)
# Don't run the tests; we only care about whether Git can be
# built.
export DEVOPTS=pedantic
run_tests=
;;
esac
case "$jobname" in
@@ -53,21 +48,15 @@ case "$jobname" in
-Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
$MESONFLAGS
group "Build" meson compile -C build --
if test -n "$run_tests"
then
group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
handle_failed_tests
)
fi
group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
handle_failed_tests
)
;;
*)
group Build make
if test -n "$run_tests"
then
group "Run tests" make test ||
handle_failed_tests
fi
group "Run tests" make test ||
handle_failed_tests
;;
esac