Itms
ee3318309b
In all the builds using precompiled headers, an update to libraries will crash the CI, as those headers will become outdated. It is then necessary to force a full rebuild of the game by cleaning up the workspaces. This commit allows this CI behavior to be triggered by specifying [CLEANBUILD] in the first line of the commit message. This will constitute an opportunity to inform users that they need to clean their workspaces when pulling the update.
92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
/* Copyright (C) 2024 Wildfire Games.
|
|
* This file is part of 0 A.D.
|
|
*
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
// This pipeline builds the game on FreeBSD (which uses the clang-17 compiler) and runs tests.
|
|
// Due to a compilation bug with SpiderMonkey, the game is only built with the release configuration.
|
|
|
|
pipeline {
|
|
// Stop previous build in pull requests, but not in branches
|
|
options { disableConcurrentBuilds(abortPrevious: env.CHANGE_ID != null) }
|
|
|
|
agent {
|
|
node {
|
|
label 'FreeBSDAgent'
|
|
customWorkspace 'workspace/clang17'
|
|
}
|
|
}
|
|
environment {
|
|
USE = 'iconv'
|
|
WX_CONFIG = '/usr/local/bin/wxgtk3u-3.0-config'
|
|
CXXFLAGS = '-stdlib=libc++ '
|
|
LLVM_OBJDUMP = '/usr/bin/llvm-objdump'
|
|
}
|
|
stages {
|
|
stage("Cleanup") {
|
|
when {
|
|
changelog '.*\\[CLEANBUILD\\].*'
|
|
}
|
|
steps {
|
|
script { env.CLEANBUILD = 'true' }
|
|
sh "git clean -fdx build/ source/"
|
|
}
|
|
}
|
|
|
|
stage ("Pre-build") {
|
|
steps {
|
|
discoverGitReferenceBuild()
|
|
|
|
sh "git lfs pull -I binaries/data/tests"
|
|
sh "git lfs pull -I \"binaries/data/mods/_test.*\""
|
|
|
|
sh "libraries/build-source-libs.sh -j2 2> freebsd-prebuild-errors.log"
|
|
sh "build/workspaces/update-workspaces.sh -j2 --jenkins-tests 2>> freebsd-prebuild-errors.log"
|
|
}
|
|
post {
|
|
failure {
|
|
echo (message: readFile (file: "freebsd-prebuild-errors.log"))
|
|
}
|
|
}
|
|
}
|
|
|
|
stage ("Release Build") {
|
|
steps {
|
|
sh "cd build/workspaces/gcc/ && gmake -j2 config=release"
|
|
|
|
timeout(time: 15) {
|
|
sh "cd binaries/system/ && ./test > cxxtest-release.xml"
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
junit 'binaries/system/cxxtest-release.xml'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
script {
|
|
if (env.CLEANBUILD == 'true') {
|
|
sh "git clean -fdx build/ source/"
|
|
}
|
|
}
|
|
recordIssues enabledForFailure: true, qualityGates: [[threshold: 1, type: 'NEW']], tool: clang()
|
|
}
|
|
}
|
|
}
|