/
.travis.yml
130 lines (130 loc) · 3.69 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
# test Jove build on a variety of Travis-CI platforms
# Mark Moraes, 20210706
language: c
addons:
apt_packages:
- &common [make, ctags, zip ]
- &apts [ ncurses-dev, groff ]
homebrew:
packages: &brews [ ncurses, *common ]
os: [ linux, osx ]
compiler: [gcc, clang ]
arch: &archs [amd64, arm64, ppc64le]
jobs:
# now modify the build matrix constructed above
exclude:
# REMOVE gcc on osx (it is just clang)
- os: osx
compiler: gcc
include:
# ADD an explicit osx homebrew gcc-7 (i.e. not clang)
- os: osx
env: CC=gcc-7
addons:
homebrew:
packages: [gcc@7, *brews]
update: true
# ADD latest gcc (-9) on default linux amd64 (xenial),
- os: linux
env: CC=gcc-9
addons:
apt:
sources: [ ubuntu-toolchain-r-test ]
packages: [gcc-9, *apts, *common]
# ADD oldest and newest versions of xcode and linux
- os: osx
osx_image: xcode6.4
- os: osx
osx_image: xcode11.3
- os: linux
dist: precise
arch: amd64
addons:
apt_packages: [ncurses-dev, groff-base, *common]
- os: linux
dist: trusty
arch: amd64
addons:
apt_packages: [*apts, *common]
- os: linux
dist: focal
arch: amd64
addons:
apt_packages: [*apts, *common]
- os: linux
dist: bionic
arch: amd64
addons:
apt_packages: [*apts, *common]
- os: linux
dist: bionic
arch: arm64
addons:
apt_packages: [*apts, *common]
script:
- |
set -eux
# note: older *BSD, OSX, Solaris require a template
td=$(mktemp -d "${TMPDIR:-/tmp}/jvt.XXXXXXXX")
dd="DESTDIR=$td"
u=$(uname)
o=-O
e=
d=
x=
d=-DTERMIOS
t=-ltermcap
lib=
jv=NPROCESSORS_ONLN
case $u in
SunOS) x="NROFF=nroff TROFF=troff"
d="-DREALSTDC -DPOSIX_PROCS"
ur=$(uname -r)
case "$ur" in
5.0) d="-DSYSVR4 -DGRANTPT_BUG";;
5.*) ;;
*) echo "$0: Not set up for testing $u $ur" >&2; exit 1;;
esac
xi=/usr/gnu/bin/install
if test ! -x $xi; then
xi=cp
fi
x="$x XINSTALL=$xi TINSTALL=$xi"
;;
Linux) t=-lncurses
if test -e /etc/alpine-release; then
d="$d -DUSE_GETCWD"; lib=MUSL;
elif test -e /etc/gentoo-release; then
t="-ltinfo"; lib=GLIBC;
else
lib=GLIBC;
fi
jv=_NPROCESSORS_ONLN
;;
esac
if test -x /usr/bin/getconf; then j=-j$(getconf $jv); else j=; fi
# other than the first "make install" with $u, some of the others
# (e.g. PIPEPROCS, TERMINFO) may produce warnings (e.g. no declaration for
# ioctl) because we are just testing somewhat abnormal non-POSIX sysdefs.
make clean &&
make $j $x $dd/t10-$u install &&
make clean &&
make $j OPTFLAGS="$o" SYSDEFS="-DPIPEPROCS $d" TERMCAPLIB=$t $x $dd/t20-pipeprocs install &&
make clean &&
make $j OPTFLAGS="$o" SYSDEFS="-DBSDPOSIX $d" TERMCAPLIB=$t $x $dd/t30-bsdposix install &&
make clean &&
make $j OPTFLAGS="$o" SYSDEFS="-DBAREBONES -DSMALL -DJTC $d" TERMCAPLIB= $x $dd/t60-small install &&
make clean &&
case "$lib" in
GLIBC)
make $j OPTFLAGS="$o" SYSDEFS="-DGLIBCPTY" TERMCAPLIB=$t EXTRALIBS=-lutil $x $dd/t40-glibcpty install &&
make clean &&
make $j OPTFLAGS="$o" SYSDEFS="-DTERMINFO -DUSE_VFORK" TERMCAPLIB=$t $x $dd/t50-vfork &&
make clean
;;
esac &&
make $x tgz &&
if type zip 2> /dev/null; then make $x zip; fi &&
ls -s $(find $td | grep /bin/) &&
rm -rf $td &&
set +eu