[Backport 2.x] Add binary index support for Lucene engine #4507
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test k-NN on Secure Cluster | |
on: | |
schedule: | |
- cron: '0 0 * * *' # every night | |
push: | |
branches: | |
- "*" | |
- "feature/**" | |
paths: | |
- 'build.gradle' | |
- 'settings.gradle' | |
- 'src/**' | |
- 'build-tools/**' | |
- 'buildSrc/**' | |
- 'gradle/**' | |
- 'jni/**' | |
- '.github/workflows/test_security.yml' | |
pull_request: | |
branches: | |
- "*" | |
- "feature/**" | |
paths: | |
- 'build.gradle' | |
- 'settings.gradle' | |
- 'src/**' | |
- 'build-tools/**' | |
- 'buildSrc/**' | |
- 'gradle/**' | |
- 'jni/**' | |
- '.github/workflows/test_security.yml' | |
jobs: | |
Get-CI-Image-Tag: | |
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main | |
with: | |
product: opensearch | |
integ-test-with-security-linux: | |
strategy: | |
matrix: | |
java: [21] | |
name: Run Integration Tests on Linux | |
runs-on: ubuntu-latest | |
needs: Get-CI-Image-Tag | |
container: | |
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution | |
# this image tag is subject to change as more dependencies and updates will arrive over time | |
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} | |
# need to switch to root so that github actions can install runner binary on container without permission issues. | |
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} | |
steps: | |
- name: Run start commands | |
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} | |
- name: Checkout k-NN | |
uses: actions/checkout@v4 | |
# Setup git user so that patches for native libraries can be applied and committed | |
- name: Setup git user | |
run: | | |
su `id -un 1000` -c 'git config --global user.name "github-actions[bot]"' | |
su `id -un 1000` -c 'git config --global user.email "github-actions[bot]@users.noreply.github.com"' | |
- name: Setup Java ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
- name: Run build | |
# switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. | |
run: | | |
chown -R 1000:1000 `pwd` | |
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw | |
then | |
echo "avx512 available on system" | |
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dnproc.count=`nproc`" | |
elif lscpu | grep -i avx2 | |
then | |
echo "avx2 available on system" | |
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dnproc.count=`nproc` -Davx512.enabled=false" | |
else | |
echo "avx512 and avx2 not available on system" | |
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Davx2.enabled=false -Davx512.enabled=false -Dnproc.count=`nproc`" | |
fi |