Skip to content

Commit

Permalink
Fixed the github actions to use the image used by OpenSearch-build re…
Browse files Browse the repository at this point in the history
…po for building the distribution

Signed-off-by: Navneet Verma <[email protected]>
  • Loading branch information
navneet1v committed Aug 28, 2023
1 parent 5907cb5 commit b420c72
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit b420c72

Please sign in to comment.