This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 2f9f8a599253a21c0b53548131e5f4ff13bdae08
Author: Robert Lazarski <[email protected]>
AuthorDate: Mon Apr 13 06:17:19 2026 -1000

    RAMPART-454 Align GitHub Actions CI with axis2-java-core
    
    Adopt the same three-job layout that axis2-java-core uses (build / site /
    deploy) and bring the runner/action versions in line:
    
    - Build matrix: Java 17, 21, 25 (was 17, 19), matching the JDK set that
      the 2.0.0 release is supported on. Each matrix entry runs
      -Dmaven.compiler.release=${{ matrix.java }} so the class file target
      actually tracks the JDK under test, not just the baseline.
    - runs-on: ubuntu-24.04 (was 22.04).
    - Actions: checkout@v6, cache@v5, setup-java@v5.
    - Java distribution: temurin (was zulu); centralised via
      DEFAULT_JAVA_DISTRIBUTION env var.
    - Add BASE_JAVA_VERSION=17 env var for the non-matrix jobs.
    
    New Site job: runs mvn package site-deploy on JDK 17 so that site
    regressions (e.g. the javadoc / apidocs aggregator classpath) are caught
    in CI instead of on release day.
    
    New Deploy job: gated on push-to-master for the apache/axis-axis2-java-
    rampart repository only, needs both build and site to be green, and
    pushes SNAPSHOTs to apache.snapshots.https using the NEXUS_USER /
    NEXUS_PW secrets (same mechanism as axis2-java-core).
    
    Every job ends by deleting -SNAPSHOT entries from the local Maven cache
    so they aren't inadvertently reused between runs when the cache key
    matches but the dependency tree has moved underneath.
---
 .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 65 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0de17a78..338a5c97 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,20 +22,21 @@ on:
 
 env:
   MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 
-Dmaven.wagon.http.retryHandler.count=3
-
+  BASE_JAVA_VERSION: 17
+  DEFAULT_JAVA_DISTRIBUTION: 'temurin'
 jobs:
   build:
     strategy:
       fail-fast: false
       matrix:
-        java: [ 17, 19 ]
+        java: [ 17, 21, 25 ]
     name: "Java ${{ matrix.java }}"
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     steps:
     - name: Checkout
-      uses: actions/checkout@v4
+      uses: actions/checkout@v6
     - name: Cache Maven Repository
-      uses: actions/cache@v4
+      uses: actions/cache@v5
       with:
         path: ~/.m2/repository
         key: maven-java-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
@@ -43,11 +44,67 @@ jobs:
           maven-java-${{ matrix.java }}-
           maven-
     - name: Set up Java
-      uses: actions/setup-java@v4
+      uses: actions/setup-java@v5
       with:
-        distribution: 'zulu'
         java-version: ${{ matrix.java }}
+        distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
+    - name: Build
+      run: mvn -B -e -Papache-release -Dgpg.skip=true 
-Dmaven.compiler.release=${{ matrix.java }} verify
+    - name: Remove Snapshots
+      run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs 
-0 rm -rf
+  site:
+    name: Site
+    runs-on: ubuntu-24.04
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v6
+    - name: Cache Maven Repository
+      uses: actions/cache@v5
+      with:
+        path: ~/.m2/repository
+        key: maven-site-${{ hashFiles('**/pom.xml') }}
+        restore-keys: |
+          maven-site-
+          maven-
+    - name: Set up Java
+      uses: actions/setup-java@v5
+      with:
+        java-version: ${{ env.BASE_JAVA_VERSION }}
+        distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
     - name: Build
-      run: mvn -B -e -Papache-release -Dgpg.skip=true verify
+      run: mvn -B -e -Dmaven.test.skip=true -Dmaven.compiler.release=${{ 
env.BASE_JAVA_VERSION }} package site-deploy
+    - name: Remove Snapshots
+      run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs 
-0 rm -rf
+  deploy:
+    if: github.event_name == 'push' && github.ref == 'refs/heads/master' && 
github.repository == 'apache/axis-axis2-java-rampart'
+    name: Deploy
+    runs-on: ubuntu-24.04
+    needs:
+      - build
+      - site
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v6
+    - name: Cache Maven Repository
+      uses: actions/cache@v5
+      with:
+        path: ~/.m2/repository
+        key: maven-deploy-${{ hashFiles('**/pom.xml') }}
+        restore-keys: |
+          maven-deploy-
+          maven-
+    - name: Set up Java
+      uses: actions/setup-java@v5
+      with:
+        java-version: ${{ env.BASE_JAVA_VERSION }}
+        distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
+        server-id: apache.snapshots.https
+        server-username: NEXUS_USER
+        server-password: NEXUS_PW
+    - name: Deploy
+      run: mvn -B -e -Papache-release -Dgpg.skip=true -Dmaven.test.skip=true 
-Dmaven.compiler.release=${{ env.BASE_JAVA_VERSION }} deploy
+      env:
+        NEXUS_USER: ${{ secrets.NEXUS_USER }}
+        NEXUS_PW: ${{ secrets.NEXUS_PW }}
     - name: Remove Snapshots
       run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs 
-0 rm -rf

Reply via email to