forked from perl5-dbi/DBD-MariaDB
-
Notifications
You must be signed in to change notification settings - Fork 0
510 lines (506 loc) · 22.8 KB
/
ci.yaml
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
name: CI
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build-matrix:
runs-on: ubuntu-latest
steps:
- uses: mikefarah/yq@master
- name: Build matrix
id: set-matrix
run: |
# For each perl-version, dbi-version, server-version and client-version from below list
# create build matrix with tupples filled up with default versions of other field. Plus
# include combinations specified in include list. Default version is the last specified
# in every field. This reduced number of jobs because full build matrix is too big.
{ printf "matrix="; yq -o=json '.' | jq -M -c '{ "include" : [ . as $top | del(.include) | map_values(last) as $defaults | ( $top | (keys | map(select(. != "include"))[] | { (.) : $top[.][] }) , .include[] ) | . = $defaults * . ] }'; } << EOF >> $GITHUB_OUTPUT
perl-version:
- 5.8.1
- 5.8.2
- 5.8.8
- 5.8.9
- 5.10.0
- 5.12.0
- 5.14.0
- 5.16.0
- 5.18.0
- 5.20.0
- 5.22.0
- 5.24.0
- 5.26.0
- 5.28.0
- 5.30.0
- 5.32.0
- 5.34.0
- 5.36.0
- 5.38.0
- system
dbi-version:
- 1.627
- 1.641
- latest
server-version:
- mysql-4.1.22
- mysql-5.0.15
- mysql-5.0.96
- mysql-5.1.30
- mysql-5.1.72
- mysql-5.1.73
- mysql-5.5.8
- mysql-5.5.47
- mysql-5.5.49
- mysql-5.5.54
- mysql-5.5.55
- mysql-5.5.56
- mysql-5.5.57
- mysql-5.5.58
- mysql-5.5.60
- mysql-5.5.62
- mysql-5.6.10
- mysql-5.6.30
- mysql-5.6.35
- mysql-5.6.36
- mysql-5.6.37
- mysql-5.6.38
- mysql-5.6.39
- mysql-5.6.40
- mysql-5.6.41
- mysql-5.6.43
- mysql-5.6.45
- mysql-5.6.51
- mysql-5.7.8-rc
- mysql-5.7.11
- mysql-5.7.12
- mysql-5.7.17
- mysql-5.7.18
- mysql-5.7.19
- mysql-5.7.20
- mysql-5.7.21
- mysql-5.7.22
- mysql-5.7.23
- mysql-5.7.25
- mysql-5.7.27
- mysql-5.7.43
- mysql-8.0.0-dmr
- mysql-8.0.1-dmr
- mysql-8.0.2-dmr
- mysql-8.0.3-rc
- mysql-8.0.4-rc
- mysql-8.0.11
- mysql-8.0.12
- mysql-8.0.13
- mysql-8.0.14
- mysql-8.0.15
- mysql-8.0.16
- mysql-8.0.17
- mysql-8.0.20
- mysql-8.0.21
- mysql-8.0.22
- mysql-8.0.33
- mysql-8.0.34
- mariadb-5.5.40
- mariadb-5.5.44
- mariadb-5.5.47
- mariadb-5.5.52
- mariadb-5.5.54
- mariadb-5.5.55
- mariadb-5.5.56
- mariadb-5.5.57
- mariadb-5.5.58
- mariadb-5.5.59
- mariadb-5.5.60
- mariadb-5.5.61
- mariadb-5.5.63
- mariadb-5.5.65
- mariadb-5.5.68
- mariadb-10.0.14
- mariadb-10.0.20
- mariadb-10.0.23
- mariadb-10.0.29
- mariadb-10.0.30
- mariadb-10.0.31
- mariadb-10.0.32
- mariadb-10.0.34
- mariadb-10.0.36
- mariadb-10.0.38
- mariadb-10.1.2
- mariadb-10.1.8
- mariadb-10.1.11
- mariadb-10.1.20
- mariadb-10.1.22
- mariadb-10.1.24
- mariadb-10.1.30
- mariadb-10.1.31
- mariadb-10.1.33
- mariadb-10.1.36
- mariadb-10.1.37
- mariadb-10.1.38
- mariadb-10.1.41
- mariadb-10.1.48
- mariadb-10.2.0
- mariadb-10.2.1
# Incompatible, broken mysql_config
# - mariadb-10.2.2
# - mariadb-10.2.3
- mariadb-10.2.4
- mariadb-10.2.5
- mariadb-10.2.6
- mariadb-10.2.7
- mariadb-10.2.8
- mariadb-10.2.9
- mariadb-10.2.10
- mariadb-10.2.11
- mariadb-10.2.12
- mariadb-10.2.13
- mariadb-10.2.15
- mariadb-10.2.18
- mariadb-10.2.19
- mariadb-10.2.20
- mariadb-10.2.21
- mariadb-10.2.22
- mariadb-10.2.26
- mariadb-10.2.44
- mariadb-10.3.0
- mariadb-10.3.1
- mariadb-10.3.2
- mariadb-10.3.3
- mariadb-10.3.4
- mariadb-10.3.6
- mariadb-10.3.7
- mariadb-10.3.8
- mariadb-10.3.10
- mariadb-10.3.11
- mariadb-10.3.12
- mariadb-10.3.17
- mariadb-10.3.39
- mariadb-10.4.0
- mariadb-10.4.1
- mariadb-10.4.2
# Incompatible, unsupported by MySQL::Sandbox
# - mariadb-10.4.3
# - mariadb-10.4.4
# - mariadb-10.4.5
# - mariadb-10.4.6
# - mariadb-10.4.7
- system
client-version:
- mysqlconc-6.0.0-beta
- mysqlconc-6.0.2
- mysqlconc-6.1.0
- mysqlconc-6.1.9
- mysqlconc-6.1.10
- mysqlconc-6.1.11
- mysqlconc-6.2.0-labs
# Incompatible, broken buffer for prepared statements
# - mariadbconc-2.2.0
# - mariadbconc-2.2.3
# - mariadbconc-2.3.0
- mariadbconc-2.3.1
- mariadbconc-2.3.2
- mariadbconc-2.3.3
- mariadbconc-2.3.4
- mariadbconc-2.3.5
- mariadbconc-2.3.6
- mariadbconc-2.3.7
# Incompatible, client library freeze
# - mariadbconc-3.0.0-alpha
# Incompatible, missing header files
# - mariadbconc-3.0.1-beta
- mariadbconc-3.0.2
# Incompatible, broken buffer for prepared statements
# - mariadbconc-3.0.3
- mariadbconc-3.0.4
- mariadbconc-3.0.5
- mariadbconc-3.0.6
- mariadbconc-3.0.7
- mariadbconc-3.0.8
- mariadbconc-3.0.9
- mariadbconc-3.0.10
- mariadbconc-3.1.0
- mariadbconc-3.1.1
- mariadbconc-3.1.2
- mariadbconc-3.1.3
- mariadbconc-3.1.10
- mariadbconc-3.1.21
- mariadbconc-3.2.0
- mariadbconc-3.2.7
- mariadbconc-3.3.0-rc1
- mariadbconc-3.3.5
- system
- same-as-server
include:
- server-version: mysql-5.0.96
client-version: mariadbconc-2.3.4
- server-version: mysql-5.1.72
client-version: mariadbconc-3.0.2
- server-version: mariadb-5.5.40
client-version: mysqlconc-6.1.11
- server-version: mysql-8.0.3-rc
client-version: mariadbconc-2.3.0
- server-version: mariadb-10.3.3
client-version: mysqlconc-6.0.0-beta
- server-version: mariadb-10.3.3
client-version: mysqlconc-6.1.11
- server-version: mysql-8.0.3-rc
client-version: mariadbconc-3.0.2
- server-version: mysql-5.6.38
client-version: mysqlconc-6.1.11
- server-version: mariadb-10.1.30
client-version: mariadbconc-3.0.2
- server-version: mysql-4.1.22
client-version: mariadbconc-3.0.6
- server-version: none
client-version: system
- perl-version: 5.12.0
dbi-version: 1.608
EOF
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build-n-test:
name: perl-${{ matrix.perl-version }}/${{ matrix.server-version }}/${{ matrix.client-version }}/dbi-${{ matrix.dbi-version }}
needs: build-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- name: Checkout git commit ${{ github.sha }}
if: github.event_name != 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- name: Checkout git commit ${{ github.event.pull_request.head.sha }} (fixup for pull request)
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup cpan sources cache
uses: actions/cache@v3
with:
path: ~/.cpan/sources
key: cache-cpan
- name: Install client dependences (1)
if: ${{ matrix.client-version != 'system' && ( matrix.server-version != 'system' || matrix.client-version != 'same-as-server' ) }}
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgnutls28-dev libncurses5 libncursesw5 libstdc++5
version: 1.0
- name: Install client dependences (2)
if: ${{ matrix.client-version != 'system' && ( matrix.server-version != 'system' || matrix.client-version != 'same-as-server' ) }}
run: |
wget --progress=bar:force http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb -O /tmp/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
wget --progress=bar:force http://security.ubuntu.com/ubuntu/pool/universe/j/jemalloc/libjemalloc1_3.6.0-11_amd64.deb -O /tmp/libjemalloc1_3.6.0-11_amd64.deb
sudo dpkg -i /tmp/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb /tmp/libjemalloc1_3.6.0-11_amd64.deb
- name: Install MariaDB client system
if: ${{ matrix.client-version == 'system' || ( matrix.server-version == 'system' && matrix.client-version == 'same-as-server' ) }}
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libmariadb-dev
version: 1.0
- name: Install MariaDB server system
if: ${{ matrix.server-version == 'system' }}
run: |
sudo apt install mariadb-server
sudo systemctl start mariadb.service
sudo mariadb -e "GRANT ALL PRIVILEGES ON test.* TO 'test'@'localhost' IDENTIFIED BY 'test'"
- name: Install Perl system
if: ${{ matrix.perl-version == 'system' }}
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: perl cpanminus liblocal-lib-perl
version: 1.0
- name: Install Perl ${{ matrix.perl-version }}
if: ${{ matrix.perl-version != 'system' }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl-version }}
- name: Download and Install MariaDB/MySQL server ${{ matrix.server-version }} and client ${{ matrix.client-version }}
run: |
if [ "${{ matrix.perl-version }}" = "system" ]; then
eval $(perl -I"$HOME/perl5/lib/perl5" -Mlocal::lib)
fi
mkdir -p "$HOME/cache"
case "${{ matrix.server-version }}" in
mysql*) DB=MySQL ;;
mariadb*) DB=MariaDB ;;
none) DB=""; ;;
system) DB=""; ;;
*) DB=unknown ;;
esac
case "${{ matrix.client-version }}" in
mysql*) CONC_DB=MySQL ;;
mariadb*) CONC_DB=MariaDB ;;
system) CONC_DB=""; ;;
system-pic) CONC_DB=""; ;;
same-as-server) CONC_DB=""; ;;
*) CONC_DB=unknown ;;
esac
VERSION=`echo "${{ matrix.server-version }}" | sed 's/^[^-]*-//'`
CONC_VERSION=`echo "${{ matrix.client-version }}" | sed 's/^[^-]*-//'`
if [ "$DB" = "MySQL" ]; then
case "$VERSION" in
4.1.*) SANDBOX_URL=https://mysql.linux.cz/Downloads/MySQL-4.1/mysql-standard-$VERSION-unknown-linux-gnu-x86_64-glibc23.tar.gz ;;
5.0.[012]*) SANDBOX_URL=https://downloads.mysql.com/archives/get/p/23/file/mysql-standard-$VERSION-linux-x86_64-glibc23.tar.gz ;;
5.[01].*) SANDBOX_URL=https://downloads.mysql.com/archives/get/p/23/file/mysql-$VERSION-linux-x86_64-glibc23.tar.gz ;;
5.5.?) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux2.6-x86_64.tar.gz ;;
5.5.[1234]*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux2.6-x86_64.tar.gz ;;
5.5.5[012345]*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux2.6-x86_64.tar.gz ;;
5.5.56*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.5-x86_64.tar.gz ;;
5.5.*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.12-x86_64.tar.gz ;;
5.6.[12]*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.5-x86_64.tar.gz ;;
5.6.3[0123456]*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.5-x86_64.tar.gz ;;
5.6.*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.12-x86_64.tar.gz ;;
5.7.19*|5.7.[234]*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.12-x86_64.tar.gz ;;
5.7.*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.5-x86_64.tar.gz ;;
8.0.?-*|8.0.11) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.12-x86_64.tar.gz ;;
8.0.*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.12-x86_64.tar.xz ;;
8.1.*) SANDBOX_URL=https://dev.mysql.com/get/mysql-$VERSION-linux-glibc2.28-x86_64.tar.xz ;;
*) echo "Unsupported MySQL version '$VERSION'"; exit 1 ;;
esac
SANDBOX_CACHE_FILE="$HOME/cache/$(basename "$SANDBOX_URL")"
elif [ "$DB" = "MariaDB" ]; then
case "$VERSION" in
5.*|10.[012].*) SANDBOX_URL=https://downloads.mariadb.com/MariaDB/mariadb-$VERSION/bintar-linux-x86_64/mariadb-$VERSION-linux-x86_64.tar.gz ;;
10.[34].*) SANDBOX_URL=https://downloads.mariadb.com/MariaDB/mariadb-$VERSION/bintar-linux-glibc_214-x86_64/mariadb-$VERSION-linux-glibc_214-x86_64.tar.gz ;;
*) echo "Unsupported MariaDB version '$VERSION'"; exit 1 ;;
esac
SANDBOX_CACHE_FILE="$HOME/cache/$(basename "$SANDBOX_URL")"
elif [ -n "$DB" ]; then
echo "Unsupported DB '$DB'"; exit 1
fi
if [ -n "$DB" ]; then
export SANDBOX_HOME="$HOME/sandbox"
export SANDBOX_BINARY="$SANDBOX_HOME/binary"
export SANDBOX_FILE="$SANDBOX_HOME/$(basename "$SANDBOX_CACHE_FILE")"
if [ ! -f "$SANDBOX_CACHE_FILE" ]; then wget --progress=bar:force "$SANDBOX_URL" -O "$SANDBOX_CACHE_FILE" || exit 1; fi
mkdir -p "$SANDBOX_HOME" || exit 1
ln -s "$SANDBOX_CACHE_FILE" "$SANDBOX_FILE" || exit 1
if [ `echo "$VERSION" | sed 's/\.//;s/\..*//'` -ge 55 ]; then
SANDBOX_OPTIONS="$SANDBOX_OPTIONS --init_options=--innodb_use_native_aio=0 --my_clause=innodb_use_native_aio=0 --my_clause=performance_schema=ON"
fi
fi
if [ "$CONC_DB" = "MySQL" ]; then
case "$CONC_VERSION" in
*-labs) CONC_URL=https://downloads.mysql.com/snapshots/pb/mysql-connector-c-$CONC_VERSION/mysql-connector-c-$CONC_VERSION-linux-glibc2.5-x86_64.tar.gz ;;
6.0.*) CONC_URL=https://dev.mysql.com/get/mysql-connector-c-$CONC_VERSION-linux-glibc2.3-x86-64bit.tar.gz ;;
6.1.[0123456789]) CONC_URL=https://dev.mysql.com/get/mysql-connector-c-$CONC_VERSION-linux-glibc2.5-x86_64.tar.gz ;;
6.1.*) CONC_URL=https://dev.mysql.com/get/mysql-connector-c-$CONC_VERSION-linux-glibc2.12-x86_64.tar.gz ;;
*) echo "Unsupported MySQL Connector/C version '$CONC_VERSION'"; exit 1 ;;
esac
CONC_FILE="$HOME/cache/$(basename "$CONC_URL")"
elif [ "$CONC_DB" = "MariaDB" ]; then
case "$CONC_VERSION" in
3.0.*) CONC_URL=https://downloads.mariadb.com/Connectors/c/connector-c-${CONC_VERSION/-*/}/mariadb-connector-c-$CONC_VERSION-linux-x86_64.tar.gz ;;
3.1.[01234567]) CONC_URL=https://downloads.mariadb.com/Connectors/c/connector-c-${CONC_VERSION/-*/}/mariadb-connector-c-$CONC_VERSION-linux-x86_64.tar.gz ;;
3.*) CONC_URL=https://downloads.mariadb.com/Connectors/c/connector-c-${CONC_VERSION/-*/}/mariadb-connector-c-$CONC_VERSION-ubuntu-focal-amd64.tar.gz ;;
*) CONC_URL=https://downloads.mariadb.com/Connectors/c/connector-c-${CONC_VERSION/-*/}/mariadb-connector-c-$CONC_VERSION-linux-x86_64.tar.gz ;;
esac
CONC_FILE="$HOME/cache/$(basename "$CONC_URL")"
elif [ -n "$CONC_DB" ]; then
echo "Unsupported Connector/C '$CONC_DB'"; exit 1
fi
if [ -n "$CONC_DB" ]; then
if [ ! -f "$CONC_FILE" ]; then wget --progress=bar:force "$CONC_URL" -O "$CONC_FILE" || exit 1; fi
fi
if [ "${{ matrix.client-version }}" = "system-pic" ]; then
sed 's/-L\$pkglibdir *-lmysqld/-L\/usr\/lib\/mysql -lmysqld_pic /' `which mysql_config_pic` > "$HOME/mysql_config_pic"
chmod +x $HOME/mysql_config_pic
apt download mysql-server-core-5.5
dpkg -x mysql-server-core-5.5_*.deb $HOME/mysql-server-core-5.5
fi
if [ -n "$DB" ]; then
cpanm --quiet --notest --skip-satisfied MySQL::Sandbox || exit 1
if [[ $SANDBOX_FILE =~ .xz$ ]]; then
unxz < "$SANDBOX_FILE" | gzip -1 > "${SANDBOX_FILE%.xz}.gz"
SANDBOX_FILE="${SANDBOX_FILE%.xz}.gz"
fi
make_sandbox --export_binaries "$SANDBOX_FILE" -- --sandbox_port 3310 --sandbox_directory msb --no_confirm --verbose $SANDBOX_OPTIONS || exit 1
sed 's/-lzlib //g' -i $SANDBOX_HOME/*/bin/mysql_config
rm -f $SANDBOX_HOME/*/bin/mariadb_config
printf '#!/bin/sh\nexec %s/msb/my sql_config "$@"\n' $SANDBOX_HOME > "$HOME/mysql_config"
chmod +x $HOME/mysql_config
fi
if [ -n "$CONC_DB" ]; then
mkdir -p "$HOME/conc"
tar --strip-components=1 --directory="$HOME/conc" -xf "$CONC_FILE" || exit 1
if $HOME/conc/bin/mysql_config 2>&1 | grep -q /usr/local; then
rm -f $HOME/conc/bin/mysql_config
fi
if [ -x $HOME/conc/bin/mysql_config ]; then
sed 's/-l "/-lmysqlclient "/g' -i "$HOME/conc/bin/mysql_config" || exit 1
fi
fi
- name: Install dependences
run: |
if [ "${{ matrix.perl-version }}" = "system" ]; then
eval $(perl -I"$HOME/perl5/lib/perl5" -Mlocal::lib)
fi
perl '-MExtUtils::MakeMaker 7.00' -e '' || cpanm --quiet --notest ExtUtils::MakeMaker@7.00
perl '-MCPAN::Meta 2.112580' -e '' || cpanm --quiet --notest CPAN::Meta@2.112580
perl '-Mv5.12' -e '' || cpanm --quiet --notest Test::Deep@1.130
if [ "${{ matrix.dbi-version }}" != "latest" ]; then cpanm --quiet --notest DBI@${{ matrix.dbi-version }}; fi
cpanm --quiet --notest --skip-satisfied DBI~1.608 Devel::CheckLib~1.12
cpanm --quiet --notest --skip-satisfied --installdeps --with-configure --with-develop --with-recommends --with-suggests .
- name: Configure
run: |
if [ "${{ matrix.perl-version }}" = "system" ]; then
eval $(perl -I"$HOME/perl5/lib/perl5" -Mlocal::lib)
fi
if [ "${{ matrix.server-version }}" = "system" ]; then
export DBD_MARIADB_TESTUSER=test
export DBD_MARIADB_TESTPASSWORD=test
export DBD_MARIADB_TESTHOST=127.0.0.1
export DBD_MARIADB_TESTPORT=3306
elif [ "${{ matrix.server-version }}" = "none" ]; then
export DBD_MARIADB_TESTHOST=0.0.0.0
export DBD_MARIADB_TESTPORT=0
else
export DBD_MARIADB_TESTUSER=msandbox
export DBD_MARIADB_TESTPASSWORD=msandbox
export DBD_MARIADB_TESTHOST=127.0.0.1
export DBD_MARIADB_TESTPORT=3310
fi
if [ "${{ matrix.client-version }}" != "system" ] && [ "${{ matrix.client-version }}" != "system-pic" ] && [ "${{ matrix.client-version }}" != "same-as-server" ]; then
if [ -x $HOME/conc/bin/mysql_config ]; then
export DBD_MARIADB_CONFIG="$HOME/conc/bin/mysql_config"
else
INCLUDE_PATH=`find "$HOME/conc" -name "mysql.h" | sort | head -1`
if [ -z "$INCLUDE_PATH" ]; then echo "File mysql.h was not found"; exit 1; fi
LIB_PATH=`find "$HOME/conc" -name "lib*.so" | sort | head -1`
if [ -z "$INCLUDE_PATH" ]; then echo "File lib*.so was not found"; exit 1; fi
export DBD_MARIADB_CFLAGS="-I`dirname $INCLUDE_PATH`"
export DBD_MARIADB_LIBS="-L`dirname $LIB_PATH` -l`echo $LIB_PATH | sed 's/.*\/lib//;s/\.so//'`"
export DBD_MARIADB_CONFIG="skip"
fi
elif [ "${{ matrix.client-version }}" = "same-as-server" ] && [ "${{ matrix.server-version }}" != "system" ]; then
export DBD_MARIADB_CONFIG="$HOME/mysql_config"
elif [ "${{ matrix.client-version }}" = "system-pic" ]; then
export DBD_MARIADB_CONFIG="$HOME/mysql_config_pic"
fi
make realclean || true
perl Makefile.PL
- name: Build
run: |
if [ "${{ matrix.perl-version }}" = "system" ]; then
eval $(perl -I"$HOME/perl5/lib/perl5" -Mlocal::lib)
fi
make
- name: Test
run: |
if [ "${{ matrix.perl-version }}" = "system" ]; then
eval $(perl -I"$HOME/perl5/lib/perl5" -Mlocal::lib)
fi
if [ "${{ matrix.client-version }}" = "system-pic" ]; then
export DBD_MARIADB_TESTLANGDIR="$HOME/mysql-server-core-5.5/usr/share/mysql/english"
elif [ "${{ matrix.server-version }}" != "none" ] && [ "${{ matrix.server-version }}" != "system" ]; then
export DBD_MARIADB_TESTLANGDIR=`find $HOME/sandbox/* -name english | head -1`
fi
export HARNESS_OPTIONS=j4
export RELEASE_TESTING=1
if [ "${{ matrix.server-version }}" != "none" ]; then
export CONNECTION_TESTING=1
fi
make test