This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 28ea4805a9 HDDS-11527. Avoid unnecessary duplicate build (#7270)
28ea4805a9 is described below
commit 28ea4805a9e1f376956f061c2184472a449ffcc4
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Oct 5 07:07:06 2024 +0200
HDDS-11527. Avoid unnecessary duplicate build (#7270)
---
.github/workflows/ci.yml | 43 ++++++++++++++++++-------------------------
1 file changed, 18 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8ecf5a76c6..860c14aedf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,8 +28,8 @@ on:
required: false
env:
FAIL_FAST: ${{ github.event_name == 'pull_request' }}
- BUILD_JAVA_VERSION: 8 # minimum version
- TEST_JAVA_VERSION: 17 # preferred version
+ # Minimum required Java version for running Ozone is defined in pom.xml
(javac.version).
+ TEST_JAVA_VERSION: 17 # JDK version used by CI build and tests; should match
the JDK version in apache/ozone-runner image
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.class=standard
-Dmaven.wagon.http.retryHandler.count=3
OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }}
jobs:
@@ -104,10 +104,6 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 60
if: needs.build-info.outputs.needs-build == 'true'
- strategy:
- matrix:
- java: [ 8, 17 ]
- fail-fast: false
steps:
- name: Checkout project
uses: actions/checkout@v4
@@ -138,11 +134,11 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- - name: Setup java
+ - name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
- java-version: ${{ matrix.java }}
+ java-version: ${{ env.TEST_JAVA_VERSION }}
- name: Run a full build
run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Psrc
-Dmaven.javadoc.skip=true ${{ inputs.ratis_args }}
env:
@@ -150,21 +146,19 @@ jobs:
- name: Store binaries for tests
uses: actions/upload-artifact@v4
with:
- name: ozone-bin-${{ matrix.java }}
+ name: ozone-bin
path: |
hadoop-ozone/dist/target/ozone-*.tar.gz
!hadoop-ozone/dist/target/ozone-*-src.tar.gz
retention-days: 1
- name: Store source tarball for compilation
uses: actions/upload-artifact@v4
- if: ${{ matrix.java == env.BUILD_JAVA_VERSION }}
with:
name: ozone-src
path: hadoop-ozone/dist/target/ozone-*-src.tar.gz
retention-days: 1
- name: Store Maven repo for tests
uses: actions/upload-artifact@v4
- if: ${{ matrix.java == env.BUILD_JAVA_VERSION }}
with:
name: ozone-repo
path: |
@@ -216,7 +210,7 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- - name: Setup java
+ - name: Setup java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
@@ -265,7 +259,7 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- - name: Setup java
+ - name: Setup java 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
@@ -313,11 +307,11 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- - name: Setup java
+ - name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
- java-version: 8
+ java-version: ${{ env.TEST_JAVA_VERSION }}
- name: Execute tests
run: hadoop-ozone/dev-support/checks/${{ github.job }}.sh ${{
inputs.ratis_args }}
continue-on-error: true
@@ -348,7 +342,7 @@ jobs:
- name: Download compiled Ozone binaries
uses: actions/download-artifact@v4
with:
- name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
+ name: ozone-bin
- name: Untar binaries
run: |
mkdir dist
@@ -392,6 +386,11 @@ jobs:
name: ozone-repo
path: |
~/.m2/repository/org/apache/ozone
+ - name: Setup java ${{ env.TEST_JAVA_VERSION }}
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: ${{ env.TEST_JAVA_VERSION }}
- name: Execute tests
run: |
hadoop-ozone/dev-support/checks/${{ github.job }}.sh
@@ -425,14 +424,8 @@ jobs:
ref: ${{ needs.build-info.outputs.sha }}
- name: Download compiled Ozone binaries
uses: actions/download-artifact@v4
- if: ${{ matrix.suite }} == 'MR' # until HDDS-11053 is fixed
- with:
- name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
- - name: Download compiled Ozone binaries
- uses: actions/download-artifact@v4
- if: ${{ matrix.suite }} != 'MR'
with:
- name: ozone-bin-${{ env.TEST_JAVA_VERSION }}
+ name: ozone-bin
- name: Untar binaries
run: |
mkdir -p hadoop-ozone/dist/target
@@ -475,7 +468,7 @@ jobs:
- name: Download compiled Ozone binaries
uses: actions/download-artifact@v4
with:
- name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
+ name: ozone-bin
- name: Untar binaries
run: |
mkdir -p hadoop-ozone/dist/target
@@ -596,7 +589,7 @@ jobs:
- name: Untar binaries
run: |
mkdir -p hadoop-ozone/dist/target
- tar xzvf target/artifacts/ozone-bin-${{ env.TEST_JAVA_VERSION
}}/ozone*.tar.gz -C hadoop-ozone/dist/target
+ tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C
hadoop-ozone/dist/target
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]