99permissions : read-all
1010
1111jobs :
12- build :
12+ test :
1313 runs-on : ubuntu-latest
1414 strategy :
15- # Some tests require more CPU, and all can use multiple CPUs
16- max-parallel : 1
17- name : Rhino Tests
15+ fail-fast : false
16+ matrix :
17+ include :
18+ - java-version : " 11"
19+ name : " Java 11"
20+ multithread : false
21+ - java-version : " 17"
22+ name : " Java 17"
23+ multithread : false
24+ - java-version : " 21"
25+ name : " Java 21"
26+ multithread : false
27+ - java-version : " 21"
28+ name : " Java 21 Multithreaded"
29+ multithread : true
30+ name : ${{ matrix.name }}
1831 steps :
1932 - name : Check out Rhino
2033 uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2
@@ -23,59 +36,42 @@ jobs:
2336 run : git submodule update --init --single-branch
2437 - name : Set up Java
2538 uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
26- # By putting JVMs in reverse order, the last one is the one that
27- # will go in the path.
2839 with :
2940 java-version : |
30- 11
31- 17
41+ ${{ matrix.java-version }}
3242 21
3343 distribution : ' adopt'
34- - name : Build and test Java 21
35- run : >-
36- ./gradlew check
37- - name : Upload results Java 21
38- uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
39- if : ${{ always() }}
40- with :
41- name : reports-java-21
42- path : ' */build/reports'
43- - name : Build and test Java 17
44+ - name : Build and test ${{ matrix.name }}
4445 env :
45- RHINO_TEST_JAVA_VERSION : " 17 "
46+ RHINO_TEST_JAVA_VERSION : ${{ matrix.java-version }}
4647 run : >-
47- ./gradlew check
48- - name : Upload results Java 17
48+ ./gradlew check ${{ matrix.multithread && '-Drhino.useThreadSafeObjectsByDefault=true' || '' }}
49+ - name : Upload results ${{ matrix.name }}
4950 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
5051 if : ${{ always() }}
5152 with :
52- name : reports-java-17
53+ name : reports-java-${{ matrix.java-version }}-${{ matrix.multithread }}
5354 path : ' */build/reports'
54- - name : Build and test Java 11
55- env :
56- RHINO_TEST_JAVA_VERSION : " 11"
57- run : >-
58- ./gradlew check
59- - name : Upload results Java 11
60- uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
61- if : ${{ always() }}
62- with :
63- name : reports-java-11
64- path : ' */build/reports'
65- - name : Build and test Java 21 - Multithread
66- timeout-minutes : 30
67- run : >-
68- ./gradlew check -Drhino.useThreadSafeObjectsByDefault=true
69- - name : Upload results Java 21 - Multithread
70- uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
71- if : ${{ always() }}
55+
56+ test262 :
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Check out Rhino
60+ uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2
61+ - name : Check out test262
62+ run : git submodule update --init --single-branch
63+ - name : Set up Java
64+ uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
7265 with :
73- name : reports-java-21-multithread
74- path : ' */build/reports'
66+ java-version : |
67+ 11
68+ 21
69+ distribution : ' adopt'
7570 - name : Check current state of test262.properties
7671 id : hashBefore
7772 run : echo "hash=${{ hashFiles('./tests/testsrc/test262.properties') }}" >> $GITHUB_OUTPUT
7873 - name : Run test262 tests
74+ # Currently Java 11 is required to have a reproducible result
7975 env :
8076 RHINO_TEST_JAVA_VERSION : " 11"
8177 run : >-
0 commit comments