2828 required : false
2929env :
3030 FAIL_FAST : ${{ github.event_name == 'pull_request' }}
31+ BUILD_JAVA_VERSION : 8 # minimum version
32+ TEST_JAVA_VERSION : 17 # preferred version
3133 MAVEN_OPTS : -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
32- OZONE_WITH_COVERAGE : ${{ github.repository == 'apache/ozone' && github. event_name == 'push' }}
34+ OZONE_WITH_COVERAGE : ${{ github.event_name == 'push' }}
3335jobs :
3436 build-info :
3537 runs-on : ubuntu-20.04
@@ -104,7 +106,7 @@ jobs:
104106 if : needs.build-info.outputs.needs-build == 'true'
105107 strategy :
106108 matrix :
107- java : [ 8 ]
109+ java : [ 8, 17 ]
108110 fail-fast : false
109111 steps :
110112 - name : Checkout project
@@ -148,19 +150,21 @@ jobs:
148150 - name : Store binaries for tests
149151 uses : actions/upload-artifact@v4
150152 with :
151- name : ozone-bin
153+ name : ozone-bin-${{ matrix.java }}
152154 path : |
153155 hadoop-ozone/dist/target/ozone-*.tar.gz
154156 !hadoop-ozone/dist/target/ozone-*-src.tar.gz
155157 retention-days : 1
156158 - name : Store source tarball for compilation
157159 uses : actions/upload-artifact@v4
160+ if : ${{ matrix.java == env.BUILD_JAVA_VERSION }}
158161 with :
159162 name : ozone-src
160163 path : hadoop-ozone/dist/target/ozone-*-src.tar.gz
161164 retention-days : 1
162165 - name : Store Maven repo for tests
163166 uses : actions/upload-artifact@v4
167+ if : ${{ matrix.java == env.BUILD_JAVA_VERSION }}
164168 with :
165169 name : ozone-repo
166170 path : |
@@ -344,7 +348,7 @@ jobs:
344348 - name : Download compiled Ozone binaries
345349 uses : actions/download-artifact@v4
346350 with :
347- name : ozone-bin
351+ name : ozone-bin-${{ env.BUILD_JAVA_VERSION }}
348352 - name : Untar binaries
349353 run : |
350354 mkdir dist
@@ -421,8 +425,14 @@ jobs:
421425 ref : ${{ needs.build-info.outputs.sha }}
422426 - name : Download compiled Ozone binaries
423427 uses : actions/download-artifact@v4
428+ if : ${{ matrix.suite }} == 'MR' # until HDDS-11053 is fixed
424429 with :
425- name : ozone-bin
430+ name : ozone-bin-${{ env.BUILD_JAVA_VERSION }}
431+ - name : Download compiled Ozone binaries
432+ uses : actions/download-artifact@v4
433+ if : ${{ matrix.suite }} != 'MR'
434+ with :
435+ name : ozone-bin-${{ env.TEST_JAVA_VERSION }}
426436 - name : Untar binaries
427437 run : |
428438 mkdir -p hadoop-ozone/dist/target
@@ -465,7 +475,7 @@ jobs:
465475 - name : Download compiled Ozone binaries
466476 uses : actions/download-artifact@v4
467477 with :
468- name : ozone-bin
478+ name : ozone-bin-${{ env.BUILD_JAVA_VERSION }}
469479 - name : Untar binaries
470480 run : |
471481 mkdir -p hadoop-ozone/dist/target
@@ -529,11 +539,11 @@ jobs:
529539 name : ratis-jars
530540 path : |
531541 ~/.m2/repository/org/apache/ratis
532- - name : Setup java
542+ - name : Setup java ${{ env.TEST_JAVA_VERSION }}
533543 uses : actions/setup-java@v4
534544 with :
535545 distribution : ' temurin'
536- java-version : 17
546+ java-version : ${{ env.TEST_JAVA_VERSION }}
537547 - name : Execute tests
538548 continue-on-error : true
539549 run : |
@@ -558,7 +568,7 @@ jobs:
558568 coverage :
559569 runs-on : ubuntu-20.04
560570 timeout-minutes : 30
561- if : github.repository == 'apache/ozone' && github. event_name == 'push'
571+ if : github.event_name == 'push'
562572 needs :
563573 - build-info
564574 - acceptance
@@ -586,16 +596,17 @@ jobs:
586596 - name : Untar binaries
587597 run : |
588598 mkdir -p hadoop-ozone/dist/target
589- tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C hadoop-ozone/dist/target
590- - name : Calculate combined coverage
591- run : ./hadoop-ozone/dev-support/checks/coverage.sh
592- - name : Setup java 17
599+ tar xzvf target/artifacts/ozone-bin-${{ env.TEST_JAVA_VERSION }}/ozone*.tar.gz -C hadoop-ozone/dist/target
600+ - name : Setup java ${{ env.TEST_JAVA_VERSION }}
593601 uses : actions/setup-java@v4
594602 with :
595603 distribution : ' temurin'
596- java-version : 17
604+ java-version : ${{ env.TEST_JAVA_VERSION }}
605+ - name : Calculate combined coverage
606+ run : ./hadoop-ozone/dev-support/checks/coverage.sh
597607 - name : Upload coverage to Sonar
598608 run : ./hadoop-ozone/dev-support/checks/sonar.sh
609+ if : github.repository == 'apache/ozone'
599610 env :
600611 SONAR_TOKEN : ${{ secrets.SONARCLOUD_TOKEN }}
601612 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments