-
Notifications
You must be signed in to change notification settings - Fork 110
/
.cirrus.yml
246 lines (233 loc) · 8.54 KB
/
.cirrus.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
env:
MAKE: make
clone_template: &CLONE_TEMPLATE
# need to supersede Cirrus CI-specific git clone with a regular git client
clone_script: |
if [ "$CIRRUS_OS" = 'darwin' ]; then
brew install git
elif [ "$CIRRUS_OS" = 'freebsd' ]; then
pkg install -y git
elif [ -n "$(command -v zypper)" ]; then
zypper install -y git
elif [ -n "$(command -v apt-get)" ]; then
apt-get update
apt-get -y install git
else
yum install -y git
fi
if [ -z "$CIRRUS_PR" ]; then
git clone --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
else
git clone https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
fi
cd $CIRRUS_WORKING_DIR
if [ -n "$CIRRUS_PR" ]; then
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
fi
git reset --hard $CIRRUS_CHANGE_IN_REPO
artifacts_template: &ARTIFACTS_TEMPLATE
always:
log_artifacts:
path: modules.log
type: text/plain
installlog_artifacts:
path: install.log
type: text/plain
build_install_test_template: &BUILD_INSTALL_TEST_TEMPLATE
build_script:
- $MAKE
test_script: |
if [ -n "$TEST_SPECIFIC_CONFIG" ]; then
$MAKE $TEST_SPECIFIC_CONFIG
fi
$MAKE test-deps
script/mt
if [ -n "$TEST_SPECIFIC_CONFIG" ]; then
$MAKE uninstall-testconfig
fi
install_script:
- $MAKE install
testinstall_script:
- script/mt install
uninstall_script:
- $MAKE uninstall
build_install_xvfbtest_template: &BUILD_INSTALL_XVBFTEST_TEMPLATE
build_script:
- $MAKE
test_script: |
if [ -n "$TEST_SPECIFIC_CONFIG" ]; then
$MAKE $TEST_SPECIFIC_CONFIG
fi
$MAKE test-deps
xvfb-run script/mt
if [ -n "$TEST_SPECIFIC_CONFIG" ]; then
$MAKE uninstall-testconfig
fi
install_script:
- $MAKE install
testinstall_script:
- xvfb-run script/mt install
uninstall_script:
- $MAKE uninstall
task:
<< : *CLONE_TEMPLATE
env:
MAKE: gmake
freebsd_instance:
image_family: freebsd-14-1
cpu: 1
memory: 2G
reqinstall_script: pkg install -y bash wget gmake dejagnu py311-sphinx gzip tcl86 tcl-wrapper autoconf ksh93 zsh fish perl5 python311 ruby cmake R readline
configure_script:
- ./configure
<< : *BUILD_INSTALL_TEST_TEMPLATE
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
env:
COVERAGE: y
macos_instance:
image: ghcr.io/cirruslabs/macos-runner:sonoma
reqinstall_script:
- brew update
# keep Tcl 8 as current Nagelfar archive requires 8.5+, but not Tcl 9
- brew install md5sha1sum expect dejagnu grep fish r tcl-tk@8 gzip powershell
configure_script:
- ./configure --prefix=/tmp/modules --with-loadedmodules=null:dot --with-tcl=/opt/homebrew/Cellar/tcl-tk@8/8.6.16/lib
<< : *BUILD_INSTALL_TEST_TEMPLATE
coverage_script:
- for f in tcl/*.tcl; do script/nglfar2ccov $f; done
- cd lib; gcov envmodules; cd ..
- curl -Os https://uploader.codecov.io/latest/macos/codecov
- chmod +x codecov
- ./codecov
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
# change dir to launch tests from path containing specific chars
env:
CIRRUS_WORKING_DIR: /tmp/modules-1.2.3+branch_name-91-g6dd3db49
DEBIAN_FRONTEND: noninteractive
LANGUAGE: C
LANG: C
LC_ALL: C
TEST_SPECIFIC_CONFIG: install-testmodspath-wild
EXTRATEST_SOURCESH: y
TESTSUITE_ENABLE_MODULECACHE: 1
container:
image: ubuntu:focal
cpu: 1
memory: 2G
reqinstall_script: |
# restore manpages subsystem in container
yes | unminimize || true
# install requirements
apt-get update
apt-get -y install curl wget expect-dev dejagnu python3-sphinx gzip man-db bash tcsh ksh zsh fish tcl tcl8.6 perl python ruby cmake r-base-core
# libtclenvmodules build requirements
apt-get -y install gcc autoconf tcl8.6-dev
# requirements for source-sh extra tests
apt-get -y install lsof
# install powershell
curl -LJO https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get update
apt-get install -y powershell
configure_script:
- ./configure --with-tclsh=tclsh8.6 --prefix /tmp/modules --with-tcl=/usr/lib/tcl8.6 --enable-append-manpath --enable-append-binpath --with-bin-search-path=/usr/bin:/bin --enable-silent-shell-debug-support --enable-windows-support --with-loadedmodules=null:dot --enable-quarantine-support --with-quarantine-vars=LD_LIBRARY_PATH --enable-new-features --with-dark-background-colors='hi=1:se=2:er=91:wa=93:mp=1;94:di=94:al=96:sy=95' --enable-foo FOO=bar
<< : *BUILD_INSTALL_TEST_TEMPLATE
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
env:
DEBIAN_FRONTEND: noninteractive
LANGUAGE: C
LANG: C
LC_ALL: C
container:
image: ubuntu:jammy
cpu: 1
memory: 2G
reqinstall_script: |
# restore manpages subsystem in container
yes | unminimize || true
# install requirements
apt-get update
apt-get -y install curl expect-dev dejagnu python3-sphinx gzip man-db bash tcsh ksh zsh fish tcl tcl8.6 perl python3 ruby cmake r-base-core lsb-release
# libtclenvmodules build requirements
apt-get -y install gcc autoconf tcl8.6-dev
# requirements for source-sh extra tests
apt-get -y install lsof
# install powershell
curl -LJO https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get update
apt-get install -y powershell
configure_script:
- ./configure --with-tclsh=tclsh8.6 --prefix='/tmp/mo ules' --with-tcl=/usr/lib/tcl8.6
<< : *BUILD_INSTALL_TEST_TEMPLATE
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
container:
matrix:
image: rockylinux:8
cpu: 1
memory: 2G
reqinstall_script: |
sed -i 's|enabled=0|enabled=1|' /etc/yum.repos.d/Rocky-PowerTools.repo
# specific update of libarchive is required for CMake on EL8.3
yum update -y libarchive
# need to pre-install correct module implementation to avoid fetching
# another one from EPEL (as dependency for R-core) on recent RockyLinux 8
yum install -y environment-modules
yum install -y epel-release
yum install -y tcsh zsh ksh tcl perl python36 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel
yum install -y which xorg-x11-server-utils xorg-x11-server-Xvfb
yum install -y fish
configure_script:
- ./configure --with-loadedmodules=null:dot --enable-quarantine-support --with-quarantine-vars='LD_LIBRARY_PATH LD_PRELOAD' --with-bashcompletiondir=/usr/share/bash-completion/completions --with-fishcompletiondir=/usr/share/fish/vendor_completions.d --with-zshcompletiondir=/usr/share/zsh/site-functions
# also enable a display on this test case to validate x-resource behavior
<< : *BUILD_INSTALL_XVBFTEST_TEMPLATE
rpm_script:
- xvfb-run make srpm rpm
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
env:
LANGUAGE: C
LANG: C
LC_ALL: C
arm_container:
image: almalinux:9
cpu: 1
memory: 2G
reqinstall_script: |
dnf install -y dnf-plugins-core epel-release
dnf config-manager --set-enabled crb
dnf install -y tcsh zsh ksh fish tcl perl python3 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel procps-ng
configure_script:
- ./configure --with-bashcompletiondir=/usr/share/bash-completion/completions --with-fishcompletiondir=/usr/share/fish/vendor_completions.d --with-zshcompletiondir=/usr/share/zsh/site-functions
# also enable a display on this test case to validate x-resource behavior
<< : *BUILD_INSTALL_TEST_TEMPLATE
rpm_script:
- make srpm rpm
<< : *ARTIFACTS_TEMPLATE
task:
<< : *CLONE_TEMPLATE
container:
matrix:
image: opensuse/leap:15.5
cpu: 1
memory: 2G
reqinstall_script: |
zypper install -y tcsh zsh ksh fish tcl perl python3 ruby cmake R-core R-core-packages make wget python3-Sphinx gzip git dejagnu man net-tools autoconf gcc tcl-devel util-linux-systemd procps
zypper install -y which xrdb xvfb-run
configure_script:
- ./configure --enable-versioning --with-loadedmodules=null:dot --with-quarantine-vars='LD_LIBRARY_PATH LD_PRELOAD'
# also enable a display on this test case to validate x-resource behavior
<< : *BUILD_INSTALL_XVBFTEST_TEMPLATE
<< : *ARTIFACTS_TEMPLATE
# vim:set tabstop=2 shiftwidth=2 expandtab autoindent: