Skip to content

Commit

Permalink
[Release 3.0] Update gradle to 8.10.2 for JDK23 and codecov to v5 and…
Browse files Browse the repository at this point in the history
… fix delete backport branches (#1157)

* Update gradle to 8.10.2 for JDK23 and codecov to v5

Signed-off-by: Peter Zhu <[email protected]>

* Update to all

Signed-off-by: Peter Zhu <[email protected]>

* Update so that only x64 will upload test coverage

Signed-off-by: Peter Zhu <[email protected]>

* More tweaks

Signed-off-by: Peter Zhu <[email protected]>

* Fix delete backport branch and update jacoco

Signed-off-by: Peter Zhu <[email protected]>

* Update codecov logics

Signed-off-by: Peter Zhu <[email protected]>

* Update codecov logics

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Feb 3, 2025
1 parent cb97cab commit 23ecabc
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 21 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [21]
java: [21, 23]
os: [ubuntu-latest]

name: Gradle Check Linux
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
Check-neural-search-windows:
strategy:
matrix:
java: [21]
java: [21, 23]
os: [windows-latest]

name: Gradle Check Windows
Expand All @@ -82,7 +82,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [21]
java: [21, 23]
os: [ubuntu-latest]

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

Precommit-neural-search-windows:
strategy:
matrix:
java: [21]
java: [21, 23]
os: [windows-latest]

name: Pre-commit Windows
Expand All @@ -138,3 +138,21 @@ jobs:
- name: Run build
run: |
./gradlew precommit --parallel
Precommit-codecov:
needs: Precommit-neural-search-linux
strategy:
matrix:
java: [21, 23]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/download-artifact@v4
with:
name: coverage-report-${{ matrix.os }}-${{ matrix.java }}
path: ./
- name: Upload Coverage Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./jacocoTestReport.xml
4 changes: 2 additions & 2 deletions .github/workflows/backwards_compatibility_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
Restart-Upgrade-BWCTests-NeuralSearch:
strategy:
matrix:
java: [ 21 ]
java: [21, 23]
os: [ubuntu-latest,windows-latest]
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"]
opensearch_version : [ "3.0.0-SNAPSHOT" ]
Expand All @@ -40,7 +40,7 @@ jobs:
Rolling-Upgrade-BWCTests-NeuralSearch:
strategy:
matrix:
java: [ 21 ]
java: [21, 23]
os: [ubuntu-latest,windows-latest]
bwc_version: [ "2.19.0-SNAPSHOT" ]
opensearch_version: [ "3.0.0-SNAPSHOT" ]
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ on:
jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref,'backport/')
permissions:
contents: write
if: github.repository == 'opensearch-project/neural-search' && startsWith(github.event.pull_request.head.ref,'backport/')
steps:
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete merged branch
uses: actions/github-script@v7
with:
script: |
github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${context.payload.pull_request.head.ref}`,
})
4 changes: 2 additions & 2 deletions .github/workflows/test_aggregations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [21]
java: [21, 23]
os: [ubuntu-latest]

name: Integ Tests Linux
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
Check-neural-search-windows:
strategy:
matrix:
java: [21]
java: [21, 23]
os: [windows-latest]

name: Integ Tests Windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
integ-test-with-security-linux:
strategy:
matrix:
java: [21]
java: [21, 23]

name: Run Integration Tests on Linux
runs-on: ubuntu-latest
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 23ecabc

Please sign in to comment.