2016-10-25 18:10:21 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2016-10-25 22:01:59 +00:00
|
|
|
node('master') {
|
2017-06-30 21:24:40 +00:00
|
|
|
checkout scm
|
|
|
|
|
2016-10-25 22:51:30 +00:00
|
|
|
def changelog = getChangeLog currentBuild
|
2016-10-25 22:01:59 +00:00
|
|
|
|
2017-06-30 20:43:39 +00:00
|
|
|
mattermostSend "Building ${env.JOB_NAME} #${env.BUILD_NUMBER} \n Change Log: \n ${changelog}"
|
2016-10-25 22:01:59 +00:00
|
|
|
}
|
2016-10-25 21:58:27 +00:00
|
|
|
|
2016-10-25 18:10:21 +00:00
|
|
|
parallel 'centos7': {
|
|
|
|
node('centos7') {
|
2016-10-25 21:35:31 +00:00
|
|
|
try {
|
|
|
|
checkout scm
|
2016-10-25 18:10:21 +00:00
|
|
|
|
2016-10-25 21:35:31 +00:00
|
|
|
stage('Build Centos 7') {
|
2019-08-12 20:11:43 +00:00
|
|
|
sh '''. /opt/rh/devtoolset-8/enable
|
2019-08-12 19:58:10 +00:00
|
|
|
rm -rf build/
|
2019-08-12 19:44:47 +00:00
|
|
|
mkdir build && cd build
|
2019-08-12 19:58:10 +00:00
|
|
|
cmake ..
|
2019-08-01 22:13:06 +00:00
|
|
|
make -j4
|
|
|
|
'''
|
2016-10-25 21:35:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
currentBuild.result = "FAILURE"
|
2017-06-30 20:43:39 +00:00
|
|
|
mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Centos 7 (<${env.BUILD_URL}|Open>)"
|
2016-10-25 21:35:31 +00:00
|
|
|
|
|
|
|
throw err
|
2016-10-25 18:18:26 +00:00
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2019-06-13 17:35:54 +00:00
|
|
|
// }, 'android-ndk': {
|
|
|
|
// node('android-ndk') {
|
|
|
|
// try {
|
|
|
|
// checkout scm
|
2016-10-25 18:18:26 +00:00
|
|
|
|
2019-06-13 17:35:54 +00:00
|
|
|
// stage('Build Android NDK') {
|
|
|
|
// sh "/android/android-ndk-r15b/ndk-build -C $WORKSPACE/java ZT1=${WORKSPACE}"
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// catch (err) {
|
|
|
|
// currentBuild.result = "FAILURE"
|
|
|
|
// mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Android NDK (<${env.BUILD_URL}|Open>)"
|
2016-10-25 21:35:31 +00:00
|
|
|
|
2019-06-13 17:35:54 +00:00
|
|
|
// throw err
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }, 'macOS': {
|
|
|
|
// node('macOS') {
|
|
|
|
// try {
|
|
|
|
// checkout scm
|
2016-10-25 21:35:31 +00:00
|
|
|
|
2019-06-13 17:35:54 +00:00
|
|
|
// stage('Build macOS') {
|
|
|
|
// sh 'make -f make-mac.mk'
|
|
|
|
// }
|
2016-10-25 19:40:03 +00:00
|
|
|
|
2019-06-13 17:35:54 +00:00
|
|
|
// stage('Build macOS UI') {
|
|
|
|
// sh 'cd macui && xcodebuild -target "ZeroTier One" -configuration Debug'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// catch (err) {
|
|
|
|
// currentBuild.result = "FAILURE"
|
|
|
|
// mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on macOS (<${env.BUILD_URL}|Open>)"
|
2016-10-25 19:58:54 +00:00
|
|
|
|
2019-06-13 17:35:54 +00:00
|
|
|
// throw err
|
|
|
|
// }
|
|
|
|
// }
|
2019-06-13 17:38:42 +00:00
|
|
|
// }, 'windows': {
|
|
|
|
// node('windows') {
|
|
|
|
// try {
|
|
|
|
// checkout scm
|
2016-11-28 21:06:28 +00:00
|
|
|
|
2019-06-13 17:38:42 +00:00
|
|
|
// stage('Build Windows') {
|
|
|
|
// bat '''CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" amd64
|
|
|
|
// git clean -dfx
|
|
|
|
// msbuild windows\\ZeroTierOne.sln
|
|
|
|
// '''
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// catch (err) {
|
|
|
|
// currentBuild.result = "FAILURE"
|
|
|
|
// mattermostSend color: '#ff0000', message: "${env.JOB_NAME} broken on Windows (<${env.BUILD_URL}|Open>)"
|
2016-11-28 22:57:37 +00:00
|
|
|
|
2019-06-13 17:38:42 +00:00
|
|
|
// throw err
|
|
|
|
// }
|
|
|
|
// }
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2016-10-25 21:35:31 +00:00
|
|
|
|
2017-06-30 20:43:39 +00:00
|
|
|
mattermostSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
|