Update Jenkinsfile #57

Merged
Dandaedre merged 1 commits from dandaedre-patch-1 into dev 2026-09-13 13:44:46 +02:00
1 changed files with 52 additions and 2 deletions

54
Jenkinsfile vendored
View File

@ -28,6 +28,10 @@ pipeline {
sh '''
set -eu
# ---------------------------------------------------------
# Rust
# ---------------------------------------------------------
if ! command -v rustup >/dev/null 2>&1; then
echo "ERROR: rustup is not installed on this worker." >&2
exit 1
@ -42,12 +46,52 @@ pipeline {
rustup default stable
# ---------------------------------------------------------
# mold linker
# ---------------------------------------------------------
if ! command -v mold >/dev/null 2>&1; then
echo "mold not found — installing it..."
pkg install -y mold
else
echo "mold already installed."
fi
# ---------------------------------------------------------
# Environment information
# ---------------------------------------------------------
echo
echo "Using:"
echo "Rust:"
rustc --version
echo
echo "Cargo:"
cargo --version
echo
echo "rustfmt:"
rustfmt --version
echo
echo "Clippy:"
cargo clippy --version
echo
echo "Compiler:"
cc --version || true
echo
echo "mold:"
mold --version
echo
echo "mold location:"
command -v mold
echo
echo "Linker-related environment:"
env | grep -E 'RUSTFLAGS|CARGO.*RUSTFLAGS|MOLD' || true
'''
}
}
@ -58,7 +102,11 @@ pipeline {
set -eu
echo "Checking Rust formatting..."
cargo fmt --all -- --check
cargo fmt \
--all \
-- \
--check
'''
}
}
@ -134,6 +182,8 @@ pipeline {
echo "Release build completed."
if [ -f target/release/idlefox ]; then
echo
echo "Release binary:"
ls -lh target/release/idlefox
fi
'''