diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0faf792..4745ed5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,6 +26,7 @@ jobs: java: [21] name: Build and Test LTR Plugin on Linux + if: github.repository == 'opensearch-project/opensearch-learning-to-rank-base' runs-on: ubuntu-latest container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution @@ -39,9 +40,10 @@ jobs: run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} + distribution: 'temurin' - name: Checkout LTR Code uses: actions/checkout@v4 @@ -54,3 +56,25 @@ jobs: su `id -un 1000` -c 'whoami && java -version && ./gradlew -Dtests.security.manager=false clean test' + + Build-ltr-windows: + strategy: + matrix: + java: [ 21 ] + name: Build and Test LTR Plugin on Windows + if: github.repository == 'opensearch-project/opensearch-learning-to-rank-base' + runs-on: windows-latest + steps: + - name: Setup Java ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + - name: Checkout LTR Code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Build and Run Tests + shell: bash + run: | + ./gradlew.bat build \ No newline at end of file