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 27796e7
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 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 @@ -30,13 +33,33 @@ jobs:
with:
java-version: ${{ matrix.java }}

- name: Install dependencies on ubuntu
if: startsWith(matrix.os,'ubuntu')
- name: Run build
run: |
sudo apt-get install libopenblas-dev gfortran -y
./gradlew build
- name: Upload Coverage Report
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
if: startsWith(matrix.os, 'macos')
run: |
brew reinstall gcc
export FC=/usr/local/Cellar/gcc/12.2.0/bin/gfortran
Expand All @@ -45,12 +68,6 @@ jobs:
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-Windows:
strategy:
matrix:
Expand Down

0 comments on commit 27796e7

Please sign in to comment.