From 2892b9115444094a328265e6f095e90a0559f796 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Tue, 7 Dec 2021 20:34:36 +0530 Subject: [PATCH 1/3] Adds test and build workflow for windows Signed-off-by: Surya Sashank Nistala --- .github/workflows/build.yml | 38 ++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 168a8550..cb44da0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,10 +13,10 @@ on: - plugin-dev jobs: - build: + linux-build: # Job name name: Build Asynchronous Search - # This job runs on Linux. TODO Make it work for other OS distributions + # This job runs on Linux. runs-on: ubuntu-latest steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java @@ -89,5 +89,37 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v1 with: - name: asynchronous-search-plugin + name: asynchronous-search-plugin-ubuntu + path: asynchronous-search-artifacts + windows-build: + # Job name + name: Build Asynchronous Search + # This job runs on Linux. + runs-on: windows-latest + steps: + # This step uses the setup-java Github action: https://github.com/actions/setup-java + - name: Set Up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: 14 + # This step uses the checkout Github action: https://github.com/actions/checkout + - name: Checkout Branch + uses: actions/checkout@v2 + # This is a hack, but this step creates a link to the X: mounted drive, which makes the path short enough to work on Windows + - name: Shorten Path + run: subst 'X:' . + working-directory: 'X:' + - name: Build with Gradle + run: ./gradlew.bat build -D"opensearch.version=1.3.0-SNAPSHOT" -x integTest -x jacocoTestReport + env: + _JAVA_OPTIONS: -Xmx4096M + - name: Create Artifact Path + run: | + mkdir -p asynchronous-search-artifacts + cp ./build/distributions/*.zip asynchronous-search-artifacts + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact + - name: Upload Artifacts + uses: actions/upload-artifact@v1 + with: + name: asynchronous-search-plugin-windows path: asynchronous-search-artifacts From 6b8cc06c61bec289f07baa3ba06dc2f22e514654 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Tue, 7 Dec 2021 23:14:00 +0530 Subject: [PATCH 2/3] remove shorten path snippet from build.yml Signed-off-by: Surya Sashank Nistala --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb44da0d..80b8bf51 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,10 +105,6 @@ jobs: # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v2 - # This is a hack, but this step creates a link to the X: mounted drive, which makes the path short enough to work on Windows - - name: Shorten Path - run: subst 'X:' . - working-directory: 'X:' - name: Build with Gradle run: ./gradlew.bat build -D"opensearch.version=1.3.0-SNAPSHOT" -x integTest -x jacocoTestReport env: From da182e085dd723bfe74885dfa4546ad8990568d1 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Wed, 8 Dec 2021 11:59:14 +0530 Subject: [PATCH 3/3] fix comment in build.yml Signed-off-by: Surya Sashank Nistala --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80b8bf51..34a27614 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,7 +94,7 @@ jobs: windows-build: # Job name name: Build Asynchronous Search - # This job runs on Linux. + # This job runs on Windows. runs-on: windows-latest steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java