chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/sh
set -eu
cd "$(readlink -f "$(dirname "$0")/../..")"
# Get MSRV from the toplevel Cargo.toml
MSRV="$(sed -ne 's/^rust-version\s*=\s*[^0-9#]\([0-9.]\+\).*$/\1/p' Cargo.toml)"
echo "MSRV=${MSRV}"
MSRV_REGEX="$(echo "$MSRV" | sed -e 's/\./\\./g')"
check_readme() {
echo "checking README.md"
grep --color=always --with-filename --line-number --ignore-case 'minimum supported rust\(c\)\? version.*'"${MSRV_REGEX}" README.md
}
check_readme
check_woodpecker() {
for yml_path in .woodpecker/*.yml ; do
echo "checking ${yml_path}"
# Check `msrv_channel` variable.
if grep --quiet '^\s*msrv_channel:' "$yml_path" ; then
grep --color=always --with-filename --line-number '^\s*msrv_channel:[^#]*'"${MSRV_REGEX}"'\>' "$yml_path"
fi
# Check `rust_msrv_image` variable.
if grep --quiet '^\s*rust_msrv_image:' "$yml_path" ; then
grep --color=always --with-filename --line-number '^\s*rust_msrv_image:[^#]*'"${MSRV_REGEX}"'\>' "$yml_path"
fi
done
}
check_woodpecker
# vim: set expandtab tabstop=4 :

View File

@@ -0,0 +1,25 @@
#!/bin/sh
set -eu
cd "$(readlink -f "$(dirname "$0")/../..")"
set -x
RUST_CHANNEL="$1"
# Use the preset for CI environment.
cp .woodpecker/cargo-config.toml ${CARGO_HOME}/config.toml
# The repository should not have a directory which would be used as the cached `$RUSTUP_HOME`.
CACHED_RUSTUP_HOME=${CI_WORKSPACE}/.tmp-rustup-home && test ! -e ${CACHED_RUSTUP_HOME}
# Copy the pre-installed toolchains of the Docker container into the new `$RUSTUP_HOME`.
cp -a /usr/local/rustup ${CACHED_RUSTUP_HOME} && test -d ${CACHED_RUSTUP_HOME}
# Use the new `$RUSTUP_HOME` variable.
export RUSTUP_HOME=${CACHED_RUSTUP_HOME}
# Install the toolchain of the specified version (if not yet available locally).
rustup update --no-self-update ${RUST_CHANNEL} && rustup default ${RUST_CHANNEL}
rustc --version && cargo --version