From 46eb766cf5483eb31ba72099351e6b1f466c6bd0 Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Mon, 2 Dec 2024 16:15:06 -0800 Subject: [PATCH] Fixing the CI actions failures due to AL2 with older glibc Signed-off-by: Navneet Verma --- .github/workflows/CI.yml | 21 +++++++++++---------- .github/workflows/test_security.yml | 9 ++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d860e743c..2d8c8556a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,8 +30,6 @@ on: - 'jni/**' - 'micro-benchmarks/**' - '.github/workflows/CI.yml' -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: Get-CI-Image-Tag: @@ -52,11 +50,11 @@ jobs: # 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 + options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} steps: - name: Checkout k-NN - uses: actions/checkout@v1 + uses: actions/checkout@v4 # Setup git user so that patches for native libraries can be applied and committed - name: Setup git user @@ -65,9 +63,10 @@ jobs: 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 + 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. @@ -88,7 +87,7 @@ jobs: - name: Upload Coverage Report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -103,7 +102,7 @@ jobs: steps: - name: Checkout k-NN - uses: actions/checkout@v1 + uses: actions/checkout@v4 # Setup git user so that patches for native libraries can be applied and committed - name: Setup git user @@ -112,9 +111,10 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} + distribution: 'temurin' - name: Install dependencies on macos run: | @@ -145,7 +145,7 @@ jobs: steps: - name: Checkout k-NN - uses: actions/checkout@v1 + uses: actions/checkout@v4 # Setup git user so that patches for native libraries can be applied and committed - name: Setup git user @@ -154,9 +154,10 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} + distribution: 'temurin' - name: Install MinGW Using Scoop run: | diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml index f3deb096e..92167b8e8 100644 --- a/.github/workflows/test_security.yml +++ b/.github/workflows/test_security.yml @@ -28,8 +28,6 @@ on: - 'gradle/**' - 'jni/**' - '.github/workflows/test_security.yml' -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: Get-CI-Image-Tag: @@ -50,11 +48,11 @@ jobs: # 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 + options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} steps: - name: Checkout k-NN - uses: actions/checkout@v1 + uses: actions/checkout@v4 # Setup git user so that patches for native libraries can be applied and committed - name: Setup git user run: | @@ -62,9 +60,10 @@ jobs: 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 + 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.