Compare commits

..

16 Commits

Author SHA1 Message Date
Dandaedre 49d1e9d300 v0.1.8 2023-05-25 20:09:15 +02:00
Dandaedre 93043bdd18 Test WinR 2023-05-25 20:09:15 +02:00
beffroi 6fb5e8409a "Fixes" a logging error by masking it 2023-05-25 20:09:15 +02:00
beffroi f6c6d0c5aa Adds a lot to the todo list, and adds a fast and wonky autoretry
fix the gitignore and ignore file
2023-05-25 20:09:15 +02:00
Dandaedre a87e425829 Typo(Doc) - Fixes a broken doc reference 2023-05-25 20:09:15 +02:00
Dandaedre 753e6cf4e5 Test(Coverage) - Adds the final coverage for bindings and corrects the python's side of implementation 2023-05-25 20:09:15 +02:00
Dandaedre 2aa56b70e4 Split Python bindings and finishes coverage 2023-05-25 20:09:15 +02:00
Dandaedre aae80ae864 Test(Coverage) - Adds the coverage of lib.rs and purges useless data from the report (python and main) 2023-05-25 20:09:15 +02:00
Dandaedre 6ec10f7372 Test(Coverage) - Adds solver coverage and fixes tests/ folder being there 2023-05-25 20:09:15 +02:00
Dandaedre 0b95d42d68 Coverage(Solver) - Puts solver at 76% coverage 2023-05-25 20:09:15 +02:00
Dandaedre 79a3006fa2 Reformat(All) - Reformats the code 2023-05-25 20:09:15 +02:00
Dandaedre 5cd3d65de6 Tests(Multiple) - Updates multiple test units 2023-05-25 20:09:15 +02:00
Dandaedre d5a0f1b543 Build(Tests) - Cleanup of the test harness 2023-05-25 20:09:15 +02:00
Dandaedre a6e7fac1b7 Coverage(actions) - Adds coverage of actions.rs 2023-05-25 20:09:15 +02:00
Dandaedre b91287c160 Merge pull request 'Release 0.1.7' (#26) from develop into releases
Reviewed-on: Dandaedre/xiv_csolver#26
2023-03-06 03:31:42 +01:00
Dandaedre f090c6551f Merge pull request 'develop' (#18) from develop into releases
Reviewed-on: Dandaedre/rcraft_solver#18
2023-02-25 15:31:39 +01:00
1 changed files with 0 additions and 232 deletions

232
Jenkinsfile vendored
View File

@ -1,232 +0,0 @@
// Add this webhook in Gitea:
// http://192.168.1.37:8080/gitea-webhook/post
pipeline {
agent { label 'rust_no_docker' }
environment {
CARGO_TERM_COLOR = 'always'
RUST_BACKTRACE = '1'
VENV = '.venv'
}
stages {
stage('Checkout') {
steps {
checkout scm
sh '''
set -eu
git submodule sync --recursive
git submodule update --init --recursive
'''
}
}
stage('Setup Rust') {
steps {
sh '''
set -eu
if ! command -v rustup >/dev/null 2>&1; then
echo "ERROR: rustup is not installed on this worker." >&2
exit 1
fi
echo "Ensuring stable Rust is available..."
rustup toolchain install stable \
--profile minimal \
--component rustfmt \
--component clippy
rustup default stable
echo
echo "Using:"
rustc --version
cargo --version
rustfmt --version
cargo clippy --version
'''
}
}
stage('Setup Python') {
steps {
sh '''
set -eu
if ! command -v uv >/dev/null 2>&1; then
echo "uv not found — installing it..."
if ! command -v cargo-binstall >/dev/null 2>&1; then
echo "cargo-binstall not found — installing it..."
cargo install cargo-binstall
fi
cargo binstall --no-confirm uv
else
echo "uv already installed."
fi
echo "Using:"
uv --version
rm -rf "${VENV}"
echo "Creating Python virtual environment..."
uv venv "${VENV}"
echo "Installing Maturin..."
uv pip install \
--python "${VENV}/bin/python" \
"maturin>=0.14,<0.15"
echo
echo "Python:"
"${VENV}/bin/python" --version
echo "Maturin:"
"${VENV}/bin/maturin" --version
'''
}
}
stage('Format') {
steps {
sh '''
set -eu
echo "Checking Rust formatting..."
cargo fmt --all -- --check
'''
}
}
stage('Rust Check') {
steps {
sh '''
set -eu
echo "Checking Rust targets..."
cargo check \
--all-targets \
--all-features
'''
}
}
stage('Rust Tests') {
steps {
sh '''
set -eu
echo "Running Rust tests..."
cargo test \
--all-targets \
--all-features
'''
}
}
stage('Clippy') {
steps {
sh '''
set -eu
echo "Running Clippy..."
cargo clippy \
--all-targets \
--all-features
'''
}
}
stage('Build CLI') {
steps {
sh '''
set -eu
echo "Building xiv_csolver CLI..."
cargo build \
--release \
--bin xiv_csolver_cli
echo
echo "CLI build completed."
if [ -f target/release/xiv_csolver_cli ]; then
ls -lh target/release/xiv_csolver_cli
fi
'''
}
}
stage('Build Python Bindings') {
steps {
sh '''
set -eu
echo "Building Python extension through Maturin..."
"${VENV}/bin/maturin" build \
--release
echo
echo "Python binding build completed."
'''
}
}
}
post {
success {
publishChecks(
conclusion: 'SUCCESS',
name: 'Rust/Python CI',
summary: 'xiv_csolver passed all CI checks.',
text: 'Formatting, Rust checks, tests, Clippy, CLI build, and Python binding build completed successfully.',
title: 'Build Successful'
)
echo '✅ xiv_csolver passed all CI checks.'
}
failure {
publishChecks(
conclusion: 'FAILURE',
name: 'Rust/Python CI',
summary: 'xiv_csolver failed CI.',
text: 'Formatting, Rust compilation, tests, Clippy, CLI build, or Maturin binding build failed. Check the Jenkins log.',
title: 'Build Failed'
)
echo '❌ xiv_csolver CI failed.'
}
unstable {
publishChecks(
conclusion: 'ACTION_REQUIRED',
name: 'Rust/Python CI',
summary: 'xiv_csolver CI is unstable.',
text: 'The Jenkins build completed with an unstable status.',
title: 'Build Unstable'
)
echo '⚠️ xiv_csolver CI is unstable.'
}
always {
sh '''
echo "Cleaning Python CI environment..."
rm -rf .venv
'''
}
}
}