1
0
forked from 0ad/0ad

Do not hardcode JOBS in CI pipelines

This build environment variable is now set agent-wide and corresponds to
the number of CPUs of each agent.
This commit is contained in:
Nicolas Auvray 2024-09-01 10:35:41 +02:00 committed by Nicolas Auvray
parent 670f68c1c5
commit f7630b155c
4 changed files with 13 additions and 13 deletions

View File

@ -42,8 +42,8 @@ pipeline {
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"
sh "libraries/build-source-libs.sh 2> freebsd-prebuild-errors.log"
sh "build/workspaces/update-workspaces.sh --jenkins-tests 2>> freebsd-prebuild-errors.log"
}
post {
failure {
@ -56,7 +56,7 @@ pipeline {
steps {
retry (2) {
script {
try { sh "cd build/workspaces/gcc/ && gmake -j2 config=release" }
try { sh "cd build/workspaces/gcc/ && gmake config=release" }
catch(e) {
sh "cd build/workspaces/gcc/ && gmake clean config=release"
throw e

View File

@ -65,13 +65,13 @@ pipeline {
sh "git lfs pull -I binaries/data/tests"
sh "git lfs pull -I \"binaries/data/mods/_test.*\""
sh "libraries/build-source-libs.sh -j1 2> ${JENKINS_COMPILER}-prebuild-errors.log"
sh "libraries/build-source-libs.sh 2> ${JENKINS_COMPILER}-prebuild-errors.log"
script {
if (env.JENKINS_PCH == "no-pch") {
sh "build/workspaces/update-workspaces.sh -j1 --jenkins-tests --without-pch 2>> ${JENKINS_COMPILER}-prebuild-errors.log"
sh "build/workspaces/update-workspaces.sh --jenkins-tests --without-pch 2>> ${JENKINS_COMPILER}-prebuild-errors.log"
} else {
sh "build/workspaces/update-workspaces.sh -j1 --jenkins-tests 2>> ${JENKINS_COMPILER}-prebuild-errors.log"
sh "build/workspaces/update-workspaces.sh --jenkins-tests 2>> ${JENKINS_COMPILER}-prebuild-errors.log"
}
}
}
@ -86,7 +86,7 @@ pipeline {
steps {
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j1 config=debug" }
try { sh "cd build/workspaces/gcc/ && make config=debug" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=debug"
throw e
@ -108,7 +108,7 @@ pipeline {
steps {
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j1 config=release" }
try { sh "cd build/workspaces/gcc/ && make config=release" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=release"
throw e

View File

@ -36,8 +36,8 @@ pipeline {
sh "git lfs pull -I binaries/data/tests"
sh "git lfs pull -I \"binaries/data/mods/_test.*\""
sh "libraries/build-macos-libs.sh -j4 2> macos-prebuild-errors.log"
sh "build/workspaces/update-workspaces.sh -j4 --jenkins-tests 2>> macos-prebuild-errors.log"
sh "libraries/build-macos-libs.sh 2> macos-prebuild-errors.log"
sh "build/workspaces/update-workspaces.sh --jenkins-tests 2>> macos-prebuild-errors.log"
}
post {
failure {
@ -50,7 +50,7 @@ pipeline {
steps {
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j4 config=debug" }
try { sh "cd build/workspaces/gcc/ && make config=debug" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=debug"
throw e
@ -72,7 +72,7 @@ pipeline {
steps {
retry(2) {
script {
try { sh "cd build/workspaces/gcc/ && make -j4 config=release" }
try { sh "cd build/workspaces/gcc/ && make config=release" }
catch(e) {
sh "cd build/workspaces/gcc/ && make clean config=release"
throw e

View File

@ -18,7 +18,7 @@
// This pipeline builds the game on Windows (which uses the MSVC 15.0 compiler from Visual Studio 2017) and runs tests.
def visualStudioPath = "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\""
def buildOptions = "/p:PlatformToolset=v141_xp /p:XPDeprecationWarning=false /t:pyrogenesis /t:AtlasUI /t:test /m:2 /nologo -clp:NoSummary"
def buildOptions = "/p:PlatformToolset=v141_xp /p:XPDeprecationWarning=false /t:pyrogenesis /t:AtlasUI /t:test /nologo -clp:NoSummary"
pipeline {
// Stop previous build in pull requests, but not in branches