tkobayas commented on code in PR #6860:
URL: https://github.com/apache/incubator-kie/pull/6860#discussion_r3794126706


##########
.github/workflows/ci.yaml:
##########
@@ -61,110 +63,82 @@ jobs:
             java: 17
           - os: macos-latest
             java: 21
-
     steps:
-      - name: 'SETUP :: Set paths for temporary files'
-        shell: bash
-        run: |
-          echo "CHANGED_FILES_FILE=${{ runner.temp }}/changed-files.txt" >> 
"$GITHUB_ENV"
-          echo "MAVEN_PL_AFFECTED_FILE=${{ runner.temp 
}}/maven-pl-affected.txt" >> "$GITHUB_ENV"
-          echo "MAVEN_PL_UPSTREAM_FILE=${{ runner.temp 
}}/maven-pl-upstream.txt" >> "$GITHUB_ENV"
-          echo "MAVEN_PL_CHANGED_FILE=${{ runner.temp }}/maven-pl-changed.txt" 
>> "$GITHUB_ENV"
-          echo "DEP_GRAPH_EXTRACTOR__OUTPUT_FILE=${{ runner.temp 
}}/dep-graph.tsv" >> "$GITHUB_ENV"
-          touch "${{ runner.temp }}/changed-files.txt"
-          touch "${{ runner.temp }}/maven-pl-affected.txt"
-          touch "${{ runner.temp }}/maven-pl-upstream.txt"
-          touch "${{ runner.temp }}/maven-pl-changed.txt"
-
-      - name: 'SETUP :: Free disk space (Ubuntu)'
-        if: runner.os == 'Linux'
-        shell: bash
-        run: |
-          sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
-          df -h
-
-      - name: 'SETUP :: Enable long file paths (Windows)'
-        if: runner.os == 'Windows'
-        shell: pwsh
-        run: |
-          git config --system core.longpaths true
-          reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v 
LongPathsEnabled /t REG_DWORD /d 1 /f
-
       - name: "SETUP :: Checkout to load local actions"
         uses: actions/checkout@v7
 
-      - name: "SETUP :: Checkout @ Simulated squashed-merge if PR, else 
checkout current commit"
-        id: checkout_pr
-        uses: ./.github/actions/checkout-pr
-        with:
-          ref: ${{ github.base_ref }}
-
-      - uses: actions/setup-java@v5
-        name: 'SETUP :: Java ${{ matrix.java }}'
+      - uses: ./.github/actions/ci-setup
         with:
+          ref: ${{ github.ref }}
           java-version: ${{ matrix.java }}
-          distribution: temurin
-          cache: maven
 
-      # Temporary workaround while jbangdev/setup-jbang action doesn't include 
checksum verification.
-      # See https://github.com/apache/infrastructure-actions/pull/806
-      - name: 'SETUP :: Install JBang'
+      - name: "CI :: BUILD :: Full"
         shell: bash
-        run: |
-          curl -sL 
https://github.com/jbangdev/jbang/releases/download/v0.138.0/jbang-0.138.0.zip 
-o jbang.zip
-          echo 
"3c9fb9ac5823ae5ab9d136dec08b896e2a0f6f6b313689b21f43c511b7c34b85  jbang.zip" | 
sha256sum -c -
-          unzip -q jbang.zip
-          echo "${{ github.workspace }}/jbang-0.138.0/bin" >> $GITHUB_PATH
+        run: mvn --batch-mode --no-transfer-progress -fae 
-Dsurefire.redirectTestOutputToFile=true -Dfull -Dreproducible install
 
-      - name: 'SETUP :: Block apache.snapshots Maven repository'
-        shell: bash
-        run: |
-          mkdir -p "$HOME/.m2"
-          cat > "$HOME/.m2/settings.xml" <<'EOF'
-          <settings xmlns="http://maven.apache.org/SETTINGS/1.2.0";
-                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-                    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 
https://maven.apache.org/xsd/settings-1.2.0.xsd";>
-            <mirrors>
-              <mirror>
-                <id>block-apache-snapshots</id>
-                
<mirrorOf>apache.snapshots,apache-snapshot-repository</mirrorOf>
-                <url>https://repository.apache.org/snapshots/</url>
-                <blocked>true</blocked>
-              </mirror>
-            </mirrors>
-          </settings>
-          EOF
-
-      # Three-dot diff (A...B = diff B against the merge-base of A and B)
-      # gives exactly the files changed in this PR branch.
-      - name: 'SETUP :: Collect changed files'
-        if: github.event_name == 'pull_request'
+      - name: 'SUMMARY :: Publish'
+        if: always()
         shell: bash
         env:
-          BASE_REF: origin/${{ github.base_ref }}
+          MERMAID_EXPANDED: ${{ matrix.os == 'ubuntu-latest' && matrix.java == 
21 }}
+          MATRIX_OS: ${{ matrix.os }}
+          MATRIX_JAVA: ${{ matrix.java }}
         run: |
-          git diff --name-only "${BASE_REF}...HEAD" > "$CHANGED_FILES_FILE"
-          echo "Changed files:"
-          cat "$CHANGED_FILES_FILE"
+          MAVEN_PL_AFFECTED=$(paste -sd, "$MAVEN_PL_AFFECTED_FILE" 2>/dev/null 
|| true) \
+          MAVEN_PL_UPSTREAM=$(paste -sd, "$MAVEN_PL_UPSTREAM_FILE" 2>/dev/null 
|| true) \
+          MAVEN_PL_CHANGED=$(paste -sd, "$MAVEN_PL_CHANGED_FILE" 2>/dev/null 
|| true) \
+          jbang script/ci/CiSummary.java
 
-      - name: 'SETUP :: Compute build scopes'
-        if: github.event_name == 'pull_request'
-        shell: bash
-        run: |
-          jbang script/ci/CiComputeBuildScopes.java \
-            "$CHANGED_FILES_FILE" \
-            "$MAVEN_PL_UPSTREAM_FILE" \
-            "$MAVEN_PL_AFFECTED_FILE" \
-            "$MAVEN_PL_CHANGED_FILE"
+      - name: Upload Build logs
+        uses: actions/upload-artifact@v7
+        if: ${{ always() }}
+        with:
+          name: build-logs_${{ matrix.os }}_java-${{ matrix.java }}
+          path: '**/build.log'
+
+      - name: Upload Build Compare
+        uses: actions/upload-artifact@v7
+        if: ${{ always() }}
+        with:
+          name: build-compare_${{ matrix.os }}_java-${{ matrix.java }}
+          path: |
+            **/*.buildcompare
+            **/*.buildinfo
+
+  # PR builds split affected modules into 4 parallel test jobs by category:
+  #   test-drools, test-optaplanner, test-kogito-runtimes, test-kogito-apps
+  # Categories are derived from <!-- BEGIN/END xxx modules (auto) --> markers 
in
+  # the root pom.xml (see CiComputeBuildScopes.parseModuleCategories).
+  # Each job installs its upstream dependencies without tests, then runs tests
+  # for its own category only. Jobs with no affected modules skip entirely.
+
+  test-drools:
+    if: github.event.action != 'closed' && github.event_name == 'pull_request'
+    name: 'drools :: ${{ matrix.os }}, Java ${{ matrix.java }}'
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os:   [ubuntu-latest]
+        java: [17, 21]

Review Comment:
   In each parallel job, I don't use `exclude`, but exact `ubuntu-latest` and 
java `17` `21` for conciseness. This should be enhanced when we accept mac and 
windows.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to