-
Notifications
You must be signed in to change notification settings - Fork 559
874 lines (809 loc) · 33.2 KB
/
testsuite.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
#
# Run the tests on various build configurations and various operating systems.
#
# In the Perl/perl5 repository all jobs are run by default.
#
# To enable the testing on a fork of the perl5 repository you first need to
# enable GitHub Actions in 'Settings' -> 'Actions' -> 'General'.
#
# When actions are enabled then it will - by default - run the 'Sanity Check' job.
#
# Testing other build configurations is controlled by the 'Secrets' configured
# in 'Settings' -> 'Secrets and Variables' -> 'Actions' -> 'Variables':
# - DO_EXTENDED_TESTING: when this var exists and is set to a true value then
# all build configurations are tested;
# - CI_SKIP_SANITY: if set to a true value then most of the 'Sanity Check' job is skipped;
# - CI_FORCE_LINUX: if set to a true value: run the 'linux' job;
# - CI_FORCE_LINUX_I386: if set to a true value: run the 'linux-i386' job;
# - CI_FORCE_INSTALL: if set to a true value: run the 'install' job;
# - CI_FORCE_MACOS: if set to a true value: run the 'smoke-macos-14' job;
# - CI_FORCE_MSVC142: if set to a true value: run the 'windows-msvc142' job;
# - CI_FORCE_MINGW64: if set to a true value: run the 'mingw64' job;
# - CI_FORCE_CYGWIN: if set to a true value: run the 'cygwin' job;
# - CI_FORCE_MINITEST: if set to a true value: run the 'miniperl' job;
# - CI_FORCE_ASAN: if set to a true value: run the 'ASAN' job;
# - CI_FORCE_PERL_UNICODE: if set to a true value: run the 'PERL_UNICODE' job;
# - CI_FORCE_DIST_MODULES: if set to a true value: run the 'dist-modules' job;
#
# For the purpose of this workflow:
# - 'true value': any value that is not false
# - 'false value':
# * empty string
# * string containing only spaces (i.e. ' ')
# * string containing only zeroes (i.e. '0', '0000')
# * string containing only spaces and zeroes (i.e. '0 0 0 0')
#
# Example: if you only want to run tests on cygwin then you can set:
# - DO_EXTENDED_TESTING=0
# - CI_SKIP_SANITY=1
# - CI_FORCE_CYGWIN=1
# - (and all other CI_FORCE_... vars to 0)
#
name: testsuite
on:
push:
branches:
- "**"
tags-ignore:
- "*"
pull_request:
# I don't think that we can (safely) set TEST_JOBS=2 in the global environment,
# because on Win32 the various Makefile's `test` target is actually ./harness,
# and it would (attempt to) honour the $ENV{TEST_JOBS} setting. This won't end
# nicely as unlike BSD (etc), Win32 sockets can drop data at process exit, which
# would cause missing TAP and hence spurious test failures.
env:
PERL_SKIP_TTY_TEST: 1
CONTINUOUS_INTEGRATION: 1
permissions:
contents: read # to fetch code
jobs:
# ___ _ ___ __ _ _
# / __|_ __ ___| |_____ |_ _|_ _ / _|___ _ _ _ __ __ _| |_(_)___ _ _ ___
# \__ \ ' \/ _ \ / / -_) | || ' \| _/ _ \ '_| ' \/ _` | _| / _ \ ' \(_-<
# |___/_|_|_\___/_\_\___| |___|_||_|_| \___/_| |_|_|_\__,_|\__|_\___/_||_/__/
involved_authors_debug:
runs-on: ubuntu-latest
if: ( github.event.pull_request.head.repo.full_name == 'Perl/perl5' || github.repository == 'Perl/perl5' ) && github.base_ref != ''
continue-on-error: true
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
with:
fetch-depth: 1000
- name: git setup
run: |
echo "Pull request authors"
echo "# git merge-base origin/${BASE_REF} HEAD"
git config diff.renameLimit 999999
git fetch --depth=1000 origin ${BASE_REF}
env:
BASE_REF: ${{ github.base_ref }}
- name: Involved authors
run: |
echo "Authors from origin/${BASE_REF}..${SHA}^2"
echo "specifically: $(git rev-parse origin/${BASE_REF})..$(git rev-parse ${SHA}^2)"
git log --pretty=format:"Author: %aN <%aE>" origin/${BASE_REF}..${SHA}^2 | sort | uniq -c
env:
BASE_REF: ${{ github.base_ref }}
SHA: ${{ github.sha }}
# ___ _ _ ___ _ _
# / __| __ _ _ _ (_) |_ _ _ / __| |_ ___ __| |__
# \__ \/ _` | ' \| | _| || | | (__| ' \/ -_) _| / /
# |___/\__,_|_||_|_|\__|\_, | \___|_||_\___\__|_\_\
# |__/
# ascii art small font from https://ascii.co.uk/text
# "sanity_check" tests -Dusethreads without -DDEBUGGING
# "linux-i386" tests -Uusethreads without -DDEBUGGING
# All builds in the "linux" matrix test with -DDEBUGGING
#
# "sanity_check" sets `fetch-depth: 0` so that it does a git clone
# with full history, and hence can run t/porting/cmp_version.t etc
#
# The git-related tests require full history, but we only need to run
# them once (they aren't platform specific). Hence leave the others
# with the default setting (1), which performs a shallow clone. In
# these shallow checkouts, the git related porting tests skip (or
# rapidly pass), but they won't fail spuriously.
#
# TODO - Now that we do not use secrets and instead use vars for the
# control of which tests we run (due to the way secrets are elided
# from the output), we can simplify the shell code below. The
# following url includes discussion on what next steps we could take
# to simplify the complexity of this code.
#
# https://github.com/Perl/perl5/pull/20845#issuecomment-1440676127
#
sanity_check:
name: "Sanity: Linux -Dusethreads"
runs-on: ubuntu-latest
timeout-minutes: 120
outputs:
run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }}
ci_force_linux: ${{ steps.ci_config.outputs.ci_force_linux }}
ci_force_linux_i386: ${{ steps.ci_config.outputs.ci_force_linux_i386 }}
ci_force_install: ${{ steps.ci_config.outputs.ci_force_install }}
ci_force_macos: ${{ steps.ci_config.outputs.ci_force_macos }}
ci_force_msvc142: ${{ steps.ci_config.outputs.ci_force_msvc142 }}
ci_force_mingw64: ${{ steps.ci_config.outputs.ci_force_mingw64 }}
ci_force_cygwin: ${{ steps.ci_config.outputs.ci_force_cygwin }}
ci_force_minitest: ${{ steps.ci_config.outputs.ci_force_minitest }}
ci_force_asan: ${{ steps.ci_config.outputs.ci_force_asan }}
ci_force_perl_unicode: ${{ steps.ci_config.outputs.ci_force_perl_unicode }}
ci_force_dist_modules: ${{ steps.ci_config.outputs.ci_force_dist_modules }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Check what-to-do
id: ci_config
env:
CI_SKIP_SANITY: ${{ vars.CI_SKIP_SANITY }}
CI_FORCE_LINUX: ${{ vars.CI_FORCE_LINUX }}
CI_FORCE_LINUX_I386: ${{ vars.CI_FORCE_LINUX_I386 }}
CI_FORCE_INSTALL: ${{ vars.CI_FORCE_INSTALL }}
CI_FORCE_MACOS: ${{ vars.CI_FORCE_MACOS }}
CI_FORCE_MSVC142: ${{ vars.CI_FORCE_MSVC142 }}
CI_FORCE_MINGW64: ${{ vars.CI_FORCE_MINGW64 }}
CI_FORCE_CYGWIN: ${{ vars.CI_FORCE_CYGWIN }}
CI_FORCE_MINITEST: ${{ vars.CI_FORCE_MINITEST }}
CI_FORCE_ASAN: ${{ vars.CI_FORCE_ASAN }}
CI_FORCE_PERL_UNICODE: ${{ vars.CI_FORCE_PERL_UNICODE }}
CI_FORCE_DIST_MODULES: ${{ vars.CI_FORCE_DIST_MODULES }}
run: |
echo '::echo::on'
[[ -n "${CI_SKIP_SANITY}" ]] && [[ "${CI_SKIP_SANITY%[!0 ]*}" != "${CI_SKIP_SANITY}" ]] && echo "ci_skip_sanity=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_LINUX}" ]] && [[ "${CI_FORCE_LINUX%[!0 ]*}" != "${CI_FORCE_LINUX}" ]] && echo "ci_force_linux=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_LINUX_I386}" ]] && [[ "${CI_FORCE_LINUX_I386%[!0 ]*}" != "${CI_FORCE_LINUX_I386}" ]] && echo "ci_force_linux_i386=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_INSTALL}" ]] && [[ "${CI_FORCE_INSTALL%[!0 ]*}" != "${CI_FORCE_INSTALL}" ]] && echo "ci_force_install=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_MACOS}" ]] && [[ "${CI_FORCE_MACOS%[!0 ]*}" != "${CI_FORCE_MACOS}" ]] && echo "ci_force_macos=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_MSVC142}" ]] && [[ "${CI_FORCE_MSVC142%[!0 ]*}" != "${CI_FORCE_MSVC142}" ]] && echo "ci_force_msvc142=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_MINGW64}" ]] && [[ "${CI_FORCE_MINGW64%[!0 ]*}" != "${CI_FORCE_MINGW64}" ]] && echo "ci_force_mingw64=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_CYGWIN}" ]] && [[ "${CI_FORCE_CYGWIN%[!0 ]*}" != "${CI_FORCE_CYGWIN}" ]] && echo "ci_force_cygwin=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_MINITEST}" ]] && [[ "${CI_FORCE_MINITEST%[!0 ]*}" != "${CI_FORCE_MINITEST}" ]] && echo "ci_force_minitest=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_ASAN}" ]] && [[ "${CI_FORCE_ASAN%[!0 ]*}" != "${CI_FORCE_ASAN}" ]] && echo "ci_force_asan=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_PERL_UNICODE}" ]] && [[ "${CI_FORCE_PERL_UNICODE%[!0 ]*}" != "${CI_FORCE_PERL_UNICODE}" ]] && echo "ci_force_perl_unicode=true" >> "$GITHUB_OUTPUT"
[[ -n "${CI_FORCE_DIST_MODULES}" ]] && [[ "${CI_FORCE_DIST_MODULES%[!0 ]*}" != "${CI_FORCE_DIST_MODULES}" ]] && echo "ci_force_dist_modules=true" >> "$GITHUB_OUTPUT"
echo '::echo::off'
- name: Install System dependencies
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
with:
fetch-depth: 0
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
- name: git cfg
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
run: |
git config diff.renameLimit 999999
- name: Configure
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
run: |
./Configure -des -Dusedevel ${CONFIGURE_ARGS} -Dprefix="$HOME/perl-blead"
env:
CONFIGURE_ARGS: "-Dusethreads"
- name: Build
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
id: build
run: |
make -j2 test_prep
- name: Show Config
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
run: |
./perl -Ilib -V
./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests (excluding t/porting)
if: steps.ci_config.outputs.ci_skip_sanity != 'true'
run: |
TEST_JOBS=2 ./perl t/harness -nre='^porting/'
# Set a variable for dependent jobs to signal if full testsuite is enabled
- name: "Check if DO_EXTENDED_TESTING is set"
id: check_extended_testing
env:
DO_EXTENDED_TESTING: ${{ vars.DO_EXTENDED_TESTING }}
CURRENT_REPOSITORY: ${{ github.repository }}
run: |
if [[ "${CURRENT_REPOSITORY}" = 'Perl/perl5' ]]; then
echo "Running all test jobs"
echo "run_all_jobs=true" >> "$GITHUB_OUTPUT"
elif [[ -n "${DO_EXTENDED_TESTING}" ]] && [[ "${DO_EXTENDED_TESTING%[!0 ]*}" != "${DO_EXTENDED_TESTING}" ]]; then
echo "Running all test jobs"
echo "run_all_jobs=true" >> "$GITHUB_OUTPUT"
else
echo "Skipping extended test jobs."
echo "run_all_jobs=false" >> "$GITHUB_OUTPUT"
fi
- name: Run Porting Tests (t/porting)
if: (! cancelled() && steps.ci_config.outputs.ci_skip_sanity != 'true' && steps.build.outcome == 'success')
run: |
TEST_JOBS=2 ./perl t/harness -re='^porting/'
# _ _
# | (_)_ _ _ ___ __
# | | | ' \ || \ \ /
# |_|_|_||_\_,_/_\_\
linux:
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_linux == 'true'))
strategy:
fail-fast: false
matrix:
# exercise a variety of build options
# threads often cause build issues
CONFIGURE_ARGS:
- "-Uusethreads"
#- "-Dusethreads" # already tested above by sanity_check
#- "-Duseshrplib -Dusesitecustomize -Duselongdouble" # tested below by install
- "-Duseshrplib -Dusequadmath -Dusecbacktrace -Dusethreads"
- "-Duserelocatableinc"
- "-Dcc='clang'"
- "-Dcc='g++'"
- "-Accflags=-DSILENT_NO_TAINT_SUPPORT"
- "-Accflags=-DNO_TAINT_SUPPORT"
- "-DDEBUGGING -Accflags=-DPERL_RC_STACK"
- "-Uusedl"
steps:
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: Configure
run: |
./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead" -DDEBUGGING
- name: Build
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2 test_prep
- name: Show Config
run: |
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
run: |
LD_LIBRARY_PATH=`pwd` MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 ./perl t/harness
- name: git clean
run: |
git clean -dxf
- name: manicheck
run: |
perl Porting/manicheck --exitstatus
# _ _ _ _____ ___ __
# | (_)_ __ _ ___ __ (_)___ / ( _ ) / /_
# | | | '_ \| | | \ \/ /____| | |_ \ / _ \| '_ \
# | | | | | | |_| |> <_____| |___) | (_) | (_) |
# |_|_|_| |_|\__,_/_/\_\ |_|____/ \___/ \___/
linux-i386:
name: "linux i386/ubuntu"
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_linux_i386 == 'true'))
# https://hub.docker.com/r/i386/ubuntu/
container:
image: i386/ubuntu:latest
strategy:
fail-fast: false
matrix:
CONFIGURE_ARGS:
- "-Dusedevel"
steps:
- name: Install System dependencies
run: |
apt-get update
apt-get install -y build-essential git-core libgdbm-dev libdb-dev
# actions/checkout@v2 and higher don't work in a i386 container:
# the GitHub runner uses `node` that is installed on the host inside the container.
# The host is (likely) running x86_64 and using a binary build for x86_64 inside a
# i386 container just doesn't work.
# Upstream reports:
# - https://github.com/actions/checkout/issues/334#issuecomment-1241306390
# - https://github.com/actions/runner/issues/2115
#
# actions/checkout@v1 does work inside a container but that doesn't work
# so well with a shallow clone (`fetch-depth: 1`). It contains a race condition
# and makes it impossible to re-run an older job.
# Upstream report:
# - https://github.com/actions/runner/issues/2357
- name: Clone repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git init
git remote add origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
git config --local gc.auto 0
git fetch origin --depth=1 "$GITHUB_SHA"
git checkout "$GITHUB_SHA"
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: Configure
run: |
./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
- name: Build
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2
- name: Show Config
run: |
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
# Leaving this as `make test` so that we test the `test` target on regular
# Linux.
# linux-i386 is just one job (not a matrix)
- name: Run Tests
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2 test
# _ _ _ _ _
# _ __ ___ __ _| | _____ (_)_ __ ___| |_ __ _| | |
# | '_ ` _ \ / _` | |/ / _ \ | | '_ \/ __| __/ _` | | |
# | | | | | | (_| | < __/ | | | | \__ \ || (_| | | |
# |_| |_| |_|\__,_|_|\_\___| |_|_| |_|___/\__\__,_|_|_|
install:
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_install == 'true'))
steps:
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: Configure
run: |
./Configure -des -Dusedevel -Duseshrplib -Dusesitecustomize -Duselongdouble -Dprefix="$HOME/perl-blead" -DDEBUGGING
- name: Build
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make -j2
- name: Show Config
run: |
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -V
LD_LIBRARY_PATH=`pwd` ./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 make -j2 test_harness
- name: Install
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 TEST_JOBS=2 make -j2 install
# This will only pass if libperl.so and Config.pm are correctly installed:
- name: Show Install
run: |
./perl -V
# This can't run in parallel
- name: distclean
run: |
MALLOC_PERTURB_=254 MALLOC_CHECK_=3 make distclean
- name: manicheck
run: |
perl Porting/manicheck --exitstatus
# ___ ___
# _ __ __ _ __ / _ \/ __|
# | ' \/ _` / _| (_) \__ \
# |_|_|_\__,_\__|\___/|___/
smoke-macos-14:
name: "macOS (Sonoma) 14"
runs-on: macos-14
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_macos == 'true'))
strategy:
fail-fast: false
matrix:
CONFIGURE_ARGS:
- "-Uusethreads"
- "-Duseithreads -Duseshrplib"
steps:
- uses: actions/checkout@v4
- name: Configure
run: |
sh ./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }}
- name: Build
run: |
make -j2 test_prep
- name: Show Config
run: |
./perl -Ilib -V
./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
run: |
TEST_JOBS=2 ./perl t/harness
# _ _
# __ __ _(_)_ _ __| |_____ __ _____
# \ V V / | ' \/ _` / _ \ V V (_-<
# \_/\_/|_|_||_\__,_\___/\_/\_//__/
windows-msvc142:
name: "Windows msvc142"
runs-on: windows-2019
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_msvc142 == 'true'))
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
#- name: Install clcache
# shell: cmd
# run: |
# curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache.4.2.0.nupkg --output clcache.4.2.0.nupkg
# choco install clcache --source=.
#- name: find home directory
# shell: cmd
# run: |
# set
#- name: C compiler cache
# id: clcache
# uses: actions/cache@v1
# with:
# path: $HOME\clcache
# key: ${{ runner.os }}-x64
#- name: Set up Perl build environment
# # pushd "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
# # for /f "delims=" %%x in ('.\vswhere.exe -latest -property InstallationPath') do set VSPATH=%%x
# # popd
# # call "%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
# #run: |
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd win32
nmake CCTYPE=MSVC142 CFG=Debug
- name: Show Config
shell: cmd
run: |
.\perl.exe -V
.\perl.exe -e "use Config; print Config::config_sh"
- name: Run Tests
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd win32
nmake CCTYPE=MSVC142 CFG=Debug test
# _ __ _ _
# _ __ ___ (_)_ __ __ ___ __/ /_ | || |
# | '_ ` _ \| | '_ \ / _` \ \ /\ / / '_ \| || |_
# | | | | | | | | | | (_| |\ V V /| (_) |__ _|
# |_| |_| |_|_|_| |_|\__, | \_/\_/ \___/ |_|
# |___/
mingw64:
name: "Windows mingw64"
runs-on: windows-2019
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_mingw64 == 'true'))
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Install mingw-64
run: |
mkdir C:\perl_ci && cd C:\perl_ci
curl -L https://github.com/brechtsanders/winlibs_mingw/releases/download/13.1.0-16.0.5-11.0.0-ucrt-r5/winlibs-x86_64-posix-seh-gcc-13.1.0-mingw-w64ucrt-11.0.0-r5.zip -o mingw.zip
$expected_hash = '418E8A0175640E617EC6F6639BCA8D3AEDDB6A108391EAF312D1351D19375958'
$file_hash = (Get-FileHash mingw.zip -Algorithm SHA256).Hash
if ($file_hash -ne $expected_hash) {
throw "Wrong hash. Got ${file_hash}, expected ${expected_hash}"
}
tar -xf mingw.zip && rm mingw.zip
copy mingw64\bin\mingw32-make.exe mingw64\bin\gmake.exe
echo 'C:\perl_ci\mingw64\bin' >> $env:GITHUB_PATH
- name: Host perl -V
run: |
perl -V
- name: gcc --version
run: gcc --version
- name: Build
shell: cmd
run: |
cd win32
gmake CCHOME=C:\perl_ci\mingw64 CFG=Debug -f GNUMakefile -j2
- name: Show Config
shell: cmd
run: |
.\perl.exe -V
.\perl.exe -e "use Config; print Config::config_sh"
- name: Run Tests
shell: cmd
run: |
cd win32
set HARNESS_OPTIONS=j2
gmake CCHOME=C:\perl_ci\mingw64 CFG=Debug -f GNUMakefile test
# _
# ___ _ _ __ ___ _(_)_ __
# / __| | | |/ _` \ \ /\ / / | '_ \
# | (__| |_| | (_| |\ V V /| | | | |
# \___|\__, |\__, | \_/\_/ |_|_| |_|
# |___/ |___/
cygwin:
name: "cygwin"
runs-on: windows-2019
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_cygwin == 'true'))
steps:
# we use Cygwin git, so no need to configure git here.
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@v3
with:
packages: >
cygwin-devel gcc-core gcc-g++ make w32api-headers binutils libtool
git ccache libgdbm-devel libdb-devel
install-dir: ${{ github.workspace }}\cygwin
- name: Check out using Cygwin git, to ensure correct file permissions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PATH: /usr/bin:/bin
SHELLOPTS: igncr
shell: sh
run: |
git config --global core.autocrlf false
mkdir -p ~
cd ~
git init work
cd work
git remote add origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
git config --local gc.auto 0
git fetch origin --depth=1 "$GITHUB_SHA"
git checkout "$GITHUB_SHA"
- name: Configure
shell: sh
env:
PATH: /usr/bin:/bin
SHELLOPTS: igncr
run: |
cd ~/work
set +e
./Configure -des -Dusedevel -Doptimize=-g -DDEBUGGING -Astatic_ext=I18N/Langinfo || exit 1
- name: Build
shell: sh
env:
PATH: /usr/bin:/bin
SHELLOPTS: igncr
run: |
cd ~/work
make -j2 test_prep
- name: Show Config
shell: sh
env:
PATH: /usr/bin:/bin
SHELLOPTS: igncr
run: |
cd ~/work
./perl -Ilib -V
./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
shell: sh
env:
PATH: /usr/bin:/bin
SHELLOPTS: igncr
# Descend far enough down the cygwin yak warren, and one discovers that
# hints/cygwin.sh sets ldlibpthname=PATH
# Meaning that the Makefile variable LDLIBPTH is "PATH=..."
# Meaning that the command to invoke ./runtests is PATH=... ./perl.exe
# *Not* LD_LIBRARY_PATH or anything conventionally unix-like
#
# Cygwin is the slowest CI test. Breaking the abstractions described
# above/committing this DRY violation means that we avoid needing to
# `make -j2 test` to invoke t/TEST, and avoiding that likely saves us
# about 40 seconds, which is nearly 1% of the total wallclock time for
# complete all CI runs.
run: |
cd ~/work
PATH=`pwd`:.:$PATH TEST_JOBS=2 ./perl.exe t/harness
# _ _ _ _
# _ __ ___ (_)_ __ (_) |_ ___ ___| |_
# | '_ ` _ \| | '_ \| | __/ _ \/ __| __|
# | | | | | | | | | | | || __/\__ \ |_
# |_| |_| |_|_|_| |_|_|\__\___||___/\__|
miniperl:
name: "minitest"
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_minitest == 'true'))
outputs:
run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: manicheck
run: |
perl Porting/manicheck --exitstatus
- name: Configure
run: |
./Configure -des -Dusedevel -Dprefix="$HOME/perl-blead"
- name: Build
run: |
make -j2 minitest_prep
- name: Show Config
run: |
./miniperl -Ilib -V
./miniperl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
run: |
make minitest_notty
# _ ____ _ _ _
# / \ / ___| / \ | \ | |
# / _ \ \___ \ / _ \ | \| |
# / ___ \ ___) / ___ \| |\ |
# /_/ \_\____/_/ \_\_| \_|
# Life is pain, highness. Anyone who says differently is selling something.
ASAN:
name: "ASAN"
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_asan == 'true'))
strategy:
matrix:
# -DPURIFY disables arenas and mallocs everything individually. With
# ASAN or similar it's the real torture test. However, we also need to
# test that the arena code doesn't have any goofs.
CONFIGURE_ARGS:
- "-Accflags=-DPURIFY"
- "-DDEBUGGING"
- "-Dusethreads"
steps:
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: Configure
run: |
./Configure -des -Dusedevel -Dcc="clang -fsanitize=address" -Dld="clang -fsanitize=address" ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
- name: Build
run: |
PERL_DESTRUCT_LEVEL=2 make -j2 test_prep
- name: Show Config
run: |
ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -V
ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
# LeakSanitizer is disabled because it randomly crashes, see [gh #19189]
run: |
ASAN_OPTIONS=detect_leaks=0 PERL_DESTRUCT_LEVEL=2 TEST_JOBS=2 ./perl t/harness
# ____ _____ ____ _ _ _ _ _ ___ ____ ___ ____ _____
# | _ \| ____| _ \| | | | | | \ | |_ _/ ___/ _ \| _ \| ____|
# | |_) | _| | |_) | | | | | | \| || | | | | | | | | | _|
# | __/| |___| _ <| |___ | |_| | |\ || | |__| |_| | |_| | |___
# |_| |_____|_| \_\_____|___\___/|_| \_|___\____\___/|____/|_____|
# |_____|
# To the pain!
PERL_UNICODE:
name: "PERL_UNICODE"
runs-on: ubuntu-latest
timeout-minutes: 120
needs: sanity_check
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_perl_unicode == 'true'))
strategy:
matrix:
# There are many many combinations we *could* test. These two are likely
# to give the best overview - "basic sanity" and "everything maxed out"
CONFIGURE_ARGS:
- "-Uusethreads"
- "-Dusethreads -Accflags=-DPURIFY -Dcc='gcc -fsanitize=address' -Dld='gcc -fsanitize=address'"
steps:
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdbm-dev libdb-dev
- uses: actions/checkout@v4
- name: git cfg
run: |
git config diff.renameLimit 999999
- name: Show Locales
run: locale -a
- name: Configure
run: |
./Configure -des -Dusedevel ${{ matrix.CONFIGURE_ARGS }} -Dprefix="$HOME/perl-blead"
- name: Build
run: |
LC_ALL=en_US.UTF-8 PERL_UNICODE="" PERL_DESTRUCT_LEVEL=2 make -j2 test_prep
- name: Show Config
run: |
ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -V
ASAN_OPTIONS=detect_leaks=0 ./perl -Ilib -e 'use Config; print Config::config_sh'
- name: Run Tests
# LeakSanitizer is disabled because it randomly crashes, see [gh #19189]
run: |
ASAN_OPTIONS=detect_leaks=0 PERL_DESTRUCT_LEVEL=2 LC_ALL=en_US.UTF-8 PERL_UNICODE="" TEST_JOBS=2 ./perl t/harness
# _ _ _ _ _
# __| (_)___| |_ _ __ ___ ___ __| |_ _| | ___ ___
# / _` | / __| __|____| '_ ` _ \ / _ \ / _` | | | | |/ _ \/ __|
# | (_| | \__ \ ||_____| | | | | | (_) | (_| | |_| | | __/\__ \
# \__,_|_|___/\__| |_| |_| |_|\___/ \__,_|\__,_|_|\___||___/
dist-modules:
name: dist ${{ matrix.os.label }} ${{ matrix.perl-version }} ${{ matrix.threads.label }}
needs: sanity_check
runs-on: ${{ matrix.os.id }}
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_dist_modules == 'true'))
env:
# some plugins still needs this to run their tests...
# these don't really matter, but might later
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1
NO_NETWORK_TESTING: 1
strategy:
fail-fast: false
matrix:
# once some failures are resolved we may be able to add Windows to this
os:
- id: ubuntu-latest
label: Linux
perl-version:
- '5.38'
- '5.24'
- '5.10'
- '5.8'
threads:
- enable: true
label: -Dusethreads
- enable: false
label: -Uusethreads
steps:
- uses: actions/checkout@v4
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1.30.0
with:
perl-version: ${{ matrix.perl-version }}
multi-thread: ${{ matrix.threads.id }}
install-modules:
ExtUtils::MakeMaker
Perl::OSType
Scalar::Util
Socket
version
- name: perl -V
run: perl -V
- name: Build and test dist modules
run:
perl Porting/test-dist-modules.pl -continue
dist-modules-sys-macos:
name: "Test dist/ modules on MacOS system perl"
needs: sanity_check
runs-on: macos-latest
if: (! cancelled() && (needs.sanity_check.outputs.run_all_jobs == 'true' || needs.sanity_check.outputs.ci_force_dist_modules == 'true'))
env:
# some plugins still needs this to run their tests...
# these don't really matter, but might later
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1
NO_NETWORK_TESTING: 1
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: perl -V
run: /usr/bin/perl -V
- name: Build and test dist modules
run:
/usr/bin/perl Porting/test-dist-modules.pl -continue