ci: strengthen Rust Jenkins pipeline
Rust CI fader_master passed CI.
MadGobblins/fader_master/pipeline/head This commit looks good Details

Adapt the tiny-wb pipeline structure for fader_master with controlled checkout, concurrency and timeout options, isolated Cargo output, doctest and warning-strict documentation checks, strict Clippy, release artifact verification, workspace cleanup, and Gitea status reporting.

Project-specific audit, deny, coverage, badge, and MSRV stages remain deferred until their configuration and scripts exist.

Validation: cargo fmt --all -- --check; cargo check --workspace --all-targets --all-features; cargo test --workspace --all-targets --all-features; cargo test --workspace --doc --all-features; RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps --all-features; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo build --workspace --release --all-features; release binary executable check; git diff --check.
This commit is contained in:
Dandaedre 2026-10-05 02:41:22 +02:00
parent 68b23e0ff9
commit ec63326e4b
1 changed files with 58 additions and 10 deletions

68
Jenkinsfile vendored
View File

@ -4,9 +4,20 @@
pipeline {
agent { label 'rust_nodocker' }
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
timeout(time: 45, unit: 'MINUTES')
timestamps()
}
environment {
// Jenkins logs are easier to read without Cargo ANSI escape sequences.
CARGO_TERM_COLOR = 'never'
RUST_BACKTRACE = '1'
// Keep CI artifacts separate from local build output.
CARGO_TARGET_DIR = "${WORKSPACE}/target-ci"
}
stages {
@ -29,7 +40,7 @@ pipeline {
set -eu
if ! command -v rustup >/dev/null 2>&1; then
echo "ERROR: rustup is not installed on this worker." >&2
echo 'ERROR: rustup is required on the Jenkins worker.' >&2
exit 1
fi
@ -37,11 +48,12 @@ pipeline {
--profile minimal \
--component rustfmt \
--component clippy
rustup default stable
rustc --version
cargo --version
rustfmt --version
cargo clippy --version
'''
}
}
@ -73,11 +85,27 @@ pipeline {
}
}
stage('Documentation') {
steps {
sh '''
set -eu
cargo test --workspace --doc --all-features
RUSTDOCFLAGS='-D warnings' \
cargo doc --workspace --no-deps --all-features
'''
}
}
stage('Clippy') {
steps {
sh '''
set -eu
cargo clippy --workspace --all-targets --all-features
cargo clippy \
--workspace \
--all-targets \
--all-features \
-- \
-D warnings
'''
}
}
@ -87,6 +115,16 @@ pipeline {
sh '''
set -eu
cargo build --workspace --release --all-features
BINARY="${CARGO_TARGET_DIR}/release/fader_master"
if [ ! -x "${BINARY}" ]; then
echo "ERROR: expected release binary is missing or not executable: ${BINARY}" >&2
exit 1
fi
ls -lh "${BINARY}"
file "${BINARY}" || true
ldd "${BINARY}" || true
'''
}
}
@ -96,31 +134,41 @@ pipeline {
success {
publishChecks(
conclusion: 'SUCCESS',
name: 'fader_master CI',
name: 'Rust CI',
summary: 'fader_master passed CI.',
text: 'Workspace formatting, checks, tests, Clippy and release build completed successfully.',
text: 'Formatting, workspace checks, tests, documentation, warning-strict Clippy and the release build completed successfully.',
title: 'Build Successful'
)
echo 'fader_master passed CI.'
}
failure {
publishChecks(
conclusion: 'FAILURE',
name: 'fader_master CI',
name: 'Rust CI',
summary: 'fader_master failed CI.',
text: 'One or more Rust workspace checks failed. See the Jenkins log.',
text: 'Formatting, workspace checks, tests, documentation, Clippy, or the release build failed. See the Jenkins log.',
title: 'Build Failed'
)
echo 'fader_master CI failed.'
}
unstable {
publishChecks(
conclusion: 'ACTION_REQUIRED',
name: 'fader_master CI',
name: 'Rust CI',
summary: 'fader_master CI is unstable.',
text: 'The Jenkins build completed with an unstable status.',
text: 'The Jenkins build completed with an unstable status. See the Jenkins log.',
title: 'Build Unstable'
)
echo 'fader_master CI is unstable.'
}
cleanup {
deleteDir()
}
}
}
}