This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
install libgdbm and libdb in GitHub Actions
[perl5.git] / .github / workflows / testsuite.yml
CommitLineData
430c0c0c
N
1name: testsuite
2
3on:
4 push:
5 branches:
6 - "**"
7 tags-ignore:
8 - "*"
9 pull_request:
10
642e41bd
NC
11# I don't think that we can (safely) set TEST_JOBS=2 in the global environment,
12# because on Win32 the various Makefile's `test` target is actually ./harness,
13# and it would (attempt to) honour the $ENV{TEST_JOBS} setting. This won't end
14# nicely as unlike BSD (etc), Win32 sockets can drop data at process exit, which
15# would cause missing TAP and hence spurious test failures.
16
8093f1ee
NC
17env:
18 PERL_SKIP_TTY_TEST: 1
19 CONTINUOUS_INTEGRATION: 1
20
430c0c0c 21jobs:
ea852e0e
TK
22 # ___ _ ___ __ _ _
23 # / __|_ __ ___| |_____ |_ _|_ _ / _|___ _ _ _ __ __ _| |_(_)___ _ _ ___
24 # \__ \ ' \/ _ \ / / -_) | || ' \| _/ _ \ '_| ' \/ _` | _| / _ \ ' \(_-<
25 # |___/_|_|_\___/_\_\___| |___|_||_|_| \___/_| |_|_|_\__,_|\__|_\___/_||_/__/
26
27 authors:
28 runs-on: ubuntu-latest
29 if: ( github.event.pull_request.head.repo.full_name == 'Perl/perl5' || github.repository == 'Perl/perl5' ) && github.base_ref != ''
30 continue-on-error: true
31
32 steps:
33 - name: Dump GitHub context
34 env:
35 GITHUB_CONTEXT: ${{ toJson(github) }}
36 run: echo "$GITHUB_CONTEXT"
37 - uses: actions/checkout@v2
38 with:
39 fetch-depth: 1000
40 - name: git setup
41 run: |
42 echo "Pull request authors"
43 echo "# git merge-base origin/${BASE_REF} HEAD"
44 git config diff.renameLimit 999999
45 git fetch --depth=1000 origin ${BASE_REF}
46 env:
47 BASE_REF: ${{ github.base_ref }}
48 - name: Involved authors
49 run: |
50 git log --pretty=format:"Author: %an <%ae>" origin/${BASE_REF}...${SHA}^2 | sort -u
51 env:
52 BASE_REF: ${{ github.base_ref }}
53 SHA: ${{ github.sha }}
54
55 # ___ _ _ ___ _ _
56 # / __| __ _ _ _ (_) |_ _ _ / __| |_ ___ __| |__
57 # \__ \/ _` | ' \| | _| || | | (__| ' \/ -_) _| / /
58 # |___/\__,_|_||_|_|\__|\_, | \___|_||_\___\__|_\_\
59 # |__/
60 # ascii art small font from https://ascii.co.uk/text
61
ce8fb9cc
NC
62 # "sanity_check" tests -Dusethreads without -DDEBUGGING
63 # "linux-i386" tests -Uusethreads without -DDEBUGGING
e3617462 64 # All builds in the "linux" matrix test with -DDEBUGGING
08ab26ef
NC
65 #
66 # "sanity_check" sets `fetch-depth: 0` so that it does a git clone with full
67 # history, and hence can run t/porting/cmp_version.t etc
68 # The git-related tests require full history, but we only need to run them
69 # once (they aren't platform specific).
70 # Hence leave the others with the default setting (1), which performs a
71 # shallow clone. In these shallow checkouts, the git related porting tests
72 # skip (or rapidly pass), but they won't fail spuriously.
ce8fb9cc 73
ea852e0e
TK
74 sanity_check:
75 name: "Sanity: Linux -Dusethreads"
76 runs-on: ubuntu-latest
77 timeout-minutes: 120
78
ea852e0e
TK
79 outputs:
80 run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }}
81
82 steps:
83 - name: Dump GitHub context
84 env:
85 GITHUB_CONTEXT: ${{ toJson(github) }}
86 run: echo "$GITHUB_CONTEXT"
7ab72683
TK
87 - name: Install System dependencies
88 run: |
89 sudo apt-get update
90 sudo apt-get install -y libgdbm-dev libdb-dev
ea852e0e
TK
91 - uses: actions/checkout@v2
92 with:
93 fetch-depth: 0
94 - name: git cfg + fetch tags
95 run: |
96 git config diff.renameLimit 999999
97 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
98 - name: Configure
99 run: |
ce8fb9cc 100 ./Configure -des -Dusedevel ${CONFIGURE_ARGS} -Dprefix="$HOME/perl-blead"
ea852e0e
TK
101 env:
102 CONFIGURE_ARGS: "-Dusethreads"
103 - name: Build
104 run: |
642e41bd 105 make -j2 test_prep
469a261c
NC
106 - name: Show Config
107 run: |
108 ./perl -Ilib -V
109 ./perl -Ilib -e 'use Config; print Config::config_sh'
ea852e0e
TK
110 - name: Run Tests
111 run: |
642e41bd 112 TEST_JOBS=2 ./perl t/harness
ea852e0e
TK
113
114 # Set a variable for dependent jobs to signal if full testsuite is enabled
115 - name: "Check if EXTENDED_TESTING is set"
116 id: check_extended_testing
117 env:
118 EXTENDED_TESTING: ${{ secrets.EXTENDED_TESTING }}
119 CURRENT_REPOSITORY: ${{ github.repository }}
120 run: |
121 if [[ -z "${EXTENDED_TESTING}" && "${CURRENT_REPOSITORY}" != 'Perl/perl5' ]]; then
122 echo "Skipping extended test jobs."
123 echo "::set-output name=run_all_jobs::false"
124 else
125 echo "Running all test jobs"
126 echo "::set-output name=run_all_jobs::true"
127 fi
128
129 # _ _
130 # | (_)_ _ _ ___ __
131 # | | | ' \ || \ \ /
132 # |_|_|_||_\_,_/_\_\
133
134 linux:
135 runs-on: ubuntu-latest
136 timeout-minutes: 120
137 needs: sanity_check
138 if: needs.sanity_check.outputs.run_all_jobs == 'true'
139
ea852e0e
TK
140 strategy:
141 fail-fast: false
142 matrix:
143 # exercise a variety of build options
144 # threads often cause build issues
145 CONFIGURE_ARGS:
146 - "-Uusethreads"
147 #- "-Dusethreads" # already tested above by sanity_check
a87db5c7 148 #- "-Duseshrplib -Dusesitecustomize -Duselongdouble" # tested below by install
d8367de7 149 - "-Duseshrplib -Dusequadmath -Dusecbacktrace -Dusethreads"
ea852e0e
TK
150 - "-Duserelocatableinc"
151 - "-Dcc='clang'"
152
153 steps:
7ab72683
TK
154 - name: Install System dependencies
155 run: |
156 sudo apt-get update
157 sudo apt-get install -y libgdbm-dev libdb-dev
ea852e0e 158 - uses: actions/checkout@v2
ea852e0e
TK
159 - name: git cfg + fetch tags
160 run: |
161 git config diff.renameLimit 999999
162 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
163 - name: Configure
164 run: |
165 ./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead" -DDEBUGGING
166 - name: Build
167 run: |
642e41bd 168 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2 test_prep
469a261c
NC
169 - name: Show Config
170 run: |
f3589814
NC
171 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
172 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
ea852e0e
TK
173 - name: Run Tests
174 run: |
642e41bd 175 LD_LIBRARY_PATH=`pwd` MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 ./perl t/harness
0ffd62ab
NC
176 - name: git clean
177 run: |
178 git clean -dxf
179 - name: manicheck
180 run: |
181 perl Porting/manicheck --exitstatus
ea852e0e 182
69e48a5b
NC
183 # _ _ _ _____ ___ __
184 # | (_)_ __ _ ___ __ (_)___ / ( _ ) / /_
185 # | | | '_ \| | | \ \/ /____| | |_ \ / _ \| '_ \
186 # | | | | | | |_| |> <_____| |___) | (_) | (_) |
187 # |_|_|_| |_|\__,_/_/\_\ |_|____/ \___/ \___/
ea852e0e
TK
188
189 linux-i386:
190 name: "linux i386/ubuntu"
191 runs-on: ubuntu-latest
192 timeout-minutes: 120
193 needs: sanity_check
194 if: needs.sanity_check.outputs.run_all_jobs == 'true'
195
196 # https://hub.docker.com/r/i386/ubuntu/
197 container:
198 image: i386/ubuntu:latest
ea852e0e
TK
199
200 strategy:
201 fail-fast: false
202 matrix:
203 CONFIGURE_ARGS:
204 - "-Dusedevel"
205
206 steps:
207 - name: Install System dependencies
208 run: |
7ab72683
TK
209 apt-get update
210 apt-get install -y build-essential git-core libgdbm-dev libdb-dev
ea852e0e
TK
211 # actions/checkout@v2 doesn't work in a container, so we use v1.
212 - uses: actions/checkout@v1
213 - name: fix git remote credential
214 run: git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
215 - name: git cfg + fetch tags
216 run: |
217 git config diff.renameLimit 999999
218 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
219 - name: Configure
220 run: |
ce8fb9cc 221 ./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
ea852e0e
TK
222 - name: Build
223 run: |
d43f37da 224 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2
469a261c
NC
225 - name: Show Config
226 run: |
f3589814
NC
227 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
228 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
a8b0d152
NC
229 # Leaving this as `make test` so that we test the `test` target on regular
230 # Linux.
231 # linux-i386 is just one job (not a matrix)
ea852e0e
TK
232 - name: Run Tests
233 run: |
d43f37da 234 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2 test
ea852e0e 235
a87db5c7
NC
236 # _ _ _ _ _
237 # _ __ ___ __ _| | _____ (_)_ __ ___| |_ __ _| | |
238 # | '_ ` _ \ / _` | |/ / _ \ | | '_ \/ __| __/ _` | | |
239 # | | | | | | (_| | < __/ | | | | \__ \ || (_| | | |
240 # |_| |_| |_|\__,_|_|\_\___| |_|_| |_|___/\__\__,_|_|_|
241
242 install:
243 runs-on: ubuntu-latest
244 timeout-minutes: 120
245 needs: sanity_check
246 if: needs.sanity_check.outputs.run_all_jobs == 'true'
247
248 steps:
7ab72683
TK
249 - name: Install System dependencies
250 run: |
251 sudo apt-get update
252 sudo apt-get install -y libgdbm-dev libdb-dev
a87db5c7 253 - uses: actions/checkout@v2
a87db5c7
NC
254 - name: git cfg + fetch tags
255 run: |
256 git config diff.renameLimit 999999
257 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
258 - name: Configure
259 run: |
260 ./Configure -des -Dusedevel -Duseshrplib -Dusesitecustomize -Duselongdouble -Dprefix="$HOME/perl-blead" -DDEBUGGING
261 - name: Build
262 run: |
263 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2
264 - name: Show Config
265 run: |
f3589814
NC
266 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
267 LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
a87db5c7
NC
268 - name: Run Tests
269 run: |
270 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 make -j2 test_harness
271 - name: Install
272 run: |
273 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 make -j2 install
274 # This will only pass if libperl.so and Config.pm are correctly installed:
275 - name: Show Install
276 run: |
277 ./perl -V
551ba941
NC
278 # This can't run in parallel
279 - name: distclean
280 run: |
281 MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make distclean
282 - name: manicheck
283 run: |
284 perl Porting/manicheck --exitstatus
a87db5c7 285
ea852e0e
TK
286 # ___ ___
287 # _ __ __ _ __ / _ \/ __|
288 # | ' \/ _` / _| (_) \__ \
289 # |_|_|_\__,_\__|\___/|___/
290
291 smoke-macos-catalina-xcode12:
292 name: "macOS (catalina) xcode 12"
293 runs-on: macos-10.15
294 timeout-minutes: 120
295 needs: sanity_check
296 if: needs.sanity_check.outputs.run_all_jobs == 'true'
297
0e45be42
NC
298 strategy:
299 fail-fast: false
300 matrix:
301 CONFIGURE_ARGS:
302 - "-Uusethreads"
303 - "-Duseithreads -Duseshrplib"
304
ea852e0e
TK
305 steps:
306 - uses: actions/checkout@v2
ea852e0e
TK
307 - name: Configure
308 run: |
309 export SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
0e45be42 310 sh ./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }}
ea852e0e
TK
311 - name: Build
312 run: |
642e41bd 313 make -j2 test_prep
469a261c
NC
314 - name: Show Config
315 run: |
316 ./perl -Ilib -V
317 ./perl -Ilib -e 'use Config; print Config::config_sh'
ea852e0e
TK
318 - name: Run Tests
319 run: |
642e41bd 320 TEST_JOBS=2 ./perl t/harness
ea852e0e
TK
321
322 # _ _
323 # __ __ _(_)_ _ __| |_____ __ _____
324 # \ V V / | ' \/ _` / _ \ V V (_-<
325 # \_/\_/|_|_||_\__,_\___/\_/\_//__/
326
327 windows-msvc142:
328 name: "Windows msvc142"
329 runs-on: windows-latest
330 timeout-minutes: 120
331 needs: sanity_check
332 if: needs.sanity_check.outputs.run_all_jobs == 'true'
333
ea852e0e
TK
334 steps:
335 - run: git config --global core.autocrlf false
336 - uses: actions/checkout@v2
ea852e0e
TK
337 #- name: Install clcache
338 # shell: cmd
339 # run: |
340 # curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache.4.2.0.nupkg --output clcache.4.2.0.nupkg
341 # choco install clcache --source=.
342 #- name: find home directory
343 # shell: cmd
344 # run: |
345 # set
346 #- name: C compiler cache
347 # id: clcache
348 # uses: actions/cache@v1
349 # with:
350 # path: $HOME\clcache
351 # key: ${{ runner.os }}-x64
352 #- name: Set up Perl build environment
353 # # pushd "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
354 # # for /f "delims=" %%x in ('.\vswhere.exe -latest -property InstallationPath') do set VSPATH=%%x
355 # # popd
356 # # call "%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
357 # #run: |
358 - name: Build
359 shell: cmd
360 run: |
361 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
362 cd win32
363 nmake CCTYPE=MSVC142
469a261c
NC
364 - name: Show Config
365 shell: cmd
366 run: |
367 .\perl.exe -V
368 .\perl.exe -e "use Config; print Config::config_sh"
ea852e0e
TK
369 - name: Run Tests
370 shell: cmd
371 run: |
372 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
373 cd win32
374 nmake CCTYPE=MSVC142 test
375
69e48a5b
NC
376 # _ __ _ _
377 # _ __ ___ (_)_ __ __ ___ __/ /_ | || |
378 # | '_ ` _ \| | '_ \ / _` \ \ /\ / / '_ \| || |_
379 # | | | | | | | | | | (_| |\ V V /| (_) |__ _|
380 # |_| |_| |_|_|_| |_|\__, | \_/\_/ \___/ |_|
381 # |___/
ea852e0e 382
430c0c0c
N
383 mingw64:
384 name: "Windows mingw64"
385 runs-on: windows-latest
386 timeout-minutes: 120
477c30e6
JL
387 needs: sanity_check
388 if: needs.sanity_check.outputs.run_all_jobs == 'true'
430c0c0c 389
430c0c0c
N
390 steps:
391 - run: git config --global core.autocrlf false
6c5cb1ed 392 - uses: actions/checkout@v2
430c0c0c
N
393 - name: Set up Perl build environment
394 run: |
6c5cb1ed
IS
395 # skip installing perl if it is already installed.
396 if (!(Test-Path "C:\strawberry\perl\bin")) {
397 choco install strawberryperl
398 }
399 echo @"
400 C:\strawberry\c\bin
401 C:\strawberry\perl\site\bin
402 C:\strawberry\perl\bin
403 "@ |
404 Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
430c0c0c
N
405 - name: Host perl -V
406 run: perl -V
407 - name: gcc --version
408 run: gcc --version
ea852e0e
TK
409 - name: Build
410 shell: cmd
411 run: |
412 cd win32
413 gmake CCHOME=C:\strawberry\c -f GNUMakefile -j2
469a261c
NC
414 - name: Show Config
415 shell: cmd
416 run: |
417 .\perl.exe -V
418 .\perl.exe -e "use Config; print Config::config_sh"
ea852e0e
TK
419 - name: Run Tests
420 shell: cmd
421 run: |
422 cd win32
423 set HARNESS_OPTIONS=j2
424 gmake CCHOME=C:\strawberry\c -f GNUMakefile test
425
69e48a5b
NC
426 # _
427 # ___ _ _ __ ___ _(_)_ __
428 # / __| | | |/ _` \ \ /\ / / | '_ \
429 # | (__| |_| | (_| |\ V V /| | | | |
430 # \___|\__, |\__, | \_/\_/ |_|_| |_|
431 # |___/ |___/
ea852e0e
TK
432
433 cygwin:
434 name: "cygwin"
435 runs-on: windows-latest
436 timeout-minutes: 120
437 needs: sanity_check
438 if: needs.sanity_check.outputs.run_all_jobs == 'true'
439
ea852e0e
TK
440 steps:
441 # we use Cygwin git, so no need to configure git here.
442
443 - name: Set up Cygwin
444 shell: cmd
445 run: |
446 choco install cygwin --params="/InstallDir:%GITHUB_WORKSPACE%\cygwin"
447 choco install cyg-get
7ab72683
TK
448 cyg-get cygwin-devel gcc-core gcc gcc-g++ make cygwin64-w32api-headers ^
449 binutils libtool git ccache lib libgdbm-devel libdb-devel
ea852e0e
TK
450 - name: Check out using Cygwin git, to ensure correct file permissions
451 env:
452 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
453 shell: cmd
454 run: |
455 path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin
456 sh -c "git config --global core.autocrlf false"
457 sh -c "mkdir -p ~; cd ~; git clone -qn \"https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY\" work ; cd work ; if [ \"$GITHUB_EVENT_NAME\" = pull_request ] ; then git fetch origin \"$GITHUB_REF\" && git checkout FETCH_HEAD ; else git checkout \"$GITHUB_SHA\" ; fi"
458 - name: Configure
459 shell: cmd
460 run: |
461 path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin
462 sh -c "cd ~/work; ./Configure -des -Dusedevel -Doptimize=-g -DDEBUGGING"
463 - name: Build
464 shell: cmd
465 run: |
466 path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin
698f3fd8 467 sh -c "cd ~/work; make -j2 test_prep"
469a261c
NC
468 - name: Show Config
469 shell: cmd
470 run: |
471 path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin
472 sh -c "cd ~/work; ./perl -Ilib -V; ./perl -Ilib -e 'use Config; print Config::config_sh'"
ea852e0e
TK
473 - name: Run Tests
474 shell: cmd
698f3fd8
NC
475 # Descend far enough down the cygwin yak warren, and one discovers that
476 # hints/cygwin.sh sets ldlibpthname=PATH
477 # Meaning that the Makefile variable LDLIBPTH is "PATH=..."
478 # Meaning that the command to invoke ./runtests is PATH=... ./perl.exe
479 # *Not* LD_LIBRARY_PATH or anything conventionally unix-like
480 #
481 # Cygwin is the slowest CI test. Breaking the abstractions described
482 # above/committing this DRY violation means that we avoid needing to
483 # `make -j2 test` to invoke t/TEST, and avoiding that likely saves us
484 # about 40 seconds, which is nearly 1% of the total wallclock time for
485 # complete all CI runs.
430c0c0c 486 run: |
ea852e0e 487 path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin
698f3fd8 488 sh -c "cd ~/work; PATH=`pwd`:.:$PATH ./perl.exe t/TEST"
6010775e
NC
489
490 # _ _ _ _
491 # _ __ ___ (_)_ __ (_) |_ ___ ___| |_
492 # | '_ ` _ \| | '_ \| | __/ _ \/ __| __|
493 # | | | | | | | | | | | || __/\__ \ |_
494 # |_| |_| |_|_|_| |_|_|\__\___||___/\__|
495
496 miniperl:
497 name: "minitest"
498 runs-on: ubuntu-latest
499 timeout-minutes: 120
500 needs: sanity_check
501 if: needs.sanity_check.outputs.run_all_jobs == 'true'
502
6010775e
NC
503 outputs:
504 run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }}
505
506 steps:
507 - name: Dump GitHub context
508 env:
509 GITHUB_CONTEXT: ${{ toJson(github) }}
510 run: echo "$GITHUB_CONTEXT"
7ab72683
TK
511 - name: Install System dependencies
512 run: |
513 sudo apt-get update
514 sudo apt-get install -y libgdbm-dev libdb-dev
6010775e 515 - uses: actions/checkout@v2
6010775e
NC
516 - name: git cfg + fetch tags
517 run: |
518 git config diff.renameLimit 999999
519 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
432caf78
NC
520 - name: manicheck
521 run: |
522 perl Porting/manicheck --exitstatus
6010775e
NC
523 - name: Configure
524 run: |
525 ./Configure -des -Dusedevel -Dprefix="$HOME/perl-blead"
526 - name: Build
527 run: |
528 make -j2 minitest_prep
529 - name: Show Config
530 run: |
531 ./miniperl -Ilib -V
532 ./miniperl -Ilib -e 'use Config; print Config::config_sh'
533 - name: Run Tests
534 run: |
535 make minitest_notty
4e4a36d2
NC
536
537 # _ ____ _ _ _
538 # / \ / ___| / \ | \ | |
539 # / _ \ \___ \ / _ \ | \| |
540 # / ___ \ ___) / ___ \| |\ |
541 # /_/ \_\____/_/ \_\_| \_|
542
543 # Life is pain, highness. Anyone who says differently is selling something.
544
545 ASAN:
546 name: "ASAN"
547 runs-on: ubuntu-latest
548 timeout-minutes: 120
549 needs: sanity_check
550 if: needs.sanity_check.outputs.run_all_jobs == 'true'
551
4e4a36d2 552 strategy:
4e4a36d2 553 matrix:
64bd355f
NC
554 # -DPURIFY disables arenas and mallocs everything individually. With
555 # ASAN or similar it's the real torture test. However, we also need to
556 # test that the arena code doesn't have any goofs.
4e4a36d2 557 CONFIGURE_ARGS:
64bd355f 558 - "-Accflags=-DPURIFY"
e3617462 559 - "-DDEBUGGING"
4e4a36d2
NC
560 - "-Dusethreads"
561
562 steps:
7ab72683
TK
563 - name: Install System dependencies
564 run: |
565 sudo apt-get update
566 sudo apt-get install -y libgdbm-dev libdb-dev
4e4a36d2 567 - uses: actions/checkout@v2
4e4a36d2
NC
568 - name: git cfg + fetch tags
569 run: |
570 git config diff.renameLimit 999999
571 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
572 - name: Configure
573 run: |
74b89a14 574 ./Configure -des -Dusedevel -Dcc="clang -fsanitize=address" -Dld="clang -fsanitize=address" ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
4e4a36d2
NC
575 - name: Build
576 run: |
642e41bd 577 PERL_DESTRUCT_LEVEL=2 make -j2 test_prep
4e4a36d2
NC
578 - name: Show Config
579 run: |
580 ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -V
581 ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -e 'use Config; print Config::config_sh'
582 - name: Run Tests
229e23b6 583 # LeakSanitizer is disabled because it randomly crashes, see [gh #19189]
4e4a36d2 584 run: |
229e23b6 585 ASAN_OPTIONS=detect_leaks=0 PERL_DESTRUCT_LEVEL=2 TEST_JOBS=2 ./perl t/harness
99ecd386
NC
586
587 # ____ _____ ____ _ _ _ _ _ ___ ____ ___ ____ _____
588 # | _ \| ____| _ \| | | | | | \ | |_ _/ ___/ _ \| _ \| ____|
589 # | |_) | _| | |_) | | | | | | \| || | | | | | | | | | _|
590 # | __/| |___| _ <| |___ | |_| | |\ || | |__| |_| | |_| | |___
591 # |_| |_____|_| \_\_____|___\___/|_| \_|___\____\___/|____/|_____|
592 # |_____|
593
594 # To the pain!
595
596 PERL_UNICODE:
597 name: "PERL_UNICODE"
598 runs-on: ubuntu-latest
599 timeout-minutes: 120
600 needs: sanity_check
601 if: needs.sanity_check.outputs.run_all_jobs == 'true'
602
603 strategy:
604 matrix:
605 # There are many many combinations we *could* test. These two are likely
606 # to give the best overview - "basic sanity" and "everything maxed out"
607 CONFIGURE_ARGS:
608 - "-Uusethreads"
609 - "-Dusethreads -Accflags=-DPURIFY -Dcc='gcc -fsanitize=address' -Dld='gcc -fsanitize=address'"
610
611 steps:
7ab72683
TK
612 - name: Install System dependencies
613 run: |
614 sudo apt-get update
615 sudo apt-get install -y libgdbm-dev libdb-dev
99ecd386 616 - uses: actions/checkout@v2
99ecd386
NC
617 - name: git cfg + fetch tags
618 run: |
619 git config diff.renameLimit 999999
620 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
621 - name: Show Locales
622 run: locale -a
623 - name: Configure
624 run: |
625 ./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
626 - name: Build
627 run: |
642e41bd 628 LC_ALL=en_US.UTF-8 PERL_UNICODE="" PERL_DESTRUCT_LEVEL=2 make -j2 test_prep
99ecd386
NC
629 - name: Show Config
630 run: |
631 ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -V
632 ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -e 'use Config; print Config::config_sh'
633 - name: Run Tests
229e23b6 634 # LeakSanitizer is disabled because it randomly crashes, see [gh #19189]
99ecd386 635 run: |
229e23b6 636 ASAN_OPTIONS=detect_leaks=0 PERL_DESTRUCT_LEVEL=2 LC_ALL=en_US.UTF-8 PERL_UNICODE="" TEST_JOBS=2 ./perl t/harness