-
-
Notifications
You must be signed in to change notification settings - Fork 351
/
Jenkinsfile-dynamatrix
1380 lines (1267 loc) · 76 KB
/
Jenkinsfile-dynamatrix
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env groovy
// ^^^ For syntax highlighters
/* Typical Keep this build description formula for custom replayed builds (see below):
Kept for reference: build of commit https://github.com/networkupstools/nut/commit/86a32237c7df45c5aba640746f7afc4de09505a1
PR https://github.com/networkupstools/nut/pull/1047
A milestone of "fightwarn" effort attacking actual warnings in codebase Jun 2021
def buildCommit = '86a32237c7df45c5aba640746f7afc4de09505a1'
*/
// See https://github.com/networkupstools/jenkins-dynamatrix/ for the lib
// Agent setup evolves at https://ci.networkupstools.org/computer/
// NOTE: The "${BRANCH_NAME}" below IS NOT A VARIABLE!
// Special notation per custom plugin build including changes from
// https://github.com/jenkinsci/pipeline-groovy-lib-plugin/pull/19/
@Library('jenkins-dynamatrix@${BRANCH_NAME}') _
import org.nut.dynamatrix.dynamatrixGlobalState;
import org.nut.dynamatrix.*;
// dynacfgBase = Base configuration for Dynamatrix for this pipeline
// dynacfgPipeline = Step-dependent setup in sub-maps
def dynacfgBase = [:]
def dynacfgPipeline = [:]
// NOTE: These can be further disabled or active in different combo specs
// below based on branch names. Also note that the values are somewhat
// "inversed" -- e.g. that "disabledSomething = false" means "enable it".
dynacfgPipeline.disableSlowBuildAutotools = false
dynacfgPipeline.disableSlowBuildCIBuild = false
dynacfgPipeline.disableSlowBuildCIBuildExperimental = false
// NOTE: Disabled by default because with -std=c* the compiler and linker
// (at least on environments NUT CI farm has) do not "see" many things,
// and do not even define WIN32, and this is unrelated to NUT codebase.
// This toggle aims to only disable 'c' builds in the scenario; but the
//'gnu' ones should still happen if it is enabled overall.
dynacfgPipeline.disableStrictCIBuild_CrossWindows = true
// At this time, GCC succeeds building C89/GNU89 mode for NUT
// while CLANG complains about things we can't fix easily.
dynacfgPipeline.axisCombos_COMPILER_GCC = [~/COMPILER=GCC/]
dynacfgPipeline.axisCombos_COMPILER_NOT_GCC = [~/COMPILER=(?!GCC)/]
// Avoid requiring success on GCC so old we can't manage warnings by CLI or pragmas:
dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD = [~/COMPILER=GCC/, ~/GCCVER=([0123]\.|4\.[0123])/]
// Beside the flag here, the pre-defined C89/C90/ANSI scenarios
// should only get considered in branches named ~/fightwarn.*89.*/
// or PRs to those (for non-GCC builds):
dynacfgPipeline.disableSlowBuildCIBuildExperimentalANSI = false
// The NUT CI farm offers a few other architectures in containers backed
// by QEMU virtual CPUs. Running builds in these is expensive (takes a
// lot of time and can lag the NUT pipeline), so we would run just a few
// scenarios there to ensure code compatibility with headers and libs,
// but not exhaustive tests that can be done elsewhere. Currently this
// workload hits the Linux builder that completes its usual work earlier
// than some other builders, so a few minutes more would not hit pipeline
// wallclock time frame much. The slowBuild filter rules rely on separate
// label patterns with "qemu-nut-builder" and/or "qemu-nut-builder:alldrv".
dynacfgPipeline.disableSlowBuildCIBuild_QEMU = true
//if ( env?.BRANCH_NAME ==~ /master|main|stable|.*qemu.*/ ) {
if ( env?.BRANCH_NAME ==~ /.*qemu.*/ ) {
dynacfgPipeline.disableSlowBuildCIBuild_QEMU = false
}
dynacfgPipeline.traceBuildShell_configureEnvvars = false // true
dynacfgPipeline.traceBuildShell = false // true
//if (false) // <<< (Un-)comment away in select runs/branches
//if (true) // <<< (Un-)comment away in select runs/branches
if ( env?.BRANCH_NAME ==~ /.*fightwarn-verbose.*/ )
{
dynacfgPipeline.traceBuildShell_configureEnvvars = true // false
dynacfgPipeline.traceBuildShell = true // false
}
dynacfgPipeline.failFast = //true //
false
// How long can a single "slow-build stage" run before we
// consider that the build agent is stuck or network dropped?
// The dynamatrix should try to re-schedule this scenario then.
dynacfgPipeline.dsbcStageTimeoutSettings = [
time: 2,
unit: 'HOURS'
]
// Note: this setting causes a lot of noise in build summary page and
// parent job definition (PR, branch...) overview page on Jenkins,
// by reporting dozens of lines for each analyzer ID ever published.
// Do not enable instant (non-delayed, "false" here) reports for the
// "master" and equivalent branch builds.
dynacfgPipeline.delayedIssueAnalysis = //false //
true
// In modern builds, use the ci_build.sh recipe which first checks
// quietly for things that succeed, and summarizes errors in the end
dynacfgPipeline['spellcheck_prepconf'] = false
dynacfgPipeline['spellcheck_configure'] = false
dynacfgPipeline['spellcheck'] = '(BUILD_TYPE=default-spellcheck ./ci_build.sh)'
/*
// For older builds, with only autotools in the tree:
dynacfgPipeline['spellcheck'] = //false //true
// '( \${MAKE} VERBOSE=1 SPELLCHECK_ERROR_FATAL=yes spellcheck )'
*/
//dynacfgPipeline['shellcheck'] = true
// Check shell scripts as well as make implementations registered on
// CI farm -- that they do not fundamentally reject our Makefile syntax.
// Note that if MAKE=something does not get into envvars, defaultTools
// are used (just assigning it among build agent labels is not enough).
dynacfgPipeline['shellcheck'] = [
//'stageNameFunc': null,
//'dynamatrixAxesLabels': [~/^OS_.+/, 'MAKE'],
'dynamatrixAxesLabels': ['OS_FAMILY', 'OS_DISTRO', 'MAKE'],
'single': '( if [ x"\${MAKE-}" = x ]; then echo "WARNING: MAKE is somehow unset, defaulting!" >&2; MAKE=make; fi; \${MAKE} shellcheck )',
'multi': '(cd tests && SERVICE_FRAMEWORK="selftest" SHELL_PROGS="$SHELL_PROGS" ./nut-driver-enumerator-test.sh )',
'multiLabel': 'SHELL_PROGS',
'skipShells': [ 'zsh', 'tcsh', 'csh' ]
]
/*
// Examples for custom checkouts instead of following a branch/PR that triggered the build:
//dynacfgPipeline.bodyStashCmd = { git (url: "https://github.com/networkupstools/nut", branch: "fightwarn") }
//def buildCommit = '86a32237c7df45c5aba640746f7afc4de09505a1'
def buildCommit = 'refs/tags/v2.7.4'
dynacfgPipeline.bodyStashCmd = { checkout([
$class: 'GitSCM', branches: [[name: buildCommit]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: false, recursiveSubmodules: false, reference: '', trackingSubmodules: false]],
submoduleCfg: [],
userRemoteConfigs: [[url: "https://github.com/networkupstools/nut"]]
])
}
// While building older release (2.7.4) disable recipes that did not exist back then
dynacfgPipeline['stylecheck'] = false //true
dynacfgPipeline['spellcheck'] = false //true
dynacfgPipeline['shellcheck'] = false //true
dynacfgPipeline.disableSlowBuildCIBuild = true
dynacfgPipeline.disableSlowBuildCIBuildExperimental = true
*/
dynacfgBase['commonLabelExpr'] = 'nut-builder'
dynacfgBase['dynamatrixAxesLabels'] = //[~/^OS_.+/]
['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}']
dynacfgBase['dynamatrixAxesCommonEnv'] = [ ['LANG=C', 'LC_ALL=C', 'TZ=UTC'] ]
dynacfgPipeline.stashnameSrc = 'nut-ci-src'
// These platforms do not serve a functional cppunit for gcc,
// so a diverse C++ build matrix on them is pointless; thus
// so far we allow-failure (or avoid C++11 and newer builds)
// on OpenIndiana (cppcheck pkg seems flawed, at least in
// various versions of GCC builds) and BSD (also just for GCC):
dynacfgPipeline.axisCombos_CPPUNIT = [~/OS_DISTRO=(openindiana|freebsd).*/, ~/CSTDVERSION_cxx=[12].+/, ~/COMPILER=GCC/]
// Avoid mix-up of bitness-related requests and abilities
dynacfgPipeline.axisCombos_ARCH32x64 = [~/BITS=32/, ~/ARCH_BITS=64/]
dynacfgPipeline.axisCombos_ARCH64x32 = [~/BITS=64/, ~/ARCH_BITS=32/]
// Some (but not all) builds skip strict-C standard due to
// current build failures with its requirements
dynacfgPipeline.axisCombos_STRICT_C = [~/CSTDVARIANT=c/]
dynacfgPipeline.axisCombos_GNU_C = [~/CSTDVARIANT=gnu/]
// Here we consider native-platform builds on a Windows box
// (possibly with need for "bat" instead of "sh" steps):
dynacfgPipeline.axisCombos_WINDOWS = [~/OS_FAMILY=windows/]
dynacfgPipeline.axisCombos_NOT_WINDOWS = [~/OS_FAMILY=(?!windows)/]
// TODO: some cross-build enviroments like Linux with mingw?
// Currently done as an explicit scenario below...
dynacfgPipeline.axisCombos_WINDOWS_CROSS = [~/OS_FAMILY=(mingw|mingw32|mingw64|msys2)/]
dynacfgPipeline.axisCombos_NOT_WINDOWS_CROSS = [~/OS_FAMILY=(?!(mingw|mingw32|mingw64|msys2))/]
// At a minimum, we don't want to mess up our arches:
dynacfgPipeline.excludeCombos_DEFAULT = [
dynacfgPipeline.axisCombos_ARCH32x64,
dynacfgPipeline.axisCombos_ARCH64x32
]
dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT = [
dynacfgPipeline.axisCombos_CPPUNIT,
dynacfgPipeline.axisCombos_ARCH32x64,
dynacfgPipeline.axisCombos_ARCH64x32
]
dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C = [
dynacfgPipeline.axisCombos_STRICT_C,
dynacfgPipeline.axisCombos_ARCH32x64,
dynacfgPipeline.axisCombos_ARCH64x32
]
dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C = [
dynacfgPipeline.axisCombos_CPPUNIT,
dynacfgPipeline.axisCombos_STRICT_C,
dynacfgPipeline.axisCombos_ARCH32x64,
dynacfgPipeline.axisCombos_ARCH64x32
]
dynacfgPipeline.branchStableRegex = ~/^(master|main|stable)$/
if ( env?.BRANCH_NAME ==~ /^fightwarn.*$/ && (!env?.CHANGE_TARGET) ) {
dynamatrixGlobalState.branchDefaultStable = 'fightwarn'
}
if ( env?.BRANCH_NAME ==~ dynacfgPipeline.branchStableRegex ) {
// For our main branches we want all builds in full,
// to keep reference for warnings-ng up to date, so do
// not limit ny appliesToChangedFilesRegex categories
// Be sure to not make noise in long-lived branches'
// overview pages by enabling quick analysis publishing
// (by default above, or in a Replay):
dynacfgPipeline.delayedIssueAnalysis = true
} else {
// First list the building blocks as lists of files;
// final regexes are arranged below:
// TODO: Technically the slash should be the Path.Separator,
// but at least modern windows can handle a sh step with that
// character, so no big deal for NUT supported platforms
dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX = ~/^(\/*|.*\/)/
dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE = ~/(configure\.ac|.*\.m4|C?Make.*|ci_.*\.sh|autogen\.sh|\.git.*|Jenkinsfile.*|.*\.groovy)/
dynacfgPipeline.appliesToChangedFilesRegex_FILES_C = ~/^(.*\.h|.*\.hpp|.*\.c|.*\.cxx|.*\.cpp)/
dynacfgPipeline.appliesToChangedFilesRegex_FILES_TXT = ~/^(.*\.txt|.*\.dict|asciidoc.*|.*\.xsl|.*\.css|AUTHORS.*|CHANGELOG.*|COPYING.*|INSTALL.*|LICENSE.*|MAINT.*|NEWS.*|README.*|TODO.*|UPGRAD.*)/
dynacfgPipeline.appliesToChangedFilesRegex_FILES_IMG = ~/^(.*\.svg|.*\.png|.*\.jpg|.*\.jpeg|.*\.gif)/
dynacfgPipeline.appliesToChangedFilesRegex_FILES_PY = ~/^(.*\.py|scripts\/python\/app\/Nut-Monitor)/
// Recipe changes and C source changes go here:
dynacfgPipeline.appliesToChangedFilesRegex_RECIPE = ~/${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX}${dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE}(|\.in)$/
dynacfgPipeline.appliesToChangedFilesRegex_C = ~/${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX}(${dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE}|${dynacfgPipeline.appliesToChangedFilesRegex_FILES_C})(|\.in)$/
dynacfgPipeline.appliesToChangedFilesRegex_PY = ~/${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX}(${dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE}|${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PY})(|\.in)$/
// Recipe changes and docs source changes go here:
dynacfgPipeline.appliesToChangedFilesRegex_TXT = ~/${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX}(${dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE}|${dynacfgPipeline.appliesToChangedFilesRegex_FILES_TXT}(|\.in)$)/
dynacfgPipeline.appliesToChangedFilesRegex_DOC = ~/${dynacfgPipeline.appliesToChangedFilesRegex_FILES_PREFIX}(${dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE}|${dynacfgPipeline.appliesToChangedFilesRegex_FILES_TXT}|${dynacfgPipeline.appliesToChangedFilesRegex_FILES_IMG})(|\.in)$/
// TODO: Similar for shell files but based on some logic
// like in shellcheck to find the script files (not only *.sh)?
}
// Do not override DISTCHECK_CONFIGURE_FLAGS as default implem
// does, that breaks custom proto-dir installs and tries to go
// into (not writeable) system paths:
if (!dynacfgPipeline.containsKey('buildPhases')) {
dynacfgPipeline.buildPhases = [:]
}
// Imported from jenkins-dynamatrix JSL vars/autotools.groovy:
// a workaround for the cases of curiously missing MAKE envvar...
dynacfgPipeline.buildPhases['distcheck'] = """( if [ x"\${MAKE-}" = x ]; then echo "WARNING: MAKE is somehow unset, defaulting!" >&2; MAKE=make; fi; eval \${CONFIG_ENVVARS} time \${MAKE} \${MAKE_OPTS} distcheck DISTCHECK_FLAGS=\${CONFIG_OPTS:+\\"\$CONFIG_OPTS\\"} )"""
// Note: shellcheck/spellcheck/... require autotools currently
// or need to be redefined with respective BUILD_TYPE
//dynacfgPipeline.buildSystem = 'ci_build.sh'
//dynacfgPipeline.slowBuildDefaultBody = { echo "Running default custom build" }
dynacfgPipeline.slowBuildDefaultBody_autotools = { def delegate -> setDelegate(delegate)
// Be sure to have a fixed resolved String here ASAP:
String stageNameClone = "${stageName}"
def dsbcClone = dsbc.clone()
stage('Investigate envvars (Autotools DEBUG)') {
echo "Running default custom build for '${stageNameClone}' ==> ${dsbcClone.toString()}" +
(dynacfgPipeline?.configureEnvvars ? "" : " (note: has no dynacfgPipeline.configureEnvvars)")
// Trick about endianness via ELF binary header picked up from https://serverfault.com/a/749469/490516
sh label: 'Inspect initial envvars', script: """ hostname; date -u; uname -a
echo "LONG_BIT:`getconf LONG_BIT` WORD_BIT:`getconf WORD_BIT`" || true
if command -v xxd >/dev/null ; then xxd -c 1 -l 6 | tail -1; else if command -v od >/dev/null; then od -N 1 -j 5 -b | head -1 ; else hexdump -s 5 -n 1 -C | head -1; fi; fi < /bin/ls 2>/dev/null | awk '(\$2 == 1){print "Endianness: LE"}; (\$2 == 2){print "Endianness: BE"}' || true
echo "\${MATRIX_TAG}"
set | sort -n """
if (dynacfgPipeline?.configureEnvvars) {
sh label: 'Apply CONFIG_ENVVARS', script: """ set +x
echo "Applying CONFIG_ENVVARS:"
#set -xv
${dynacfgPipeline.configureEnvvars}
set | sort -n """
}
}
withEnvOptional(dynacfgPipeline.defaultTools) {
stage('Unstash sources') {
unstashCleanSrc(dynacfgPipeline.stashnameSrc)
}
buildMatrixCellCI(dynacfgPipeline, dsbcClone, stageNameClone)
//buildMatrixCellCI(dynacfgPipeline, dsbc, stageName)
}
}
dynacfgPipeline.slowBuildDefaultBody_ci_build = { def delegate -> setDelegate(delegate)
// Be sure to have a fixed resolved String here ASAP:
String stageNameClone = "${stageName}"
def dsbcClone = dsbc.clone()
stage('Investigate envvars (CI_Build DEBUG)') {
echo "Running default custom build for '${stageNameClone}' ==> ${dsbcClone.toString()}" +
(dynacfgPipeline?.configureEnvvars ? "" : " (note: has no dynacfgPipeline.configureEnvvars)")
// Trick about endianness via ELF binary header picked up from https://serverfault.com/a/749469/490516
sh label: 'Inspect initial envvars', script: """ hostname; date -u; uname -a
echo "LONG_BIT:`getconf LONG_BIT` WORD_BIT:`getconf WORD_BIT`" || true
if command -v xxd >/dev/null ; then xxd -c 1 -l 6 | tail -1; else if command -v od >/dev/null; then od -N 1 -j 5 -b | head -1 ; else hexdump -s 5 -n 1 -C | head -1; fi; fi < /bin/ls 2>/dev/null | awk '(\$2 == 1){print "Endianness: LE"}; (\$2 == 2){print "Endianness: BE"}' || true
echo "\${MATRIX_TAG}"
set | sort -n """
if (dynacfgPipeline?.configureEnvvars) {
sh label: 'Apply CONFIG_ENVVARS', script: """ set +x
echo "Applying CONFIG_ENVVARS:"
#set -xv
${dynacfgPipeline.configureEnvvars}
set | sort -n """
}
}
withEnvOptional(dynacfgPipeline.defaultTools) {
stage('Unstash sources') {
unstashCleanSrc(dynacfgPipeline.stashnameSrc)
}
def dynacfgPipeline_ciBuild = dynacfgPipeline.clone()
dynacfgPipeline_ciBuild.buildSystem = 'ci_build.sh'
dynacfgPipeline_ciBuild.buildPhases = [:]
dynacfgPipeline_ciBuild = ci_build.sanityCheckDynacfgPipeline(dynacfgPipeline_ciBuild)
buildMatrixCellCI(dynacfgPipeline_ciBuild, dsbcClone, stageNameClone)
//buildMatrixCellCI(dynacfgPipeline_ciBuild, dsbc, stageName)
}
}
dynacfgPipeline.slowBuildDefaultBody = dynacfgPipeline.slowBuildDefaultBody_autotools
/* By default, the master/main/stable branch and PRs against it
* is built with as few scenarios as possible, allowing for fast
* turnaround and avoiding redundant work (e.g. documentation
* rendering, distchecks that are more about recipes than code),
* and stricter warnings that current codebase would fail so far.
* In particular, this saves CI farm resources - allowing more
* PRs per day to be checked in practice.
* Conversely, a branch with "fightwarn" in the name (or PR to it)
* would enjoy many more build scenarios, covering both autotools
* directly and ci_build.sh with stricter warnings, in particular.
*/
dynacfgPipeline.slowBuild = [
[name: 'Default autotools driven build with default warning levels (gnu99/gnu++11)',
disabled: dynacfgPipeline.disableSlowBuildAutotools,
branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
branchRegexTarget: ~/fightwarn/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: dynacfgBase.commonLabelExpr,
//defaultDynamatrixConfig: dynacfgBase.defaultDynamatrixConfig,
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
// 'CSTDVERSION': ['03', '2a'],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'], 'ansi' ],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'] ],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '11'] ],
'CSTDVARIANT': ['gnu']
],
mergeMode: [ 'dynamatrixAxesVirtualLabelsMap': 'replace', 'excludeCombos': 'merge' ],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
dynacfgPipeline.axisCombos_STRICT_C
],
runAllowedFailure: true,
//dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
//dynamatrixAxesLabels: [~/^OS/, '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
//'bodyParStages': {}
] // one slowBuild filter configuration, autotools-minimal
,[name: 'Default autotools driven build with max warnings and varied C/C++ revisions (allowed to fail)',
disabled: dynacfgPipeline.disableSlowBuildAutotools,
branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
branchRegexTarget: ~/fightwarn/,
// NOTE: For fightwarn, we want some schenarios that would always build to test
//appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: dynacfgBase.commonLabelExpr,
//defaultDynamatrixConfig: dynacfgBase.defaultDynamatrixConfig,
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
// 'CSTDVERSION': ['03', '2a'],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'], 'ansi' ],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'] ],
//'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '11'] ],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'], ['c': '99', 'cxx': '11'], ['c': '11', 'cxx': '11'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu']
],
mergeMode: [ 'dynamatrixAxesVirtualLabelsMap': 'replace', 'dynamatrixAxesCommonEnv': 'replace', 'excludeCombos': 'merge' ],
dynamatrixAxesCommonEnv: [
//['LANG=C','LC_ALL=C','TZ=UTC', 'CFLAGS=-Wall\\ -Wextra\\ -Werror', 'CXXFLAGS=-Wall\\ -Wextra\\ -Werror']
['LANG=C','LC_ALL=C','TZ=UTC', 'CFLAGS=-Wall', 'CXXFLAGS=-Wall']
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
dynacfgPipeline.axisCombos_STRICT_C,
[~/C.*FLAGS=.+Werror/]
],
runAllowedFailure: true,
//dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
//dynamatrixAxesLabels: [~/^OS/, '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
//'bodyParStages': {}
] // one slowBuild filter configuration, autotools-Wall
,[name: 'Default autotools driven build with default configuration, bitness and warning levels on each NUT CI farm platform (but with fatal warnings as of gnu99/gnu++11, must pass where enabled)',
disabled: dynacfgPipeline.disableSlowBuildAutotools,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
//branchRegexTarget: ~/fightwarn/,
//appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: dynacfgBase.commonLabelExpr,
//defaultDynamatrixConfig: dynacfgBase.defaultDynamatrixConfig,
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
//'BITS': [32, 64],
// 'CSTDVERSION': ['03', '2a'],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'], 'ansi' ],
//'CSTDVERSION_${KEY}': [ ['c': '03', 'cxx': '03'], ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '2a'] ],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '11'] ],
'CSTDVARIANT': ['gnu']
],
dynamatrixAxesCommonEnv: [
// One set of several simultaneously exported envvars!
// CONFIG_OPTS are picked up by our dynamatrix configuration
// and substituted into shell "as is" for normal builds
// (so splitting into many tokens), or quoted as a single
// token DISTCHECK_FLAGS in its stage (split by make later).
['LANG=C','LC_ALL=C','TZ=UTC',
'CONFIG_OPTS=--with-all=auto --with-docs=auto --with-ssl=auto --enable-Werror --enable-warnings --disable-Wcolor --enable-silent-rules'
]
],
mergeMode: [ 'dynamatrixAxesVirtualLabelsMap': 'replace', 'excludeCombos': 'merge' ],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
dynacfgPipeline.axisCombos_STRICT_C
],
runAllowedFailure: true,
//dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
//dynamatrixAxesLabels: [~/^OS/, '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
dynamatrixAxesLabels: [~/^OS_DISTRO/, 'COMPILER'],
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
+ [[~/OS_DISTRO=openbsd-6\./, ~/COMPILER=GCC/]]
// Here we picked just OSes and compilers (gcc or clang),
// so exclude systems which have e.g. gcc-4.2.1 which claims
// type range comparison warnings despite pragma fencing.
// gcc-4.8.x on CentOS 7 and Ubuntu 14.04 looks already okay.
+ [[~/OS_DISTRO=macos/]]
// MacOS (at least agents prepared with HomeBrew packages)
// requires a few pkg-config and CFLAGS pre-sets which are
// done in ci_build.sh and defeat the purpose of this stage.
// So it is easier and more honest to just skip it.
], body)
}, // getParStages
//'bodyParStages': {}
] // one slowBuild filter configuration, autotools-everywhere
,[name: 'Various non-docs distchecked target builds with main and ~newest supported C/C++ revisions (must pass on all platforms)',
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-nodoc']
// BUILD_TYPE=default-withdoc:man
// BUILD_TYPE=default-tgt:distcheck-light == --with-all=auto --with-ssl=auto --with-doc=auto
// BUILD_TYPE=default-tgt:distcheck-light + NO_PKG_CONFIG=true ?
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC','BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=hard'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'Valgrind+distchecked target builds with main and ~newest supported C/C++ revisions (must pass on all platforms)',
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
requiredNodelabels: ["(NUT_BUILD_CAPS=valgrind=yes||NUT_BUILD_CAPS=valgrind)"],
excludedNodelabels: ["NUT_BUILD_CAPS=valgrind=no"],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-tgt:distcheck-valgrind']
// BUILD_TYPE=default-withdoc:man
// BUILD_TYPE=default-tgt:distcheck-light == --with-all=auto --with-ssl=auto --with-doc=auto
// BUILD_TYPE=default-tgt:distcheck-light + NO_PKG_CONFIG=true ?
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC','BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=hard'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'A cppcheck analysis build',
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
// NOTE: At the time of this posting, there are a handful of "high"
// priority issues, and hundreds of lesser problems which may overlap
// or not with those reported by other analysers. Having issues to
// report does not mark the builds FAILED nor UNSTABLE however, so
// this should be safe to enable for all branches now. But it makes
// a lot of noise and (bug?) falls into common warnings category,
// not a separate analysis group as was intended by dynamatrix.
// So for now this applies only to fightwarn-related branches.
branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
branchRegexTarget: ~/fightwarn/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
dynamatrixAxesLabels: ['OS_FAMILY'], // + [ 'OS_DISTRO', 'MAKE'],
requiredNodelabels: ["(NUT_BUILD_CAPS=cppcheck||NUT_BUILD_CAPS=cppcheck=yes)"],
excludedNodelabels: ["NUT_BUILD_CAPS=cppcheck=no"],
dynamatrixAxesVirtualLabelsMap: [
// For cppcheck we do not iterate BITS,
// doing one (default) hit per system:
//'BITS': [32, 64],
// Take systems that CAN build C; do not really
// care about revision here since it is hardcoded
// in the Makefile to create two analysis XMLs now:
'CSTDVERSION_${KEY}': [ ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-tgt:cppcheck']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC', 'DO_CLEAN_CHECK=no', 'BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=hard'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'A build with all driver types on capable systems with distcheck for main supported C/C++ revision (must pass)',
// NOTE: Here we constrain distcheck builds (more CI stress load)
// to run as few combos as possible; arguably this filter config
// is more about recipes distributing those drivers than about
// directly codebase quality.
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: "nut-builder:alldrv",
requiredNodelabels: ["(NUT_BUILD_CAPS=drivers:all||nut-builder:alldrv)"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
// TODO: Find a way to constrain these builds to one
// per OS type, whatever bitness(es) supported there,
// so we really primarily only test the dist-ability.
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-alldrv']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC','BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=hard'
]
],
// On some systems, pkg-config for net-snmp includes CFLAGS values not supported by gcc-4.9 and older
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
[~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldrv/]
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'A build with all driver types on capable systems without distcheck for other C/C++ revisions (must pass)',
// NOTE: We reduce the build load here since the Makefile recipes
// (for distcheck part) are deemed tested above with the supported
// C/C++ standard revision
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: "nut-builder:alldrv",
requiredNodelabels: ["(NUT_BUILD_CAPS=drivers:all||nut-builder:alldrv)"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-alldrv:no-distcheck']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC','BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=hard'
]
],
// On some systems, pkg-config for net-snmp includes CFLAGS values not supported by gcc-4.9 and older
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
[~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldr(v|v:no-distcheck)/]
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'A build with all driver types on capable systems with distcheck and fatal warnings (allowed to fail)',
disabled: dynacfgPipeline.disableSlowBuildCIBuildExperimental,
branchRegexSource: ~/^(PR-.+|.*fightwarn.*)$/,
branchRegexTarget: ~/fightwarn/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: "nut-builder:alldrv",
requiredNodelabels: ["(NUT_BUILD_CAPS=drivers:all||nut-builder:alldrv)"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'], ['c': '99', 'cxx': '11'], ['c': '11', 'cxx': '11'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-alldrv']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_WARNFATAL=yes','BUILD_WARNOPT=hard'
]
],
// On some systems, pkg-config for net-snmp includes CFLAGS values not supported by gcc-4.9 and older
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
[~/BUILD_WARNOPT=hard/],
[~/GCCVER=[01234].+/, ~/BUILD_TYPE=default-alldrv/]
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'Various build combos with Python versions for helper scripts',
// This is a recipe (and target OS) test for ability to use helper
// scripts with various Python interpreter versions.
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_PY,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: "nut-builder:alldrv",
// TOTHINK: Should we also vary compilers here?
dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', 'MAKE', 'PYTHON'],
requiredNodelabels: ["(NUT_BUILD_CAPS=drivers:all||nut-builder:alldrv)"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
//'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-alldrv']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=medium'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'An out-of-tree build with all docs types on capable systems, and a distcheck (must pass)',
// TODO: This is a recipe (and target OS) test for ability to build
// the docs without error; it should not iterate compilers (maybe
// iterate docs tools though, if we were to support many backends?)
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_DOC,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: dynacfgBase.commonLabelExpr + " && doc-builder",
//commonLabelExpr: infra.labelDocumentationWorker(),
dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', 'MAKE'],
requiredNodelabels: ["NUT_BUILD_CAPS=docs:all"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
//'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-withdoc']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
// Build in a subdirectory to check that out-of-dir
// builds are healthy too.
// NOTE: It would be useful to also have a recipe to build
// "completely out-of-tree", in a different filesystem (to
// make sure we do not rely on hard-links, relative paths,
// etc.)
'CI_BUILDDIR=obj',
'BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=minimal'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'A build with manpage docs on all systems that did not build "all docs", and a distcheck (allowed to fail - e.g. no tools even for that)',
// TODO: This is a recipe (and target OS) test for ability to build
// the docs without error; it should not iterate compilers; see above
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_TXT,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: dynacfgBase.commonLabelExpr + " && doc-builder",
//commonLabelExpr: infra.labelDocumentationWorker(),
dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', 'MAKE'],
requiredNodelabels: ["NUT_BUILD_CAPS=docs:man"],
excludedNodelabels: ["NUT_BUILD_CAPS=docs:all"],
dynamatrixAxesVirtualLabelsMap: [
//'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
'BUILD_TYPE': ['default-withdoc:man']
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_WARNFATAL=yes'
//,'BUILD_WARNOPT=minimal'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS,
[~/BUILD_TYPE=default-withdoc:man/]
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC_TOO_OLD]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'GNU C standard builds with non-fatal warnings, without distcheck and docs (must pass)',
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//branchRegexSource: ~/^(PR-.+|fightwarn.*)$/,
//branchRegexTarget: dynacfgPipeline.branchStableRegex,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
requiredNodelabels: [],
excludedNodelabels: [],
// NOTE: C89 not included here as its warnings are quite
// noisy as in "not relevant for more modern revisions".
// It has a separate slowBuild filter configuration below.
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '11'], ['c': '11', 'cxx': '11'], ['c': '17', 'cxx': '17'] ],
'CSTDVARIANT': ['gnu'],
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_TYPE=default-all-errors',
'BUILD_WARNFATAL=no','BUILD_WARNOPT=auto'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'GNU C89 standard builds with non-fatal warnings and GCC toolkits, without distcheck and docs (must pass)',
disabled: dynacfgPipeline.disableSlowBuildCIBuild,
//disabled: dynacfgPipeline.disableSlowBuildCIBuildExperimentalANSI,
//branchRegexSource: ~/^(PR-.+|.*fightwarn.*89.*)$/,
//branchRegexTarget: ~/fightwarn.*89.*/,
//disabled: dynacfgPipeline.disableSlowBuildCIBuildExperimental,
//branchRegexSource: ~/^(PR-.+|.*fightwarn.*)$/,
//branchRegexTarget: ~/fightwarn.*/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '89', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_TYPE=default-all-errors',
'BUILD_WARNFATAL=no','BUILD_WARNOPT=auto'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_NOT_GCC]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'GNU C89 standard builds with non-fatal warnings and non-GCC toolkits, without distcheck and docs (must pass)',
disabled: dynacfgPipeline.disableSlowBuildCIBuildExperimentalANSI,
branchRegexSource: ~/^(PR-.+|.*fightwarn.*89.*)$/,
branchRegexTarget: ~/fightwarn.*89.*/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
requiredNodelabels: [],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '89', 'cxx': '98'] ],
'CSTDVARIANT': ['gnu'],
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_TYPE=default-all-errors',
'BUILD_WARNFATAL=no','BUILD_WARNOPT=auto'
]
],
allowedFailure: [
dynacfgPipeline.axisCombos_WINDOWS
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_CPPUNIT_STRICT_C +
[dynacfgPipeline.axisCombos_COMPILER_GCC]
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
'bodyParStages': dynacfgPipeline.slowBuildDefaultBody_ci_build
] // one slowBuild filter configuration
,[name: 'GNU C standard builds with non-fatal warnings, without distcheck and docs, one compiler with main supported C/C++ revision on slower QEMU builders (may fail due to those workers)',
disabled: dynacfgPipeline.disableSlowBuildCIBuild_QEMU,
//branchRegexSource: ~/^(PR-.+|fightwarn.*|.*qemu.*)$/,
//branchRegexTarget: ~/^(master|main|stable|.*qemu.*)$/,
appliesToChangedFilesRegex: dynacfgPipeline.appliesToChangedFilesRegex_C,
'getParStages': { def dynamatrix, Closure body ->
return dynamatrix.generateBuild([
//commonLabelExpr: "qemu-" + dynacfgBase.commonLabelExpr,
commonLabelExpr: "qemu-nut-builder || ssh-qemu-nut-builder",
dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', 'ARCH${ARCH_BITS}', 'COMPILER'],
requiredNodelabels: ["(NUT_BUILD_CAPS=drivers:all||qemu-nut-builder:alldrv)"],
excludedNodelabels: [],
dynamatrixAxesVirtualLabelsMap: [
'BITS': [32, 64],
'CSTDVERSION_${KEY}': [ ['c': '99', 'cxx': '11'] ],
'CSTDVARIANT': ['gnu'],
],
dynamatrixAxesCommonEnv: [
['LANG=C','LC_ALL=C','TZ=UTC',
'BUILD_TYPE=default-all-errors',
'BUILD_WARNFATAL=no','BUILD_WARNOPT=auto'
]
],
allowedFailure: [
//[~/ARCH(32|64)=(?!i386|amd64))/],
//[~/OS_FAMILY=windows/]
[~/OS_FAMILY=.+/]
],
runAllowedFailure: true,
mergeMode: [ 'excludeCombos': 'merge', 'dynamatrixAxesCommonEnv': 'replace', 'dynamatrixAxesLabels': 'replace', 'commonLabelExpr': 'replace' ], // NOTE: We might want to replace other fields, but excludeCombos must be merged to filter compiler versions vs language standards as centrally defined!
excludeCombos: [
[~/BITS=32/, ~/ARCH_BITS=64/], [~/BITS=64/, ~/ARCH_BITS=32/],
[~/CSTDVARIANT=c/],