From b420c72135ce1d2a56fef1255c88efc2ab985eb7 Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Mon, 28 Aug 2023 15:10:16 -0700 Subject: [PATCH] Fixed the github actions to use the image used by OpenSearch-build repo for building the distribution Signed-off-by: Navneet Verma --- .github/workflows/CI.yml | 45 +++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 31d16f21f9..1c09d692b3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,10 +16,13 @@ jobs: strategy: matrix: java: [11, 17] - os: [ubuntu-latest, macos-latest] - name: Build and Test k-NN Plugin - runs-on: ${{ matrix.os }} + name: Build and Test k-NN Plugin on Ubnutu + runs-on: ubuntu-latest + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + image: public.ecr.aws/opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-build-v4 + options: --user root steps: - name: Checkout k-NN @@ -31,26 +34,44 @@ jobs: java-version: ${{ matrix.java }} - name: Install dependencies on ubuntu - if: startsWith(matrix.os,'ubuntu') run: | - sudo apt-get install libopenblas-dev gfortran -y - - - name: Install dependencies on macos - if: startsWith(matrix.os, 'macos') - run: | - brew reinstall gcc - export FC=/usr/local/Cellar/gcc/12.2.0/bin/gfortran + yum install libopenblas-dev gfortran -y - name: Run build run: | ./gradlew build - name: Upload Coverage Report - if: startsWith(matrix.os,'ubuntu') uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} + Build-k-NN-MacOS: + strategy: + matrix: + java: [ 11, 17 ] + + name: Build and Test k-NN Plugin on MacOS + runs-on: macos-latest + + steps: + - name: Checkout k-NN + uses: actions/checkout@v1 + + - name: Setup Java ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Install dependencies on macos + run: | + brew reinstall gcc + export FC=/usr/local/Cellar/gcc/12.2.0/bin/gfortran + + - name: Run build + run: | + ./gradlew build + Build-k-NN-Windows: strategy: matrix: