1
0
forked from mirrors/0ad

Automatically try to unbreak CI incremental builds

This entirely reverts ee3318309b and removes the [CLEANBUILD] feature,
which needed to be used without omission to be efficient.

Instead, in case of build failure, the CI automatically starts a
non-incremental second build by running `make clean` (or the MSBuild
equivalent) before retrying the build.
This commit is contained in:
Itms
2024-08-31 15:44:11 +02:00
committed by Nicolas Auvray
parent bcf97b608b
commit 79127ec59d
4 changed files with 63 additions and 75 deletions
+18 -25
View File
@@ -60,19 +60,6 @@ pipeline {
}
stages {
stage("Cleanup") {
when {
allOf {
environment name: 'JENKINS_PCH', value: 'pch'
changelog '.*\\[CLEANBUILD\\].*'
}
}
steps {
script { env.CLEANBUILD = 'true' }
sh "git clean -fdx build/ source/"
}
}
stage("Pre-build") {
steps {
sh "git lfs pull -I binaries/data/tests"
@@ -97,7 +84,15 @@ pipeline {
stage("Debug Build") {
steps {
sh "cd build/workspaces/gcc/ && make -j1 config=debug"
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j1 config=debug" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=debug"
throw e
}
}
}
timeout(time: 15) {
sh "cd binaries/system/ && ./test_dbg > cxxtest-debug.xml"
}
@@ -111,7 +106,15 @@ pipeline {
stage("Release Build") {
steps {
sh "cd build/workspaces/gcc/ && make -j1 config=release"
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j1 config=release" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=release"
throw e
}
}
}
timeout(time: 15) {
sh "cd binaries/system/ && ./test > cxxtest-release.xml"
}
@@ -123,16 +126,6 @@ pipeline {
}
}
}
post {
always {
script {
if (env.CLEANBUILD == 'true' && env.JENKINS_PCH == 'pch') {
sh "git clean -fdx build/ source/"
}
}
}
}
}
post {