Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
#143 Adding matrix build workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Mar 26, 2024
1 parent 9480b7d commit f94288f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [ 11, 17, 21 ]
experimental: [false]
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew -Dtests.security.manager=false build
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
cache: gradle
- name: Assemble target plugin
uses: gradle/gradle-build-action@v3
with:
cache-disabled: true
arguments: -Dtests.security.manager=false assemble
47 changes: 47 additions & 0 deletions .github/workflows/plugin-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Test
on:
push:
branches:
- 2.12.0
- 2.13.0
- 2.14.0
pull_request:
workflow_dispatch:
env:
PLUGIN_NAME: opensearch-ubi
jobs:
plugin-install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [11, 17, 21]
experimental: [false]
runs-on: ${{ matrix.os }}
steps:
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- id: random-password
uses: peternied/random-name@v1
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
- name: Checkout Branch
uses: actions/checkout@v4
- name: Assemble target plugin
uses: gradle/gradle-build-action@v3
with:
cache-disabled: true
arguments: assemble
- name: Move and rename the plugin for installation
run: mv ./build/distributions/${{ env.PLUGIN_NAME }}-*.zip ${{ env.PLUGIN_NAME }}.zip
shell: bash
- name: Run Opensearch with a single plugin
uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${GITHUB_REF##*/}
plugins: "file:$(pwd)/${{ env.PLUGIN_NAME }}.zip"
security-enabled: false
admin-password: ${{ steps.random-password.outputs.generated_name }}

0 comments on commit f94288f

Please sign in to comment.