forked from networkupstools/nut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
1364 lines (1251 loc) · 48.4 KB
/
.travis.yml
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
# Travis CI script
################################################################################
# This file is based on a template used by zproject, but isn't auto-generated. #
################################################################################
language:
- c
cache:
- ccache
os:
- linux
sudo: false
# Tests for cppunit require C++11 which requires gcc-4.8 or newer.
# This is available in either "trusty" or newer distros (e.g. "xenial"
# which we also reference explicitly for additional repositories below),
# or in "docker" envs.
dist: xenial
services:
- docker
# Common required packages for all common scenarios
# Note that YAML lists may be named with & and referenced with * characters;
# but without such links, every list is complete and unique (meaning that
# matrix special cases define their own settings, not append to common ones).
# See https://github.com/travis-ci/travis-ci/issues/3505
addons:
apt:
packages: &deps_driverlibs
- git
- ccache
- libcppunit-dev
- libcppunit-subunit-dev
- libneon27
- libneon27-dev
- libltdl7
- libltdl-dev
- libi2c-dev
- lua5.1
- liblua5.1-0-dev
- libsnmp-dev
- libfreeipmi-dev
- libipmimonitoring-dev
- libusb-dev
- linux-libc-dev
- libpowerman0-dev
- libavahi-common-dev
- libavahi-core-dev
- libavahi-client-dev
- libgd2-xpm-dev
- libpng-dev
- libjpeg-dev
- libfreetype6-dev
- libxpm-dev
- libxml2-utils
- libmodbus-dev
- libnss3-dev
- libssl-dev
# NOTE: Keep the list above in sync with replicas like deps_driverlibs_cross_i386 below
# Common settings for jobs in the matrix built below
env:
global:
- CI_TIME=true
- CI_TRACE=false
- CI_DEFAULT_HOMEBREW_NO_AUTO_UPDATE=1
# By default, avoid updating (including cleaning) osx worker beside what
# we require to install, compared to what Travis provides. Technically
# we can call master branch builds sometimes to update the workers cache
# of packages by manual or timer-driven runs with explicit setting like
# HOMEBREW_NO_AUTO_UPDATE=0
# Builds with customized setups
# Note that doc-related builds take the longest, and Travis CI cloud
# runs only a few sub-jobs in parallel, so we want the withdoc and
# perhaps spellcheck jobs to start first, and while they are still in
# progress, others are spawned and finished - reducing overall job TTL.
# Note that the nut-driver-enumerator tests should be tried in at least
# the shell interpreters reasonable for default setups of Solaris/illumos
# (ksh) and Linux (bash, dash, etc.) common distros.
# First pass is a few default compilations that normally happen
# early in Travis CI build chain
_matrix_required_linux_pass1_quick:
include: &_matrix_required_linux_pass1_quick
- env: BUILD_TYPE=default-nodoc
os: linux
addons:
apt:
packages:
- *deps_driverlibs
- env: BUILD_TYPE=default-spellcheck
os: linux
addons:
apt:
packages: &deps_aspell
- aspell
- aspell-en
- env: BUILD_TYPE=default
os: linux
addons:
apt:
packages:
- *deps_driverlibs
- env: BUILD_TYPE=default-tgt:distcheck-light
os: linux
addons:
apt:
packages:
- *deps_driverlibs
# Second pass is a number of shell script syntax checks in standard env:
_matrix_required_linux_pass2_shell:
include: &_matrix_required_linux_pass2_shell
- env: BUILD_TYPE=default-shellcheck
os: linux
addons:
apt:
packages:
- coreutils
- file
#TBD# - shellcheck
- env: BUILD_TYPE=nut-driver-enumerator-test SHELL_PROGS=bash
os: linux
services:
- docker
addons:
apt:
packages:
- bash
- env: BUILD_TYPE=nut-driver-enumerator-test SHELL_PROGS=ksh
os: linux
services:
- docker
addons:
apt:
packages:
- ksh
- env: BUILD_TYPE=nut-driver-enumerator-test SHELL_PROGS=dash
os: linux
services:
- docker
addons:
apt:
packages:
- dash
- env: BUILD_TYPE=nut-driver-enumerator-test SHELL_PROGS=ash
os: linux
services:
- docker
addons:
apt:
packages:
- ash
# Third pass is a number of larger builds that confirm non-core code is clean:
_matrix_required_linux_pass3_large:
include: &_matrix_required_linux_pass3_large
- env: BUILD_TYPE=default-tgt:distcheck-valgrind
os: linux
sudo: false
services:
- docker
addons:
apt:
packages:
- *deps_driverlibs
- valgrind
- env: BUILD_TYPE=default-withdoc
os: linux
addons:
apt:
packages: &deps_gendocs
- asciidoc
- xsltproc
- dblatex
- docbook-xsl
- docbook-xsl-ns
- source-highlight
- libxml2-utils
- env: BUILD_TYPE=default-alldrv
os: linux
sudo: false
services:
- docker
addons:
apt:
packages:
- *deps_driverlibs
- env:
- BUILD_TYPE=default-tgt:distcheck-light
- NO_PKG_CONFIG=true
os: linux
sudo: true
addons:
apt:
packages:
- *deps_driverlibs
# Re-run the build of all binaries we can make, with
# varied compiler and C/C++ standard implementations
# and different lenience against warnings. Many of
# these blocks look similar and all should have unique
# "env" field to use some with allowed_failure below.
# For a list of standards supported, see:
# https://gcc.gnu.org/onlinedocs/gcc/Standards.html
# https://gcc.gnu.org/projects/cxx-status.html
# https://clang.llvm.org/cxx_status.html
# Note that while there is C++14 there is no C14:
# https://en.wikipedia.org/wiki/C_(programming_language)#History
#
# The leading NUT_MATRIX_TAG allows humans to understand
# what a test case is about in Travis CI dashboard table
# of jobs, but otherwise it is not used by script code.
#
# Note that passing multi-token C*FLAGS may be problematic
# for sub-makes like distcheck; verify thoroughly before
# trying to enable those if that would make sense anytime.
#
# Ordered by variants expected to succeed to run first,
# although with current Travis CI implementation, the env
# blocks listed in allowed_failures only run after all
# those not listed. Jobs which currently fail until code
# gets fixed are conditional with "if: branch =~ fightwarn"
# so users (and NUT upstream) can define a branch with a
# name containing this keyword to work on bug fixes, but by
# default the main development would not bother Travis CI
# to waste resources in vain.
#
_matrix_linux_gnustd_nowarn:
include: &_matrix_linux_gnustd_nowarn
- env: NUT_MATRIX_TAG="gnu99-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98"
os: linux
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu99-gcc-7-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98" CC=gcc-7 CXX=g++-7
os: linux
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- gcc-7
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu11-gcc-7-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu11" CXXFLAGS="-std=gnu++11" CC=gcc-7 CXX=g++-7
os: linux
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- gcc-7
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9
os: linux
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- gcc-9
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang-5.0 CXX=clang++-5.0
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
# Note: some of the warnings that are hidden in this case seem to be serious
# issues that may impact viability of binaries built by C89 mode compilers!
- env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89"
os: linux
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
packages:
- *deps_driverlibs
# Make sure we don't assume "long int" is a "int64_t" and so on
# Seems we'd have to use tricks like 32-bit docker in 64-bit VM per
# https://stackoverflow.com/questions/29361465/request-for-32bit-travis-build-machine
# https://github.com/travis-ci/travis-ci/issues/5770#issuecomment-197771661
# services: docker
# script: "docker run -i -v \"${PWD}:/MyProgram\" toopher/centos-i386:centos6 /bin/bash -c \"linux32 --32bit i386 /MyProgram/build.sh\""
_matrix_linux_gnustd_nowarn_x86_32bit:
include: &_matrix_linux_gnustd_nowarn_x86_32bit
- env: NUT_MATRIX_TAG="gnu99-gcc-default-nowarn-x86-32bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99 -m32" CXXFLAGS="-std=gnu++99 -m32" CPPFLAGS="-m32" LDFLAGS="-m32"
os: linux
arch: i386
sudo: true
# Perl is packaged poorly for multiarch, across several distro releases:
# https://bugs.launchpad.net/ubuntu/+source/pkgbinarymangler/+bug/1574351
# NOTE: According to https://docs.travis-ci.com/user/job-lifecycle/ the
# before_install phase happens AFTER addons/apt processing! So we install
# that big list first (except pkg's that pull perl) and add them later.
# before_install:
# - sudo dpkg --add-architecture i386 && sudo apt-get update ; yes | sudo apt-get install -y --force-yes libperl5.22:i386 || true ; sudo rm -f /usr/share/doc/libperl5.22/changelog.Debian.gz ; yes | sudo apt-get install -y --force-yes libperl5.22
services:
- docker
compiler: gcc
addons:
apt:
packages: &deps_driverlibs_cross_i386
- git
- ccache
- gcc-multilib
- g++-multilib
- libcppunit-dev:i386
- libcppunit-subunit-dev:i386
- libneon27:i386
- libneon27-dev:i386
- libltdl7:i386
- libltdl-dev:i386
#MISSING:i386? hdr only?# - libi2c-dev:i386
- libi2c-dev
- lua5.1:i386
- liblua5.1-0-dev:i386
#PULLSPERL# - libsnmp-dev:i386
- libfreeipmi-dev:i386
- libipmimonitoring-dev:i386
- libusb-dev:i386
- linux-libc-dev:i386
- libpowerman0-dev:i386
- libavahi-common-dev:i386
- libavahi-core-dev:i386
- libavahi-client-dev:i386
- libgd2-xpm-dev:i386
- libpng-dev:i386
- libjpeg-dev:i386
- libfreetype6-dev:i386
- libxpm-dev:i386
- libxml2-utils:i386
- libmodbus-dev:i386
- libnss3-dev:i386
- libssl-dev:i386
# See comments above about perl
before_install: &before_install_x86_32bit
- sudo dpkg --add-architecture i386 && sudo apt-get update
- yes | sudo apt-get install -y --force-yes libperl5.22 || true
- sudo rm -f /usr/share/doc/libperl5.22/changelog.Debian.gz
- yes | sudo apt-get install -f
- yes | sudo apt-get install -y --force-yes libperl5.22:i386
- yes | sudo apt-get install -y --force-yes libsnmp-dev:i386
- yes | sudo apt-get remove -y --force-yes libfreetype6:amd64 || true
- yes | sudo apt-get remove -y --force-yes libltdl7:amd64 || true
- env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn-x86-32bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17 -m32" CXXFLAGS="-std=gnu++17 -m32" CPPFLAGS="-m32" LDFLAGS="-m32" CC=clang-8 CXX=clang++-8
os: linux
arch: x86
dist: xenial
sudo: true
before_install:
- *before_install_x86_32bit
# - sudo dpkg --add-architecture i386 && sudo apt-get update
# - yes | sudo apt-get install -y --force-yes libperl5.22 || true
# - sudo rm -f /usr/share/doc/libperl5.22/changelog.Debian.gz
# - sudo apt-get install -f
# - yes | apt-get install -y --force-yes libperl5.22:i386
services:
- docker
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs_cross_i386
# Try s390x builds to check for issues with endianness
# (it is one current Travis offer with BigEndian CPUs)
_matrix_linux_gnustd_nowarn_s390x_64bit_viable:
include: &_matrix_linux_gnustd_nowarn_s390x_64bit_viable
- env: NUT_MATRIX_TAG="gnu99-gcc-default-nowarn-s390x-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98"
os: linux
arch: s390x
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
packages:
- *deps_driverlibs
- time
- env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn-s390x-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9
os: linux
arch: s390x
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- gcc-9
- *deps_driverlibs
- time
- env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn-s390x-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8
os: linux
arch: s390x
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
- time
_matrix_linux_gnustd_nowarn_s390x_64bit_fatal:
include: &_matrix_linux_gnustd_nowarn_s390x_64bit_fatal
- env: NUT_MATRIX_TAG="gnu17-clang-8-warn-s390x-64bit" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8
os: linux
arch: s390x
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
- time
# Try ARM builds to check for issues with non-x86 CPUs
_matrix_linux_gnustd_nowarn_arm_64bit_viable:
include: &_matrix_linux_gnustd_nowarn_arm_64bit_viable
- env: NUT_MATRIX_TAG="gnu99-gcc-default-nowarn-ARM-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98"
os: linux
arch: arm64
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn-ARM-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9
os: linux
arch: arm64
sudo: false
services:
- docker
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- gcc-9
- *deps_driverlibs
_matrix_linux_gnustd_nowarn_arm_64bit_fatal:
include: &_matrix_linux_gnustd_nowarn_arm_64bit_fatal
- env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn-ARM-64bit" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8
os: linux
arch: arm64
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
# At this time, anything with strict C standard fails on Linux, even "nowarn" cases:
_matrix_linux_cstd_nowarn:
include: &_matrix_linux_cstd_nowarn
- env: NUT_MATRIX_TAG="c99-clang-3.5-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-3.5 CXX=clang++-3.5
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-3.5
packages:
- clang-3.5
- clang-format-3.5
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-5.0 CXX=clang++-5.0
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang-5.0 CXX=clang++-5.0
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
# Stuff with warnings made fatal... and codebase got good enough to survive!
_matrix_linux_gnustd_warn_viable:
include: &_matrix_linux_gnustd_warn_viable
- env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu11" CXXFLAGS="-std=gnu++11"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98" CC=gcc-7 CXX=g++-7
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- gcc-7
- *deps_driverlibs
- env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- gcc-9
- *deps_driverlibs
# Stuff with warnings made fatal... well, is usually fatal so far:
_matrix_linux_gnustd_warn_fatal:
include: &_matrix_linux_gnustd_warn_fatal
# Note: Fixing these would make NUT viable again on platforms with only ANSI C!
- env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
# The hardest of two worlds: both strict C standards on Linux and fatal warnings:
_matrix_linux_cstd_warn:
include: &_matrix_linux_cstd_warn
- env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c99" CXXFLAGS="-std=c++98"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-5.0 CXX=clang++-5.0
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang-5.0 CXX=clang++-5.0
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8
os: linux
dist: xenial
sudo: false
services:
- docker
compiler: clang
if: branch =~ fightwarn
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-format-8
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c11" CXXFLAGS="-std=c++11"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
- env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c89" CXXFLAGS="-std=c++89"
os: linux
sudo: false
services:
- docker
compiler: gcc
if: branch =~ fightwarn
addons:
apt:
packages:
- *deps_driverlibs
_matrix_freebsd_gnustd_nowarn:
include: &_matrix_freebsd_gnustd_nowarn
- env: NUT_MATRIX_TAG="gnu99-gcc-freebsd-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98" CC=gcc CXX=g++
os: freebsd
sudo: true
compiler: gcc
cache:
directories:
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu99-clang-freebsd-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++
os: freebsd
sudo: true
compiler: clang
cache:
directories:
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-gcc-freebsd-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc CXX=g++
os: freebsd
sudo: true
compiler: gcc
cache:
directories:
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-clang-freebsd-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++
os: freebsd
sudo: true
compiler: clang
cache:
directories:
- $HOME/.ccache
_matrix_freebsd_gnustd_warn_viable:
include: &_matrix_freebsd_gnustd_warn_viable
- env: NUT_MATRIX_TAG="gnu99-gcc-default-freebsd-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++98" CC=gcc CXX=g++
os: freebsd
sudo: true
compiler: gcc
if: branch =~ fightwarn
cache:
directories:
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-gcc-default-freebsd-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc CXX=g++
os: freebsd
sudo: true
compiler: gcc
if: branch =~ fightwarn
cache:
directories:
- $HOME/.ccache
_matrix_freebsd_gnustd_warn_fatal:
include: &_matrix_freebsd_gnustd_warn_fatal
- env: NUT_MATRIX_TAG="gnu99-clang-freebsd-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++
os: freebsd
sudo: true
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-clang-freebsd-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++
os: freebsd
sudo: true
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/.ccache
# Try also a range of platforms for MacOS X builds
# Inspired by https://github.com/taocpp/operators/blob/master/.travis.yml
_matrix_osx_gnustd_nowarn:
include: &_matrix_osx_gnustd_nowarn
- env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu99-clang-xcode7.3-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++
os: osx
osx_image: xcode7.3
compiler: clang
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
_matrix_osx_gnustd_warn:
include: &_matrix_osx_gnustd_warn
- env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
_matrix_osx_cstd_nowarn:
include: &_matrix_osx_cstd_nowarn
- env: NUT_MATRIX_TAG="c99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="c17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
_matrix_osx_cstd_warn:
include: &_matrix_osx_cstd_warn
- env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++
os: osx
osx_image: xcode10.2
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
- env: NUT_MATRIX_TAG="c11-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors BUILD_WARNFATAL=yes BUILD_WARNOPT=hard CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++
os: osx
osx_image: xcode7.3
compiler: clang
if: branch =~ fightwarn
cache:
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.ccache
# Try also a build on Windows to see our horizons
# https://docs.travis-ci.com/user/reference/windows/
# says we have clang-9 there by default (and there is
# a complex routine to add gcc if we'd need that)
# and a Git Bash as default shell, but no ccache.
# TODO: Eventually try native visualstudio compilers?
_matrix_windows_gnustd_nowarn:
include: &_matrix_windows_gnustd_nowarn
- env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++