From 1b6d3e186269f6922e7c4654def43213cc2cc25f Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Fri, 14 Jun 2024 14:46:30 -0700 Subject: [PATCH] Test AL2 env for knn build Signed-off-by: Junqiu Lei --- .github/workflows/CI.yml | 168 ------------------ .github/workflows/add-untriaged.yml | 19 -- .github/workflows/al2-test.yml | 50 ++++++ .github/workflows/auto-release.yml | 28 --- .github/workflows/backport.yml | 28 --- ...backwards_compatibility_tests_workflow.yml | 159 ----------------- .github/workflows/changelog_verifier.yml | 18 -- .../workflows/create-documentation-issue.yml | 41 ----- .github/workflows/delete_backport_branch.yml | 15 -- .../draft-release-notes-workflow.yml | 20 --- .github/workflows/links.yml | 23 --- .github/workflows/maven-publish.yml | 35 ---- .github/workflows/test_security.yml | 55 ------ 13 files changed, 50 insertions(+), 609 deletions(-) delete mode 100644 .github/workflows/CI.yml delete mode 100644 .github/workflows/add-untriaged.yml create mode 100644 .github/workflows/al2-test.yml delete mode 100644 .github/workflows/auto-release.yml delete mode 100644 .github/workflows/backport.yml delete mode 100644 .github/workflows/backwards_compatibility_tests_workflow.yml delete mode 100644 .github/workflows/changelog_verifier.yml delete mode 100644 .github/workflows/create-documentation-issue.yml delete mode 100644 .github/workflows/delete_backport_branch.yml delete mode 100644 .github/workflows/draft-release-notes-workflow.yml delete mode 100644 .github/workflows/links.yml delete mode 100644 .github/workflows/maven-publish.yml delete mode 100644 .github/workflows/test_security.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index e1d85eb78..000000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: Build and Test k-NN -on: - schedule: - - cron: '0 0 * * *' # every night - push: - branches: - - "*" - - "feature/**" - pull_request: - branches: - - "*" - - "feature/**" - -jobs: - Get-CI-Image-Tag: - uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main - with: - product: opensearch - - Build-k-NN-Linux: - strategy: - matrix: - java: [11, 17, 21] - - name: Build and Test k-NN Plugin 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: --user root - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - with: - submodules: true - - # 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@v1 - with: - java-version: ${{ matrix.java }} - - - 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 avx2 - then - echo "avx2 available on system" - su `id -un 1000` -c "whoami && java -version && ./gradlew build" - else - echo "avx2 not available on system" - su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dsimd.enabled=false" - fi - - - - name: Upload Coverage Report - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - Build-k-NN-MacOS: - strategy: - matrix: - java: [ 11, 17, 21 ] - - name: Build and Test k-NN Plugin on MacOS - needs: Get-CI-Image-Tag - runs-on: macos-12 - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - - # Setup git user so that patches for native libraries can be applied and committed - - name: Setup git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - 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: | - if sysctl -n machdep.cpu.features machdep.cpu.leaf7_features | grep -i AVX2 - then - echo "avx2 available on system" - ./gradlew build - else - echo "avx2 not available on system" - ./gradlew build -Dsimd.enabled=false - fi - - Build-k-NN-Windows: - strategy: - matrix: - java: [ 11, 17, 21 ] - - name: Build and Test k-NN Plugin on Windows - needs: Get-CI-Image-Tag - runs-on: windows-latest - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - - # Setup git user so that patches for native libraries can be applied and committed - - name: Setup git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - name: Install MinGW Using Scoop - run: | - iex "& {$(irm get.scoop.sh)} -RunAsAdmin" - scoop bucket add main - scoop install mingw - - - name: Add MinGW to PATH - run: | - echo "C:/Users/runneradmin/scoop/apps/mingw/current/bin" >> $env:GITHUB_PATH - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv - - - name: Install Zlib Using Scoop - run: | - echo "C:/Users/runneradmin/scoop/shims" >> $env:GITHUB_PATH - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv - scoop bucket add extras - scoop install zlib - regedit /s "C:\\Users\\runneradmin\\scoop\\apps\\zlib\\current\\register.reg" - - - name: Download OpenBLAS - run: | - curl -L -O https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip - mkdir OpenBLAS - Expand-Archive -Path .\OpenBLAS-0.3.21-x64.zip -DestinationPath .\OpenBLAS\ - mkdir ./src/main/resources/windowsDependencies - cp ./OpenBLAS/bin/libopenblas.dll ./src/main/resources/windowsDependencies/ - rm .\OpenBLAS-0.3.21-x64.zip - rm -r .\OpenBLAS\ - - - name: Run build - run: | - ./gradlew.bat build -D'simd.enabled=false' diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml deleted file mode 100644 index 9dcc7020d..000000000 --- a/.github/workflows/add-untriaged.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Apply 'untriaged' label during issue lifecycle - -on: - issues: - types: [opened, reopened, transferred] - -jobs: - apply-label: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['untriaged'] - }) diff --git a/.github/workflows/al2-test.yml b/.github/workflows/al2-test.yml new file mode 100644 index 000000000..488c9ddea --- /dev/null +++ b/.github/workflows/al2-test.yml @@ -0,0 +1,50 @@ +name: Build and Test k-NN +on: + push: + branches: + - "*" + - "feature/**" + pull_request: + branches: + - "*" + - "feature/**" + +jobs: + Build-k-NN-Linux: + name: Build and Test k-NN Plugin on Linux + runs-on: ubuntu-latest + container: + image: junqiuamz/ci-runner:knn-al2-1 + options: --user root + + steps: + - name: Checkout k-NN + uses: actions/checkout@v2 + with: + submodules: true + + - name: Setup git user + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Setup Java 21 + run: | + export JAVA_HOME=/opt/java/openjdk-21 + export PATH=$PATH:$JAVA_HOME/bin + java -version + + - name: Run build + run: | + if lscpu | grep -i avx2; then + echo "avx2 available on system" + ./gradlew build + else + echo "avx2 not available on system" + ./gradlew build -Dsimd.enabled=false + fi + + - name: Upload Coverage Report + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml deleted file mode 100644 index c67e12bad..000000000 --- a/.github/workflows/auto-release.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Releases - -on: - push: - tags: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: GitHub App token - id: github_app_token - uses: tibdex/github-app-token@v1.5.0 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - - uses: actions/checkout@v2 - - uses: ncipollo/release-action@v1 - with: - github_token: ${{ steps.github_app_token.outputs.token }} - bodyFile: release-notes/opensearch-knn.release-notes-${{steps.tag.outputs.tag}}.md diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index e47d8d88c..000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Backport -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - backport: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - name: Backport - steps: - - name: GitHub App token - id: github_app_token - uses: tibdex/github-app-token@v1.5.0 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 - - - name: Backport - uses: VachaShah/backport@v1.1.4 - with: - github_token: ${{ steps.github_app_token.outputs.token }} - branch_name: backport/backport-${{ github.event.number }} diff --git a/.github/workflows/backwards_compatibility_tests_workflow.yml b/.github/workflows/backwards_compatibility_tests_workflow.yml deleted file mode 100644 index 503b23326..000000000 --- a/.github/workflows/backwards_compatibility_tests_workflow.yml +++ /dev/null @@ -1,159 +0,0 @@ -name: Backwards Compatibility Tests k-NN -on: - push: - branches: - - "*" - - "feature/**" - pull_request: - branches: - - "*" - - "feature/**" - -jobs: - Restart-Upgrade-BWCTests-k-NN: - strategy: - matrix: - java: [ 11, 17 ] - os: [ubuntu-latest] - bwc_version : [ "2.0.1", "2.1.0", "2.2.1", "2.3.0", "2.4.1", "2.5.0", "2.6.0", "2.7.0", "2.8.0", "2.9.0", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.15.0-SNAPSHOT"] - opensearch_version : [ "3.0.0-SNAPSHOT" ] - exclude: - - os: windows-latest - bwc_version: "2.0.1" - - os: windows-latest - bwc_version: "2.1.0" - - os: windows-latest - bwc_version: "2.2.1" - - os: windows-latest - bwc_version: "2.3.0" - - name: k-NN Restart-Upgrade BWC Tests - runs-on: ${{ matrix.os }} - env: - BWC_VERSION_RESTART_UPGRADE: ${{ matrix.bwc_version }} - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - - # Setup git user so that patches for native libraries can be applied and committed - - name: Setup git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - if: startsWith(matrix.os,'ubuntu') - name: Install dependencies on ubuntu - run: | - sudo apt-get install libopenblas-dev gfortran -y - - - if: startsWith(matrix.os,'windows') - name: Install MinGW Using Scoop on Windows - run: | - iex "& {$(irm get.scoop.sh)} -RunAsAdmin" - scoop bucket add main - scoop install mingw - - - if: startsWith(matrix.os,'windows') - name: Add MinGW to PATH on Windows - run: | - echo "C:/Users/runneradmin/scoop/apps/mingw/current/bin" >> $env:GITHUB_PATH - refreshenv - - - if: startsWith(matrix.os,'windows') - name: Download OpenBLAS on Windows - run: | - curl -L -O https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip - mkdir OpenBLAS - Expand-Archive -Path .\OpenBLAS-0.3.21-x64.zip -DestinationPath .\OpenBLAS\ - mkdir ./src/main/resources/windowsDependencies - cp ./OpenBLAS/bin/libopenblas.dll ./src/main/resources/windowsDependencies/ - rm .\OpenBLAS-0.3.21-x64.zip - rm -r .\OpenBLAS\ - - - if: startsWith(matrix.os,'windows') - name: Run k-NN Restart-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }} on Windows - run: | - echo "Running restart-upgrade backwards compatibility tests ..." - ./gradlew :qa:restart-upgrade:testRestartUpgrade -D'tests.bwc.version=${{ matrix.bwc_version }}' - - - if: startsWith(matrix.os,'ubuntu') - name: Run k-NN Restart-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }} on Ubuntu - run: | - echo "Running restart-upgrade backwards compatibility tests ..." - ./gradlew :qa:restart-upgrade:testRestartUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE - - - Rolling-Upgrade-BWCTests-k-NN: - strategy: - matrix: - java: [ 11, 17 ] - os: [ubuntu-latest] - bwc_version: [ "2.15.0-SNAPSHOT" ] - opensearch_version: [ "3.0.0-SNAPSHOT" ] - - name: k-NN Rolling-Upgrade BWC Tests - runs-on: ${{ matrix.os }} - env: - BWC_VERSION_ROLLING_UPGRADE: ${{ matrix.bwc_version }} - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - - # Setup git user so that patches for native libraries can be applied and committed - - name: Setup git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - if: startsWith(matrix.os,'ubuntu') - name: Install dependencies on ubuntu - run: | - sudo apt-get install libopenblas-dev gfortran -y - - - if: startsWith(matrix.os,'windows') - name: Install MinGW Using Scoop on Windows - run: | - iex "& {$(irm get.scoop.sh)} -RunAsAdmin" - scoop bucket add main - scoop install mingw - - - if: startsWith(matrix.os,'windows') - name: Add MinGW to PATH on Windows - run: | - echo "C:/Users/runneradmin/scoop/apps/mingw/current/bin" >> $env:GITHUB_PATH - refreshenv - - - if: startsWith(matrix.os,'windows') - name: Download OpenBLAS on Windows - run: | - curl -L -O https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip - mkdir OpenBLAS - Expand-Archive -Path .\OpenBLAS-0.3.21-x64.zip -DestinationPath .\OpenBLAS\ - mkdir ./src/main/resources/windowsDependencies - cp ./OpenBLAS/bin/libopenblas.dll ./src/main/resources/windowsDependencies/ - rm .\OpenBLAS-0.3.21-x64.zip - rm -r .\OpenBLAS\ - - - if: startsWith(matrix.os,'windows') - name: Run k-NN Rolling-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }} on Windows - run: | - echo "Running rolling-upgrade backwards compatibility tests ..." - ./gradlew :qa:rolling-upgrade:testRollingUpgrade -D'tests.bwc.version=${{ matrix.bwc_version }}' - - - if: startsWith(matrix.os,'ubuntu') - name: Run k-NN Rolling-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }} on Ubuntu - run: | - echo "Running rolling-upgrade backwards compatibility tests ..." - ./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml deleted file mode 100644 index 992a38b62..000000000 --- a/.github/workflows/changelog_verifier.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Changelog Verifier" -on: - pull_request: - types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled] - -jobs: - # Enforces the update of a changelog file on every pull request - verify-changelog: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.event.pull_request.head.sha }} - - - uses: dangoslen/changelog-enforcer@v3 - with: - skipLabels: "autocut, skip-changelog" diff --git a/.github/workflows/create-documentation-issue.yml b/.github/workflows/create-documentation-issue.yml deleted file mode 100644 index 1ab6e8b15..000000000 --- a/.github/workflows/create-documentation-issue.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create Documentation Issue -on: - pull_request: - types: - - labeled -env: - PR_NUMBER: ${{ github.event.number }} - -jobs: - create-issue: - if: ${{ github.event.label.name == 'needs-documentation' }} - runs-on: ubuntu-latest - name: Create Documentation Issue - steps: - - name: GitHub App token - id: github_app_token - uses: tibdex/github-app-token@v1.5.0 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Edit the issue template - run: | - echo "https://github.com/opensearch-project/k-NN/pull/${{ env.PR_NUMBER }}." >> ./.github/ISSUE_TEMPLATE/documentation-issue.md - - - name: Create Issue From File - id: create-issue - uses: peter-evans/create-issue-from-file@v4 - with: - title: Add documentation related to new feature - content-filepath: ./.github/ISSUE_TEMPLATE/documentation-issue.md - labels: documentation - repository: opensearch-project/documentation-website - token: ${{ steps.github_app_token.outputs.token }} - - - name: Print Issue - run: echo Created related documentation issue ${{ steps.create-issue.outputs.issue-number }} diff --git a/.github/workflows/delete_backport_branch.yml b/.github/workflows/delete_backport_branch.yml deleted file mode 100644 index d654df6b4..000000000 --- a/.github/workflows/delete_backport_branch.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Delete merged branch of the backport PRs -on: - pull_request: - types: - - closed - -jobs: - delete-branch: - runs-on: ubuntu-latest - if: startsWith(github.event.pull_request.head.ref,'backport/') - steps: - - name: Delete merged branch - uses: SvanBoxel/delete-merged-branch@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/draft-release-notes-workflow.yml b/.github/workflows/draft-release-notes-workflow.yml deleted file mode 100644 index 6b3d89c33..000000000 --- a/.github/workflows/draft-release-notes-workflow.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Release Drafter - -on: - push: - branches: - - main - -jobs: - update_release_draft: - name: Update draft release notes - runs-on: ubuntu-latest - steps: - - name: Update draft release notes - uses: release-drafter/release-drafter@v5 - with: - config-name: draft-release-notes-config.yml - name: Version (set here) - tag: (None) - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml deleted file mode 100644 index 3d0b81ad5..000000000 --- a/.github/workflows/links.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Link Checker -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - linkchecker: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: lychee Link Checker - id: lychee - uses: lycheeverse/lychee-action@master - with: - args: --accept=200,403,429 **/*.html **/*.md **/*.txt **/*.json - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Fail if there were link errors - run: exit ${{ steps.lychee.outputs.exit_code }} \ No newline at end of file diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml deleted file mode 100644 index 724e3a213..000000000 --- a/.github/workflows/maven-publish.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish snapshots to maven - -on: - workflow_dispatch: - push: - branches: - - 'main' - - '1.*' - - '2.*' - -jobs: - build-and-publish-snapshots: - runs-on: ubuntu-latest - - permissions: - id-token: write - contents: write - - steps: - - uses: actions/setup-java@v3 - with: - distribution: temurin # Temurin is a distribution of adoptium - java-version: 11 - - uses: actions/checkout@v3 - - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} - aws-region: us-east-1 - - name: publish snapshots to maven - run: | - export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) - export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) - echo "::add-mask::$SONATYPE_USERNAME" - echo "::add-mask::$SONATYPE_PASSWORD" - ./gradlew publishPluginZipPublicationToSnapshotsRepository diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml deleted file mode 100644 index 78206bada..000000000 --- a/.github/workflows/test_security.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Test k-NN on Secure Cluster -on: - schedule: - - cron: '0 0 * * *' # every night - push: - branches: - - "*" - - "feature/**" - pull_request: - branches: - - "*" - - "feature/**" - -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: [11, 17, 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: --user root - - steps: - - name: Checkout k-NN - uses: actions/checkout@v1 - with: - submodules: true - # 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@v1 - with: - java-version: ${{ matrix.java }} - - - 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` - su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -Dsecurity.enabled=true -Dsimd.enabled=true"