1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
/* -*- mode: groovy -*-
Confgure how to run our job in Jenkins.
See https://github.com/castle-engine/castle-engine/wiki/Cloud-Builds-(Jenkins) .
While PasDoc doesn't use Castle Game Engine,
but it uses CGE Jenkins infrastructure on https://jenkins.castle-engine.io/ ,
including a Docker image that contains various versions of FPC.
The resulting binaries are available on
https://pasdoc.github.io/DevelopmentSnapshots .
*/
pipeline {
agent any
stages {
stage('Linux stage') {
agent {
docker {
image 'kambi/castle-engine-cloud-builds-tools:cge-none'
}
}
stages {
stage('Test') {
steps {
sh 'source /usr/local/fpclazarus/bin/setup.sh default && make'
sh 'source /usr/local/fpclazarus/bin/setup.sh default && make tests'
}
}
stage('Clean') {
steps {
sh 'rm -f pasdoc-*.tar.gz pasdoc-*.zip'
sh 'make clean'
}
}
/* We don't need to package sources anymore.
GIT tag is enough, and GitHub makes a zip from it anyway.
stage('Package sources') {
steps {
sh 'make dist-src'
}
}
*/
stage('Build Linux/x86_64') {
steps {
sh 'make dist-linux-x86_64'
}
}
stage('Build Windows/i386') {
steps {
sh 'make dist-win32'
}
}
stage('Build Windows/x86_64') {
steps {
sh 'make dist-win64'
}
}
stage('Archiving') {
steps {
archiveArtifacts artifacts: 'pasdoc-*.tar.gz,pasdoc-*.zip'
}
}
}
}
stage('Raspberry Pi') {
agent {
label 'raspberry-pi-cge-builder'
}
stages {
stage('Clean RaspberryPi') {
steps {
sh 'rm -f pasdoc-*.tar.gz pasdoc-*.zip'
sh 'make clean'
}
}
stage('Test RaspberryPi') {
steps {
sh 'make'
sh 'make tests'
}
}
stage('Build RaspberryPi') {
steps {
sh 'make dist-linux-arm'
}
}
stage('Archiving RaspberryPi') {
steps {
archiveArtifacts artifacts: 'pasdoc-*.tar.gz,pasdoc-*.zip'
}
}
}
}
stage('macOS') {
agent {
label 'ios-cge-builder'
}
stages {
stage('Clean macOS') {
steps {
sh 'rm -f pasdoc-*.tar.gz pasdoc-*.zip'
sh 'make clean'
}
}
stage('Test macOS') {
steps {
sh 'make'
sh 'make tests'
}
}
stage('Build macOS') {
steps {
sh 'make dist-darwin-x86_64'
}
}
stage('Archiving macOS') {
steps {
archiveArtifacts artifacts: 'pasdoc-*.tar.gz,pasdoc-*.zip'
}
}
}
}
}
post {
regression {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build started failing: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
failure {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build failed: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
fixed {
mail to: 'michalis@castle-engine.io',
subject: "[jenkins] Build is again successfull: ${currentBuild.fullDisplayName}",
body: "See the build details on ${env.BUILD_URL}"
}
}
}
|