Update jenkinsfiles to match upstream.

Windows now builds the actor editor for autobuilds, and stores the test
results.
All bundle now has an option to only build the macOS bundle and uses the
number of cores available to build.
docker-translations now builds the long string locale. Fixes #5009.
New script that is run periodically to check if the nopch build still
works.
Docker docs now builds the template analyser data and uploads it to the
server.
Add the design docs script.
Add a new script to build the game using linux with custom flags, such
as gles, clang, special linker etc.

This was SVN commit r27096.
This commit is contained in:
Stan 2022-09-11 17:28:32 +00:00
parent 4c4562699c
commit 7e481b73cd
11 changed files with 449 additions and 209 deletions

View file

@ -0,0 +1,54 @@
/* Copyright (C) 2022 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 is used to build the design document.
pipeline {
agent {
node {
label 'LinuxSlave'
}
}
stages {
stage("Checkout") {
steps {
ws("/zpool0/design-docs"){
git "https://code.wildfiregames.com/source/design.git"
}
}
}
stage("Generate") {
steps {
ws("/zpool0/design-docs"){
sh "mkdocs build"
}
}
}
stage("Upload") {
steps {
ws("/zpool0/design-docs"){
sh "rsync -rti --delete-after --progress site/ docs.wildfiregames.com:~/www/design/"
}
}
}
}
post {
always {
step([$class: 'PhabricatorNotifier'])
}
}
}

View file

@ -1,96 +0,0 @@
/* Copyright (C) 2021 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/>.
*/
pipeline {
agent {
node {
label 'LinuxSlave'
customWorkspace '/zpool0/trunk'
}
}
parameters {
string(name: 'DIFF_ID', defaultValue: '', description: '(optional) ID of the Phabricator Differential.')
booleanParam(name: 'NO_PCH', defaultValue: false, description: 'Run this build without PCH.')
booleanParam(name: 'DEBUG', defaultValue: false, description: 'Compile in debug mode.')
}
stages {
stage("Setup") {
steps {
sh "sudo zfs clone zpool0/gcc7@latest zpool0/custom"
}
}
stage("Apply Differential") {
when {
expression { return params.DIFF_ID != "" }
}
steps {
ws("/zpool0/custom") {
sh "arc patch --diff ${params.DIFF_ID} --force"
}
}
}
stage("PCH clean up") {
when {
expression { return params.NO_PCH }
}
steps {
ws("/zpool0/custom") {
sh "rm -rf build/workspaces/gcc/"
}
}
}
stage("Build") {
steps {
script {
ws("/zpool0/custom") {
// Destroy test *.cpp files as they use (invalid) absolute paths.
sh 'python3 -c \"import glob; print(\\\" \\\".join(glob.glob(\\\"source/**/tests/**.cpp\\\", recursive=True)));\" | xargs rm -v'
// Hack: ignore NVTT
sh "echo '' > libraries/source/nvtt/build.sh"
docker.image("0ad-gcc7:latest").inside {
stage("Update Workspaces") {
if (params.NO_PCH) {
sh "build/workspaces/update-workspaces.sh -j1 --without-pch"
} else {
sh "build/workspaces/update-workspaces.sh -j1"
}
}
stage("Build") {
if (params.DEBUG) {
sh "cd build/workspaces/gcc/ && make -j1 config=debug"
}
sh "cd build/workspaces/gcc/ && make -j1 config=release"
}
stage("Run tests") {
if (params.DEBUG) {
sh "binaries/system/test_dbg"
}
sh "binaries/system/test"
}
}
}
}
}
}
}
post {
always {
sh "sudo zfs destroy zpool0/custom"
}
}
}

View file

@ -0,0 +1,194 @@
/* Copyright (C) 2022 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 is used to build patches on various compilers.
def compilers = []
if (params["With Clang"])
{
compilers = ["clang7"]
}
else
{
compilers = ["gcc7"]
}
def patchesMap = compilers.collectEntries {
["${it}": patch(it)]
}
def patch(compiler) {
return {
stage("Patch: ${compiler}") {
try {
ws("/zpool0/${compiler}") {
sh "arc patch ${params.DIFF_ID} --force"
}
} catch(e) {
sh "sudo zfs rollback zpool0/${compiler}@latest"
throw e
}
}
}
}
def buildsMap = compilers.collectEntries {
["${it}": build(it)]
}
def build(compiler) {
return {
stage("Build: ${compiler}") {
try {
ws("/zpool0/${compiler}") {
docker.image("0ad-${compiler}:latest").inside {
script {
def NoAudioOption = ""
def NoPchOption = ""
def GlesOption = ""
def NoLobbyOption = ""
if (params["No PCH"])
{
NoPchOption="--without-pch "
}
if (params["OpenGL ES"])
{
GlesOption="--gles "
}
if (params["No Audio"])
{
NoAudioOption="--without-audio "
}
if (params["No Lobby"])
{
NoLobbyOption="--without-lobby "
}
sh "build/workspaces/update-workspaces.sh ${NoAudioOption}${GlesOption}${NoPchOption}${NoLobbyOption} -j1"
}
test_env="this is test env"
withEnv(["CXXFLAGS=${params.CXXFLAGS}", "CFLAGS=${params.CFLAGS}", "LDFLAGS=${params.LDFLAGS}"]){
if (params["CXXFLAGS"])
{
echo "Custom CXXFLAGS: ${env.CXXFLAGS}"
}
if (params["CFLAGS"])
{
echo "Custom CFLAGS: ${env.CFLAGS}"
}
if (params["Debug Build"])
{
def debugBuildErrorFile = "builderr-debug-${compiler}.log"
try {
try {
sh '''
CC_VERSION="$($CC --version | sed -e \'s/version//g\' -e \'s/(.*)//g' -e \'s/\\s//\' | sed 1q)"
CXX_VERSION="$($CXX --version | sed -e \'s/version//g\' -e \'s/(.*)//g' -e \'s/\\s//\' | sed 1q)"
echo "Building pyrogenesis in debug with $CC_VERSION/$CXX_VERSION using 2 jobs..."
'''
sh "cd build/workspaces/gcc/ && make config=debug clean && make -j2 config=debug 2> ../../../${debugBuildErrorFile}"
} catch(e) {
sh "rm -rf build/workspaces/gcc/obj/test_Debug"
throw e
}
} catch(e) {
throw e
} finally {
archiveArtifacts artifacts: "${debugBuildErrorFile}", fingerprint: true
}
def debugBuildTestFile = "cxxtest-debug-${compiler}.log"
try {
sh "binaries/system/test_dbg > ${debugBuildTestFile}"
} catch (e) {
echo (message: readFile (file: "${debugBuildTestFile}"))
throw e
} finally {
archiveArtifacts artifacts: "${debugBuildTestFile}", fingerprint: true
}
}
def releaseBuildErrorFile = "builderr-release-${compiler}.log"
try {
try {
sh '''
CC_VERSION="$($CC --version | sed -e \'s/version//g\' -e \'s/(.*)//g' -e \'s/\\s//\' | sed 1q)"
CXX_VERSION="$($CXX --version | sed -e \'s/version//g\' -e \'s/(.*)//g' -e \'s/\\s//\' | sed 1q)"
echo "Building pyrogenesis in release with $CC_VERSION/$CXX_VERSION using 2 jobs..."
'''
sh "cd build/workspaces/gcc/ && make clean && make -j2 config=release 2> ../../../${releaseBuildErrorFile}"
} catch(e) {
sh "rm -rf build/workspaces/gcc/obj/test_Release"
throw e
}
} catch(e) {
throw e
} finally {
archiveArtifacts artifacts: "${releaseBuildErrorFile}", fingerprint: true
}
def releaseBuildTestFile = "cxxtest-release-${compiler}.log"
try {
sh "binaries/system/test > ${releaseBuildTestFile}"
} catch (e) {
echo (message: readFile (file: "${releaseBuildTestFile}"))
throw e
} finally {
archiveArtifacts artifacts: "${releaseBuildTestFile}", fingerprint: true
}
}
}
}
} catch (e) {
throw e
} finally {
sh "sudo zfs rollback zpool0/${compiler}@latest"
}
}
}
}
pipeline {
agent {
node {
label 'LinuxSlave'
customWorkspace '/zpool0/trunk'
}
}
parameters {
string(name: 'DIFF_ID', defaultValue: '', description: 'ID of the Phabricator Differential.')
booleanParam(name: 'OpenGL ES', defaultValue: false, description: 'Build with --gles.')
booleanParam(name: 'No PCH', defaultValue: false, description: 'Build with --without-pch.')
booleanParam(name: 'No Audio', defaultValue: false, description: 'Build with --without-audio.')
booleanParam(name: 'No Lobby', defaultValue: false, description: 'Build with --without-lobby.')
}
stages {
stage("Patch") {
when { expression { return !!params.DIFF_ID } }
steps {
script { parallel patchesMap }
}
}
stage("Build") {
options {
timeout(time: 2, unit: 'HOURS')
}
steps {
script { parallel buildsMap }
}
}
}
}

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -17,7 +17,7 @@
// This pipeline is used to build patches on various compilers.
def compilers = ["gcc7"]
def compilers = ["gcc7", "clang7"]
def patchesMap = compilers.collectEntries {
["${it}": patch(it)]
@ -46,6 +46,7 @@ def build(compiler) {
try {
ws("/zpool0/${compiler}") {
docker.image("0ad-${compiler}:latest").inside {
sh "build/workspaces/update-workspaces.sh -j1 --jenkins-tests"
try {
@ -120,6 +121,7 @@ pipeline {
stages {
stage("Patch") {
when { expression { return !!params.DIFF_ID } }
steps {
sh "arc patch --diff ${params.DIFF_ID} --force"
script { parallel patchesMap }
@ -157,13 +159,13 @@ pipeline {
steps {
script {
try {
// arc lint outputs an empty file on success - unless there is nothing to lint.
// arc lint outputs an empty file on success - unless there is nothing to lint.
// On failure, it'll output the file and a failure error code.
// Explicitly checking for the file presence is thus best to detect the linter did run
sh 'arc lint --output jenkins --outfile .phabricator-lint && touch .phabricator-lint'
sh 'arc lint --never-apply-patches --output jenkins --outfile .phabricator-lint && touch .phabricator-lint'
} catch (e) {
if (!fileExists(".phabricator-lint")) {
sh '''echo '{ "path": "general", code": "Jenkins", "severity": "error", "name": "ci-error", "description": "Error running lint", "bypassChangedLineFiltering": true }' > .phabricator-lint '''
sh '''echo '{"General":[{"line": 0, "char": 0, "code": "Jenkins", "severity": "error", "name": "ci-error", "description": "Error running lint", "original": null, "replacement": null, "granularity": 1, "locations": [], "bypassChangedLineFiltering": true, "context": null}]}' > .phabricator-lint '''
}
}
}
@ -172,7 +174,7 @@ pipeline {
stage("Data checks") {
steps {
warnError('CheckRefs.pl script failed!') {
sh "cd source/tools/entity/ && perl checkrefs.pl --check-map-xml --validate-templates 2> data-errors.txt"
sh "cd source/tools/entity/ && python3 checkrefs.py -tax 2> data-errors.txt"
}
}
}

View file

@ -1,73 +1,80 @@
/* Copyright (C) 2021 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 is used to build the documentation.
pipeline {
agent {
node {
label 'LinuxSlave'
}
}
stages {
stage("Setup") {
steps {
sh "sudo zfs clone zpool0/gcc7@latest zpool0/entity-docs"
}
}
stage("Engine docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd docs/doxygen/ && doxygen config"
}
}
}
stage("Build") {
steps {
ws("/zpool0/entity-docs"){
sh "build/workspaces/update-workspaces.sh --disable-atlas --without-tests -j1"
sh "cd build/workspaces/gcc/ && make pyrogenesis -j1"
}
}
}
stage("Entity docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd binaries/system/ && ./pyrogenesis -mod=public -dumpSchema"
sh "cd source/tools/entdocs/ && ./build.sh"
}
}
}
stage("Upload") {
steps {
ws("/zpool0/entity-docs"){
sh "rsync -rti --delete-after --progress docs/doxygen/html/ docs.wildfiregames.com:~/www/pyrogenesis/"
sh "rsync -ti --progress source/tools/entdocs/entity-docs.html docs.wildfiregames.com:~/www/entity-docs/trunk.html"
sh "rsync -ti --progress source/tools/entdocs/entity-docs.css docs.wildfiregames.com:~/www/entity-docs/"
}
}
}
}
post {
always {
ws("/zpool0/trunk") {
sleep 10
sh "sudo zfs destroy zpool0/entity-docs"
}
}
}
}
/* Copyright (C) 2022 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 is used to build the documentation.
pipeline {
agent {
node {
label 'LinuxSlave'
}
}
stages {
stage("Setup") {
steps {
sh "sudo zfs clone zpool0/gcc7@latest zpool0/entity-docs"
}
}
stage("Engine docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd docs/doxygen/ && doxygen config"
}
}
}
stage("Build") {
steps {
ws("/zpool0/entity-docs"){
sh "build/workspaces/update-workspaces.sh --disable-atlas --without-tests -j1"
sh "cd build/workspaces/gcc/ && make pyrogenesis -j1"
}
}
}
stage("Entity docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd binaries/system/ && ./pyrogenesis -mod=public -dumpSchema"
sh "cd source/tools/entdocs/ && ./build.sh"
}
}
}
stage("Template Analyzer") {
steps {
ws("/zpool0/entity-docs"){
sh "cd source/tools/templatesanalyzer/ && python3 unitTables.py"
}
}
}
stage("Upload") {
steps {
ws("/zpool0/entity-docs"){
sh "rsync -rti --delete-after --progress docs/doxygen/html/ docs.wildfiregames.com:~/www/pyrogenesis/"
sh "rsync -ti --progress source/tools/entdocs/entity-docs.html docs.wildfiregames.com:~/www/entity-docs/trunk.html"
sh "rsync -ti --progress source/tools/templatesanalyzer/unit_summary_table.html docs.wildfiregames.com:~/www/templatesanalyzer/index.html"
}
}
}
}
post {
always {
ws("/zpool0/trunk") {
sleep 10
sh "sudo zfs destroy zpool0/entity-docs"
}
}
}
}

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,7 +18,7 @@
// This pipeline is used to build a clean base from scratch in order to
// use ZFS snapshots efficiently.
def compilers = ["gcc7"]
def compilers = ["gcc7", "clang7"]
def volumeUpdatesMap = compilers.collectEntries {
["${it}": volumeUpdate(it)]

View file

@ -0,0 +1,64 @@
/* Copyright (C) 2022 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 is used to build the documentation.
pipeline {
agent {
node {
label 'LinuxSlave'
}
}
stages {
stage("Setup") {
steps {
sh "sudo zfs clone zpool0/gcc7@latest zpool0/docker-nopch"
}
}
stage("Build") {
steps {
ws("/zpool0/docker-nopch"){
dir('build/workspaces/'){
sh "./update-workspaces.sh -j1 --without-pch"
dir('gcc/'){
sh "make clean"
sh "make -j1"
}
}
}
}
}
stage("Test") {
steps {
ws("/zpool0/docker-nopch"){
dir('build/workspaces/gcc'){
// as where it was built else nothing is generated.
sh "../../../binaries/system/test"
}
}
}
}
}
post {
always {
ws("/zpool0/trunk") {
sleep 10
sh "sudo zfs destroy zpool0/docker-nopch"
}
}
}
}

View file

@ -29,6 +29,11 @@ pipeline {
stage("Prepare volume") {
steps {
sh "sudo zfs clone zpool0/trunk@latest zpool0/translations"
ws('/zpool0/translations') {
sh "svn revert . -R"
sh "svn st | cut -c 9- | xargs rm -rf"
sh "svn up"
}
}
}
@ -36,7 +41,11 @@ pipeline {
steps {
ws('/zpool0/translations') {
withDockerContainer("0ad-translations:latest") {
sh "sh source/tools/i18n/maintenanceTasks.sh"
sh "python3 --version"
dir("source/tools/i18n/") {
sh "maintenanceTasks.sh"
sh "python3 generateDebugTranslation.py --long"
}
}
}
}
@ -47,7 +56,6 @@ pipeline {
ws('/zpool0/translations') {
withCredentials([usernamePassword(credentialsId: 'redacted', passwordVariable: 'SVNPASS', usernameVariable: 'SVNUSER')]) {
sh "svn relocate --username ${SVNUSER} --password ${SVNPASS} --no-auth-cache https://svn.wildfiregames.com/svn/ps/trunk"
sh "svn add --force binaries/"
sh "svn commit --username ${SVNUSER} --password ${SVNPASS} --no-auth-cache --non-interactive -m '[i18n] Updated POT and PO files.'"
}
}

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -29,6 +29,7 @@ pipeline {
booleanParam(name: 'ONLY_MOD', defaultValue: true, description: 'Only archive the mod mod.')
booleanParam(name: 'DO_GZIP', defaultValue: true, description: 'Create .gz unix tarballs as well as .xz')
booleanParam(name: 'FULL_REBUILD', defaultValue: true, description: 'Do a full rebuild (safer for release, slower).')
booleanParam(name: 'WINDOWS_UNIX', defaultValue: true, description: 'Build windows and unix bundles.')
}
stages {
@ -59,12 +60,12 @@ pipeline {
}
stage("Compile Mac Executable") {
steps {
sh "FULL_REBUILD=${params.FULL_REBUILD} source/tools/dist/build-osx-executable.sh"
sh "JOBS=\"-j\$(sysctl -n hw.ncpu)\" FULL_REBUILD=${params.FULL_REBUILD} source/tools/dist/build-osx-executable.sh"
}
}
stage("Create archive data") {
steps {
sh "ONLY_MOD=${params.ONLY_MOD} source/tools/dist/build-archives.sh"
sh "JOBS=\"-j\$(sysctl -n hw.ncpu)\" ONLY_MOD=${params.ONLY_MOD} source/tools/dist/build-archives.sh"
}
}
stage("Create Mac Bundle") {
@ -74,23 +75,26 @@ pipeline {
}
stage("Create Windows installer & *nix files") {
steps {
// The files created by the mac compilation need to be deleted
sh "svn st {binaries/,build/} --no-ignore | cut -c 9- | xargs rm -rfv"
// Hide the libraries folder.
sh "mv libraries/ temp_libraries/"
sh "svn revert libraries/ -R"
// The generated tests use hardcoded paths so they must be deleted as well.
sh 'python3 -c \"import glob; print(\\\" \\\".join(glob.glob(\\\"source/**/tests/**.cpp\\\", recursive=True)));\" | xargs rm -v'
sh "svn revert build/ -R"
script {
try {
// Then run the core object.
sh "BUNDLE_VERSION=${params.BUNDLE_VERSION} DO_GZIP=${params.DO_GZIP} source/tools/dist/build-unix-win32.sh"
} finally {
// Un-hide the libraries.
sh "rm -rfv libraries/"
sh "mv temp_libraries/ libraries/"
}
if(params.WINDOWS_UNIX)
{
// The files created by the mac compilation need to be deleted
sh "svn st {binaries/,build/} --no-ignore | cut -c 9- | xargs rm -rfv"
// Hide the libraries folder.
sh "mv libraries/ temp_libraries/"
sh "svn revert libraries/ -R"
// The generated tests use hardcoded paths so they must be deleted as well.
sh 'python3 -c \"import glob; print(\\\" \\\".join(glob.glob(\\\"source/**/tests/**.cpp\\\", recursive=True)));\" | xargs rm -v'
sh "svn revert build/ -R"
try {
// Then run the core object.
sh "JOBS=\"-j\$(sysctl -n hw.ncpu)\" BUNDLE_VERSION=${params.BUNDLE_VERSION} DO_GZIP=${params.DO_GZIP} source/tools/dist/build-unix-win32.sh"
} finally {
// Un-hide the libraries.
sh "rm -rfv libraries/"
sh "mv temp_libraries/ libraries/"
}
}
}
}
}

View file

@ -55,12 +55,12 @@ pipeline {
stage('Setup workspace') {
steps {
bat "del binaries\\system\\pyrogenesis.pdb binaries\\system\\pyrogenesis.exe"
script {
bat "del binaries\\system\\pyrogenesis.pdb binaries\\system\\pyrogenesis.exe"
script {
if (env.atlas == 'true') {
echo "atlas is enabled"
AtlasOption = "--atlas"
AtlasPrj = "/t:AtlasUI"
AtlasPrj = "/t:AtlasUI /t:ActorEditor"
bat "(robocopy /MIR C:\\wxwidgets-3.1.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
bat "(robocopy /MIR C:\\wxwidgets-3.1.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
bat "del binaries\\system\\AtlasUI.dll"
@ -76,23 +76,24 @@ pipeline {
bat "del binaries\\system\\Collada.dll"
}
output = bat(returnStdout: true, script: 'svnversion source -n').trim()
output = output.readLines().drop(1).join("")
output = (output.readLines().drop(1).join("").toInteger() + 1)
}
bat "cd build\\workspaces && update-workspaces.bat ${AtlasOption} ${GlooxOption} --large-address-aware --jenkins-tests"
bat "echo L\"${output}\" > build\\svn_revision\\svn_revision.txt"
bat "echo ${output}"
}
}
stage ('Build') {
steps {
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis ${AtlasPrj} /t:test /p:Configuration=Release")
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /nologo /p:XPDeprecationWarning=false /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis ${AtlasPrj} /t:test /p:Configuration=Release")
}
}
stage ('Build debug glooxwrapper') {
when { environment name: 'gloox', value: 'true'}
steps {
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v141_xp /t:glooxwrapper /p:Configuration=Debug")
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /nologo /p:XPDeprecationWarning=false /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:glooxwrapper /p:Configuration=Debug")
}
}
@ -110,11 +111,11 @@ pipeline {
steps {
bat "svn changelist --remove --recursive --cl commit ."
script {
if (env.pyrogenesis == 'true') {
if (env.pyrogenesis == 'true') {
bat "svn changelist commit binaries\\system\\pyrogenesis.pdb binaries\\system\\pyrogenesis.exe"
}
if (env.atlas == 'true') {
bat "svn changelist commit binaries\\system\\AtlasUI.dll"
bat "svn changelist commit binaries\\system\\AtlasUI.dll binaries\\system\\ActorEditor.exe"
}
if (env.collada == 'true') {
bat "svn changelist commit binaries\\system\\Collada.dll"

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -58,7 +58,7 @@ pipeline {
steps {
script {
try {
bat "arc patch --diff ${params.DIFF_ID} --force"
bat "arc patch --diff ${params.DIFF_ID} --force"
} catch (e) {
cleanFiles()
bat "arc patch --diff ${params.DIFF_ID} --force"
@ -90,7 +90,7 @@ pipeline {
timeout(time: 30)
}
steps {
catchError { // Debug tests might not work on Windows, see #3753. uncomment just below if they do work.
catchError {
script {
try {
bat 'binaries\\system\\test_dbg.exe > cxxtest_debug.xml'
@ -103,9 +103,11 @@ pipeline {
post {
failure {
echo (message: readFile (file: "cxxtest_debug.xml"))
archiveArtifacts artifacts: "cxxtest_debug.xml", fingerprint: true
}
always {
junit "cxxtest_debug.xml"
archiveArtifacts artifacts: "cxxtest_debug.xml", fingerprint: true
}
}
}