86Box/.ci/Jenkinsfile

68 lines
1.4 KiB
Text
Raw Normal View History

2021-11-08 20:56:48 -05:00
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Jenkins build pipeline definition.
*
*
*
* Authors: RichardG, <richardg867@gmail.com>
*
* Copyright 2021 RichardG.
*/
def gitClone() {
cleanWs()
def scmVars = git url: 'https://github.com/richardg867/86Box.git',
2021-11-12 23:09:05 -05:00
branch: 'cleanup30'
env.GIT_COMMIT = scmVars.GIT_COMMIT
}
def windowsBuild() {
2021-11-10 13:40:19 -05:00
bat 'C:\\msys64\\msys2_shell.cmd -msys2 -defterm -here -no-start -c "exec .ci/build.sh"'
}
def unixBuild() {
2021-11-10 13:40:19 -05:00
sh 'chmod u+x .ci/build.sh && .ci/build.sh'
}
def saveArtifacts() {
archiveArtifacts artifacts: "${env.JOB_BASE_NAME}-*"
}
pipeline {
agent any
2021-11-08 20:56:48 -05:00
parameters {
choice(name: 'BUILD_TYPE',
2021-11-08 20:59:18 -05:00
choices: ['beta', 'none', 'alpha', 'beta', 'release'], // duplicated on purpose, first is default
2021-11-08 20:56:48 -05:00
description: 'Build type to pass on to CMake. This may affect the UI icon and feature set.')
}
stages {
stage('Build Windows') {
steps {
node('windows') {
gitClone()
windowsBuild()
saveArtifacts()
}
}
}
stage('Build Linux') {
steps {
node('debian') {
gitClone()
unixBuild()
saveArtifacts()
}
}
}
}
}