Skip to content

Commit

Permalink
Run CI on JDK 8, 11, and 14. (opensearch-project#130)
Browse files Browse the repository at this point in the history
* Run CI on JDK 8, 11, 14 and 17.

Signed-off-by: dblock <[email protected]>

* Build with 11 and test on 8.

Signed-off-by: dblock <[email protected]>

* Build and test using JDK 8.

Signed-off-by: dblock <[email protected]>

* Remove JDK17, requires Gradle 7.

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Mar 5, 2022
1 parent f6bb235 commit 96d7f24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
build:
strategy:
matrix:
java: [14]
java:
- 8
- 11
- 14

name: Build and Test
runs-on: ubuntu-latest
Expand All @@ -25,7 +28,6 @@ jobs:
with:
java-version: ${{ matrix.java }}

# job-scheduler
- name: Build and Test
run: |
./gradlew build
Expand All @@ -39,3 +41,4 @@ jobs:
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: plugin

10 changes: 5 additions & 5 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- [Developer Guide](#developer-guide)
- [Forking and Cloning](#forking-and-cloning)
- [Install Prerequisites](#install-prerequisites)
- [JDK 14](#jdk-14)
- [JDK 11](#jdk-11)
- [Setup](#setup)
- [Build](#build)
- [Building from the command line](#building-from-the-command-line)
Expand All @@ -19,15 +19,15 @@ Fork this repository on GitHub, and clone locally with `git clone`.

### Install Prerequisites

#### JDK 14
#### JDK 11

OpenSearch components build using Java 14 at a minimum. This means you must have a JDK 14 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 14 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-14`.
OpenSearch components build using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`.

## Setup

1. Check out this package from version control.
2. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 11 before running `./gradlew`.
- Unix System
1. `export JAVA_HOME=jdk-install-dir`: Replace `jdk-install-dir` with the JAVA_HOME directory of your system.
2. `export PATH=$JAVA_HOME/bin:$PATH`
Expand All @@ -41,7 +41,7 @@ OpenSearch components build using Java 14 at a minimum. This means you must have
The JobScheduler plugin uses the [Gradle](https://docs.gradle.org/4.10.2/userguide/userguide.html)
build system.
1. Checkout this package from version control.
1. To build from command line set `JAVA_HOME` to point to a JDK >=14
1. To build from command line set `JAVA_HOME` to point to a JDK >=11
1. Run `./gradlew build`

Then you will find the built artifact located at `build/distributions` directory
Expand Down

0 comments on commit 96d7f24

Please sign in to comment.