Skip to content

Commit

Permalink
Add more
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Oct 31, 2023
1 parent 4c22b7f commit bc8d5bc
Showing 1 changed file with 56 additions and 57 deletions.
113 changes: 56 additions & 57 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
fail-fast: false
# This starts three jobs, setting these environment variables uniquely for the different jobs
matrix:
java: [11]
#java: [11, 17]
java: [11, 17]
feature: [ism, non-ism]
include:
- feature: ism
Expand Down Expand Up @@ -75,58 +74,58 @@ jobs:
name: index-management-plugin-ubuntu-latest
path: index-management-artifacts

# test-and-build-windows-macos:
# env:
# BUILD_ARGS: ${{ matrix.os_build_args }}
# WORKING_DIR: ${{ matrix.working_directory }}.
# TEST_FILTER: ${{ matrix.test_filter }}
# strategy:
# # This setting says that all jobs should finish, even if one fails
# fail-fast: false
# # This starts three jobs, setting these environment variables uniquely for the different jobs
# matrix:
# java: [11, 17]
# os: [windows-latest, macos-latest]
# feature: [ism, non-ism]
# include:
# - os: windows-latest
# os_build_args: -x integTest -x jacocoTestReport
# working_directory: X:\
# os_java_options: -Xmx4096M
# - os: macos-latest
# os_build_args: -x integTest -x jacocoTestReport
# - feature: ism
# test_filter: -PincludeTests="org.opensearch.indexmanagement.indexstatemanagement*"
# - feature: non-ism
# test_filter: -PexcludeTests="org.opensearch.indexmanagement.indexstatemanagement*"
# runs-on: ${{ matrix.os }}
# steps:
# # This step uses the setup-java Github action: https://github.com/actions/setup-java
# - name: Set Up JDK ${{ matrix.java }}
# uses: actions/setup-java@v2
# with:
# distribution: temurin # Temurin is a distribution of adoptium
# java-version: ${{ matrix.java }}
# # build index management
# - 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
# if: ${{ matrix.os == 'windows-latest' }}
# run: subst 'X:' .
# - name: Build with Gradle
# working-directory: ${{ env.WORKING_DIR }}
# run: ./gradlew build ${{ env.BUILD_ARGS }} ${{ env.TEST_FILTER }}
# env:
# _JAVA_OPTIONS: ${{ matrix.os_java_options }}
# - name: Create Artifact Path
# run: |
# mkdir -p index-management-artifacts
# cp ./build/distributions/*.zip index-management-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: index-management-plugin-${{ matrix.os }}
# path: index-management-artifacts
test-and-build-windows-macos:
env:
BUILD_ARGS: ${{ matrix.os_build_args }}
WORKING_DIR: ${{ matrix.working_directory }}.
TEST_FILTER: ${{ matrix.test_filter }}
strategy:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
# This starts three jobs, setting these environment variables uniquely for the different jobs
matrix:
java: [11, 17]
os: [windows-latest, macos-latest]
feature: [ism, non-ism]
include:
- os: windows-latest
os_build_args: -x integTest -x jacocoTestReport
working_directory: X:\
os_java_options: -Xmx4096M
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
- feature: ism
test_filter: -PincludeTests="org.opensearch.indexmanagement.indexstatemanagement*"
- feature: non-ism
test_filter: -PexcludeTests="org.opensearch.indexmanagement.indexstatemanagement*"
runs-on: ${{ matrix.os }}
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
# build index management
- 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
if: ${{ matrix.os == 'windows-latest' }}
run: subst 'X:' .
- name: Build with Gradle
working-directory: ${{ env.WORKING_DIR }}
run: ./gradlew build ${{ env.BUILD_ARGS }} ${{ env.TEST_FILTER }}
env:
_JAVA_OPTIONS: ${{ matrix.os_java_options }}
- name: Create Artifact Path
run: |
mkdir -p index-management-artifacts
cp ./build/distributions/*.zip index-management-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: index-management-plugin-${{ matrix.os }}
path: index-management-artifacts

0 comments on commit bc8d5bc

Please sign in to comment.