65
65
THREADS_TEST_OPTIONS : " -s spec -b -p -P"
66
66
X86_32_TARGET_TEST_OPTIONS : " -m x86_32 -P"
67
67
WASI_TEST_OPTIONS : " -s wasi_certification -w"
68
- WAMR_COMPILER_TEST_OPTIONS : " -s wamr_compiler -b -P"
68
+ WAMR_COMPILER_TEST_OPTIONS : " -s wamr_compiler -S -b -P"
69
+ GC_TEST_OPTIONS : " -s spec -G -b -P"
69
70
70
71
jobs :
71
72
build_llvm_libraries_on_ubuntu_2204 :
@@ -484,6 +485,7 @@ jobs:
484
485
$SIMD_TEST_OPTIONS,
485
486
$THREADS_TEST_OPTIONS,
486
487
$WASI_TEST_OPTIONS,
488
+ $GC_TEST_OPTIONS,
487
489
]
488
490
wasi_sdk_release :
489
491
[
@@ -517,10 +519,25 @@ jobs:
517
519
test_option : $MULTI_MODULES_TEST_OPTIONS
518
520
- running_mode : " multi-tier-jit"
519
521
test_option : $SIMD_TEST_OPTIONS
522
+ # fast-jit and multi-tier-jit don't support GC
523
+ - running_mode : " fast-jit"
524
+ test_option : $GC_TEST_OPTIONS
525
+ - running_mode : " multi-tier-jit"
526
+ test_option : $GC_TEST_OPTIONS
520
527
steps :
521
528
- name : checkout
522
529
uses : actions/checkout@v4
523
530
531
+ - name : Set-up OCaml
532
+ uses : ocaml/setup-ocaml@v2
533
+ if : matrix.test_option == '$GC_TEST_OPTIONS'
534
+ with :
535
+ ocaml-compiler : 4.13
536
+
537
+ - name : Set-up Ocamlbuild
538
+ if : matrix.test_option == '$GC_TEST_OPTIONS'
539
+ run : opam install ocamlbuild dune
540
+
524
541
- name : download and install wasi-sdk
525
542
if : matrix.test_option == '$WASI_TEST_OPTIONS'
526
543
run : |
@@ -545,9 +562,9 @@ jobs:
545
562
546
563
- name : set env variable(if x86_32 test needed)
547
564
if : >
548
- (matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
549
- || matrix.test_option == '$WASI_TEST_OPTIONS')
550
- && matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit'
565
+ (( matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
566
+ || matrix.test_option == '$WASI_TEST_OPTIONS' || matrix.test_option == '$GC_TEST_OPTIONS ')
567
+ && matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit')
551
568
run : echo "TEST_ON_X86_32=true" >> $GITHUB_ENV
552
569
553
570
# only download llvm libraries in jit and aot mode
@@ -584,9 +601,18 @@ jobs:
584
601
585
602
- name : run tests
586
603
timeout-minutes : 30
604
+ if : matrix.test_option != '$GC_TEST_OPTIONS'
587
605
run : ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
588
606
working-directory : ./tests/wamr-test-suites
589
607
608
+ - name : run gc tests
609
+ timeout-minutes : 20
610
+ if : matrix.test_option == '$GC_TEST_OPTIONS'
611
+ run : |
612
+ eval $(opam env)
613
+ ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
614
+ working-directory : ./tests/wamr-test-suites
615
+
590
616
# only install x32 support libraries when to run x86_32 cases
591
617
- name : install x32 support libraries
592
618
if : env.TEST_ON_X86_32 == 'true'
@@ -600,10 +626,18 @@ jobs:
600
626
601
627
- name : run tests x86_32
602
628
timeout-minutes : 30
603
- if : env.TEST_ON_X86_32 == 'true'
629
+ if : env.TEST_ON_X86_32 == 'true' && matrix.test_option != '$GC_TEST_OPTIONS'
604
630
run : ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
605
631
working-directory : ./tests/wamr-test-suites
606
632
633
+ - name : run gc tests x86_32
634
+ timeout-minutes : 20
635
+ if : env.TEST_ON_X86_32 == 'true' && matrix.test_option == '$GC_TEST_OPTIONS'
636
+ run : |
637
+ eval $(opam env)
638
+ ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
639
+ working-directory : ./tests/wamr-test-suites
640
+
607
641
test-wamr-ide :
608
642
needs :
609
643
[
0 commit comments