diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 14e1ec3df..68ab5e83a 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -19,10 +19,14 @@ jobs: strategy: matrix: java: [ 21, 23 ] + os: + - ubuntu-24.04-arm # arm64-preview + - ubuntu-24.04 # x64 + # Job name - name: Build and test Alerting + name: Build and test Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} 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 @@ -33,11 +37,14 @@ jobs: steps: - name: Run start commands run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 171ca88c3..c828e809b 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -22,10 +22,13 @@ jobs: strategy: matrix: java: [21, 23] + os: + - ubuntu-24.04-arm # arm64-preview + - ubuntu-24.04 # x64 # Job name - name: Build Alerting with JDK ${{ matrix.java }} on Linux + name: Build Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} 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 @@ -36,27 +39,34 @@ jobs: steps: - name: Run start commands run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + - name: Build and run with Gradle run: | chown -R 1000:1000 `pwd` su `id -un 1000` -c "whoami && java -version && ./gradlew assemble integTest" + - name: Create Artifact Path run: | mkdir -p alerting-artifacts cp ./alerting/build/distributions/*.zip alerting-artifacts + # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload Coverage Report uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts uses: actions/upload-artifact@v4 @@ -79,6 +89,9 @@ jobs: os_build_args: -x integTest working_directory: X:\ os_java_options: -Xmx4096M + - os: macos-latest + os_build_args: -x integTest -x + # Job name name: Build Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux @@ -87,25 +100,31 @@ jobs: # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 + # This is a hack, but this step creates a link to the X: mounted drive, which makes the path # short enough to work on Windows - name: Shorten Path if: ${{ matrix.os == 'windows-latest' }} run: subst 'X:' . + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + - name: Build and run with Gradle working-directory: ${{ env.WORKING_DIR }} run: ./gradlew assemble ${{ env.BUILD_ARGS }} env: _JAVA_OPTIONS: ${{ matrix.os_java_options }} + - name: Create Artifact Path run: | mkdir -p alerting-artifacts cp ./alerting/build/distributions/*.zip alerting-artifacts + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts uses: actions/upload-artifact@v4