Skip to content

Commit 2b4c807

Browse files
peterzhuamazonweijia-aws
authored andcommitted
[Release 3.0] Update gradle to 8.10.2 for JDK23 and codecov to v5 and fix delete backport branches (opensearch-project#1157)
* Update gradle to 8.10.2 for JDK23 and codecov to v5 Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Update to all Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Update so that only x64 will upload test coverage Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * More tweaks Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Fix delete backport branch and update jacoco Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Update codecov logics Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Update codecov logics Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> --------- Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent d6565ca commit 2b4c807

7 files changed

+46
-21
lines changed

.github/workflows/CI.yml

+27-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
needs: Get-CI-Image-Tag
2222
strategy:
2323
matrix:
24-
java: [21]
24+
java: [21, 23]
2525
os: [ubuntu-latest]
2626

2727
name: Gradle Check Linux
@@ -59,7 +59,7 @@ jobs:
5959
Check-neural-search-windows:
6060
strategy:
6161
matrix:
62-
java: [21]
62+
java: [21, 23]
6363
os: [windows-latest]
6464

6565
name: Gradle Check Windows
@@ -82,7 +82,7 @@ jobs:
8282
needs: Get-CI-Image-Tag
8383
strategy:
8484
matrix:
85-
java: [21]
85+
java: [21, 23]
8686
os: [ubuntu-latest]
8787

8888
name: Pre-commit Linux
@@ -109,18 +109,18 @@ jobs:
109109
- name: Run build
110110
run: |
111111
chown -R 1000:1000 `pwd`
112-
su `id -un 1000` -c "./gradlew precommit --parallel"
112+
su `id -un 1000` -c "./gradlew precommit --parallel && ./gradlew jacocoTestReport && cp -v build/reports/jacoco/test/jacocoTestReport.xml ./jacocoTestReport.xml"
113113
114-
- name: Upload Coverage Report
115-
if: ${{ !cancelled() }}
116-
uses: codecov/codecov-action@v3
114+
- uses: actions/upload-artifact@v4
115+
if: ${{ matrix.os }} == "ubuntu-latest"
117116
with:
118-
token: ${{ secrets.CODECOV_TOKEN }}
117+
name: coverage-report-${{ matrix.os }}-${{ matrix.java }}
118+
path: ./jacocoTestReport.xml
119119

120120
Precommit-neural-search-windows:
121121
strategy:
122122
matrix:
123-
java: [21]
123+
java: [21, 23]
124124
os: [windows-latest]
125125

126126
name: Pre-commit Windows
@@ -138,3 +138,21 @@ jobs:
138138
- name: Run build
139139
run: |
140140
./gradlew precommit --parallel
141+
142+
Precommit-codecov:
143+
needs: Precommit-neural-search-linux
144+
strategy:
145+
matrix:
146+
java: [21, 23]
147+
os: [ubuntu-latest]
148+
runs-on: ${{ matrix.os }}
149+
steps:
150+
- uses: actions/download-artifact@v4
151+
with:
152+
name: coverage-report-${{ matrix.os }}-${{ matrix.java }}
153+
path: ./
154+
- name: Upload Coverage Report
155+
uses: codecov/codecov-action@v5
156+
with:
157+
token: ${{ secrets.CODECOV_TOKEN }}
158+
files: ./jacocoTestReport.xml

.github/workflows/backwards_compatibility_tests_workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
Restart-Upgrade-BWCTests-NeuralSearch:
1414
strategy:
1515
matrix:
16-
java: [ 21 ]
16+
java: [21, 23]
1717
os: [ubuntu-latest,windows-latest]
1818
bwc_version : ["2.9.0","2.10.0","2.11.0","2.12.0","2.13.0","2.14.0","2.15.0","2.16.0","2.17.0","2.18.0","2.19.0-SNAPSHOT"]
1919
opensearch_version : [ "3.0.0-SNAPSHOT" ]
@@ -40,7 +40,7 @@ jobs:
4040
Rolling-Upgrade-BWCTests-NeuralSearch:
4141
strategy:
4242
matrix:
43-
java: [ 21 ]
43+
java: [21, 23]
4444
os: [ubuntu-latest,windows-latest]
4545
bwc_version: [ "2.19.0-SNAPSHOT" ]
4646
opensearch_version: [ "3.0.0-SNAPSHOT" ]

.github/workflows/delete_backport_branch.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ on:
77
jobs:
88
delete-branch:
99
runs-on: ubuntu-latest
10-
if: startsWith(github.event.pull_request.head.ref,'backport/')
10+
permissions:
11+
contents: write
12+
if: github.repository == 'opensearch-project/neural-search' && startsWith(github.event.pull_request.head.ref,'backport/')
1113
steps:
12-
- name: Delete merged branch
13-
uses: SvanBoxel/delete-merged-branch@main
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Delete merged branch
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
github.rest.git.deleteRef({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
ref: `heads/${context.payload.pull_request.head.ref}`,
22+
})

.github/workflows/test_aggregations.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
needs: Get-CI-Image-Tag
2121
strategy:
2222
matrix:
23-
java: [21]
23+
java: [21, 23]
2424
os: [ubuntu-latest]
2525

2626
name: Integ Tests Linux
@@ -54,7 +54,7 @@ jobs:
5454
Check-neural-search-windows:
5555
strategy:
5656
matrix:
57-
java: [21]
57+
java: [21, 23]
5858
os: [windows-latest]
5959

6060
name: Integ Tests Windows

.github/workflows/test_security.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
integ-test-with-security-linux:
2121
strategy:
2222
matrix:
23-
java: [21]
23+
java: [21, 23]
2424

2525
name: Run Integration Tests on Linux
2626
runs-on: ubuntu-latest

gradle/wrapper/gradle-wrapper.jar

79 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionSha256Sum=2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)