Skip to content

Commit f517028

Browse files
committed
modularize connectors
1 parent b850208 commit f517028

File tree

6,334 files changed

+1190104
-37449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,334 files changed

+1190104
-37449
lines changed

.github/workflows/java.yml

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,87 @@
11
name: Java Main Workflow
22

33
on:
4-
pull_request:
5-
branches: [ master, rc-** ]
4+
# pull_request:
5+
# branches: [ master, rc-** ]
66

77
jobs:
8+
detect-targets:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
modified_targets: ${{ steps.filter.outputs.modified_targets }}
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 2
17+
18+
- name: Detect modified targets
19+
id: filter
20+
run: |
21+
MODIFIED_TARGETS=()
22+
23+
# Ensure HEAD^ exists
24+
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
25+
BASE_COMMIT="HEAD^"
26+
else
27+
BASE_COMMIT=$(git rev-list --max-parents=0 HEAD) # First commit
28+
fi
29+
30+
# Check each client dynamically
31+
find clients/* -type d -maxdepth 0 | while read client; do
32+
CLIENT_NAME=$(basename "$client")
33+
if ! git diff --quiet "$BASE_COMMIT" HEAD -- "$client"; then
34+
echo "Changes detected in $CLIENT_NAME"
35+
MODIFIED_TARGETS+=("$CLIENT_NAME")
36+
fi
37+
done
38+
39+
# Convert to JSON array format
40+
MODIFIED_TARGETS_JSON=$(printf '%s\n' "${MODIFIED_TARGETS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))')
41+
42+
echo "Detected modified targets: $MODIFIED_TARGETS_JSON"
43+
echo "modified_targets=$MODIFIED_TARGETS_JSON" >> $GITHUB_ENV
44+
echo "::set-output name=modified_targets::$MODIFIED_TARGETS_JSON"
45+
checkstyle:
46+
runs-on: ubuntu-latest
47+
needs: detect-targets
48+
if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }}
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Set up JDK
52+
uses: actions/setup-java@v3
53+
with:
54+
java-version: 17
55+
distribution: 'adopt'
56+
cache: 'maven'
57+
cache-dependency-path: |
58+
'clients/pom.xml'
59+
'examples/pom.xml'
60+
- name: Validate modules
61+
run: |
62+
mvn -f clients/pom.xml -N install
63+
mvn -f clients/pom.xml -pl common install
64+
mvn -f clients/pom.xml -pl `echo '${{ needs.detect-targets.outputs.modified_targets }}' | jq -r 'join(",")'` validate
865
build:
9-
runs-on: ${{ matrix.operating-system }}
66+
runs-on: ubuntu-latest
67+
needs: detect-targets
68+
if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }}
1069
strategy:
1170
matrix:
12-
operating-system: [ ubuntu-latest ]
13-
java-version: [ 8, 11, 17 ]
14-
71+
target: ${{ fromJson(needs.detect-targets.outputs.modified_targets) }}
72+
java-version: [ 11, 17 ]
1573
steps:
1674
- uses: actions/checkout@v3
17-
- name: Set up JDK 8
75+
- name: Set up JDK
1876
uses: actions/setup-java@v3
1977
with:
2078
java-version: ${{ matrix.java-version }}
2179
distribution: 'adopt'
2280
cache: 'maven'
23-
- name: Run checkstyle
24-
run: mvn checkstyle:check
25-
- name: Run unit tests
26-
run: mvn clean test
27-
- name: Build with Maven
28-
run: mvn install '-Dgpg.skip=true' '-Dmaven.javadoc.skip=true'
81+
cache-dependency-path: |
82+
'clients/pom.xml'
83+
'examples/pom.xml'
84+
- name: Build ${{ matrix.target }} module
85+
run: |
86+
mvn -f clients/pom.xml -N install
87+
mvn -f clients/pom.xml -pl common,${{ matrix.target }} install -Dcheckstyle.skip=true

.github/workflows/release.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)