Patch - Refactors build and package stages for parallelism - V14.5.5

Improves build and package processes by introducing parallel execution for debug and release configurations.

This change reduces overall execution time by building and packaging debug and release versions concurrently.
This commit is contained in:
2025-10-08 16:17:15 +02:00
parent 0368276fbf
commit 467b357620

88
Jenkinsfile vendored
View File

@@ -8,7 +8,6 @@ pipeline {
} }
triggers { triggers {
// Poll SCM sans schedule - activé uniquement par webhook
pollSCM('') pollSCM('')
} }
@@ -20,50 +19,60 @@ pipeline {
} }
} }
stage('Build Debug') { stage('Build') {
steps { parallel {
echo 'Building Debug...' stage('Build Debug') {
bat """ steps {
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^ echo 'Building Debug...'
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^ bat """
/p:Configuration=Debug ^ "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
/p:Platform=x64 ^ "%WORKSPACE%\\KhaoticEngineReborn.sln" ^
/m ^ /p:Configuration=Debug ^
/verbosity:minimal /p:Platform=x64 ^
""" /m ^
} /verbosity:minimal
} """
}
stage('Build Release') { }
steps { stage('Build Release') {
echo 'Building Release...' steps {
bat """ echo 'Building Release...'
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^ bat """
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^ "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
/p:Configuration=Release ^ "%WORKSPACE%\\KhaoticEngineReborn.sln" ^
/p:Platform=x64 ^ /p:Configuration=Release ^
/m ^ /p:Platform=x64 ^
/verbosity:minimal /m ^
""" /verbosity:minimal
"""
}
}
} }
} }
stage('Package') { stage('Package') {
steps { parallel {
echo 'Packaging Debug and Release builds into ZIPs' stage('Package Debug') {
// Crée un dossier builds steps {
bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"' echo 'Packaging Debug build into ZIP'
// Compresse Debug bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"'
bat """ bat """
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Debug\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Debug.zip' -Force" powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Debug\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Debug.zip' -Force"
""" """
// Compresse Release }
bat """ }
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Release\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Release.zip' -Force" stage('Package Release') {
""" steps {
echo 'Packaging Release build into ZIP'
bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"'
bat """
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Release\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Release.zip' -Force"
"""
}
}
} }
} }
stage('Archive Artifacts') { stage('Archive Artifacts') {
steps { steps {
echo 'Archiving ZIP packages' echo 'Archiving ZIP packages'
@@ -83,7 +92,6 @@ pipeline {
echo 'Build failed! ❌' echo 'Build failed! ❌'
} }
cleanup { cleanup {
// Nettoie le workspace mais garde les artifacts
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true) cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
} }
} }