-
Notifications
You must be signed in to change notification settings - Fork 10
/
Jenkinsfile.differential
118 lines (113 loc) · 5.33 KB
/
Jenkinsfile.differential
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
def tascar_build_steps(stage_name) {
// Extract components from stage_name:
def system, arch, devenv
(system,arch,devenv) = stage_name.split(/ *&& */) // regexp for missing/extra spaces
// checkout tascarpro from version control system, the exact same revision that
// triggered this job on each build slave
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: "phabricator/diff/$DIFF_ID"]],
browser: [$class: 'Phabricator', repo: 'rTP',
repoUrl: 'https://dev.openmha.org/'],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'git',
url: "$GIT_SERVER_HZOL/mha_phabricator_staging"]]]
// Avoid that artifacts from previous builds influence this build
sh "git reset --hard && git clean -ffdx"
// get tags from public repo:
sh "git fetch --tags https://github.com/HoerTech-gGmbH/tascar"
if (system != "windows") {
// Autodetect libs/compiler on Unix
sh "make pack"
// Store debian packets for later retrieval by the repository manager
stash name: (arch+"_"+system), includes: 'packaging/deb/tascar/'
archiveArtifacts 'packaging/deb/tascar/**'
} else {
// Compile subset of TASCAR on Windows
sh "make -j 4 libtascar googletest"
sh "make -j 4 -C libtascar unit-tests"
sh "make -C apps build/tascar_cli"
sh "make -j 4 -C gui build/tascar_spkcalib build/tascar"
sh "make -C plugins build/.directory"
sh("make -C plugins -j 4 build/tascarsource_omni.dll" +
" build/tascar_ap_pink.dll build/tascar_ap_sndfile.dll" +
" build/tascar_ap_spksim.dll build/tascar_oscjacktime.dll" +
" build/tascar_system.dll build/tascarreceiver_hoa2d.dll" +
" build/tascarreceiver_hrtf.dll build/tascarreceiver_nsp.dll" +
" build/tascarreceiver_omni.dll build/tascar_hrirconv.dll" +
" build/tascarreceiver_foaconv.dll build/tascar_route.dll")
sh "mkdir -p TASCAR"
// Collect all compiled artifacts
sh "cp -v */build/[lt]*.{dll,exe} TASCAR"
// Add all DLLs dependencies provided by Msys2
dir('TASCAR') {
sh 'cp -v $(cygcheck ./* | grep mingw64 | sort -bu) .'
sh "mkdir -p share/{icons,glib-2.0} lib"
}
sh "cp -r /mingw64/share/icons/Adwaita TASCAR/share/icons"
sh "cp -r /mingw64/share/glib-2.0/schemas TASCAR/share/glib-2.0"
sh "cp -r /mingw64/lib/gdk-pixbuf-2.0 TASCAR/lib"
sh "cp /mingw64/bin/gdbus.exe TASCAR"
sh "cp /mingw64/bin/broadwayd.exe TASCAR"
sh "cp artwork/*.png TASCAR"
// Now create the zip file from everything inside the TASCAR dir
sh 'zip -r TASCAR-$(grep ^VERSION= config.mk | cut -d= -f2)-windows.zip TASCAR'
archiveArtifacts 'TASCAR-*-windows.zip'
}
}
pipeline {
agent {label "pipeline"}
options {
buildDiscarder(logRotator(daysToKeepStr: '7', artifactDaysToKeepStr: '7'))
}
parameters {
string(name: 'PHID', defaultValue: 'invalidDefault', description: '')
string(name: 'DIFF_ID', defaultValue: 'invalidDefault', description: '')
}
stages {
stage("build") {
parallel {
stage( "jammy && x86_64 && tascardev") {
agent {label "jammy && x86_64 && tascardev"}
steps {tascar_build_steps("jammy && x86_64 && tascardev")}
}
stage( "focal && x86_64 && tascardev") {
agent {label "focal && x86_64 && tascardev"}
steps {tascar_build_steps("focal && x86_64 && tascardev")}
}
stage( "bionic && x86_64 && tascardev") {
agent {label "bionic && x86_64 && tascardev"}
steps {tascar_build_steps("bionic && x86_64 && tascardev")}
}
stage( "bullseye && armv7 && tascardev") {
agent {label "bullseye && armv7 && tascardev"}
steps {tascar_build_steps("bullseye && armv7 && tascardev")}
}
stage( "bionic && armv7 && tascardev") {
agent {label "bionic && armv7 && tascardev"}
steps {tascar_build_steps("bionic && armv7 && tascardev")}
}
stage( "windows && x86_64 && tascardev") {
agent {label "windows && x86_64 && tascardev"}
steps {tascar_build_steps("windows && x86_64 && tascardev")}
}
}
}
}
post {
always {
script {
// workaround. See https://github.com/uber/phabricator-jenkins-plugin/pull/185
currentBuild.result = currentBuild.currentResult
}
step([$class: 'PhabricatorNotifier',
commentOnSuccess: true,
commentWithConsoleLinkOnFailure: true,
uberallsEnabled: false,
customComment: false,
processLint: false])
}
}
}