Java version check: only check >=11 #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build (standard) | |
on: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Install Graphviz | |
run: sudo apt-get -y install graphviz | |
- name: Gradle caches | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build snapshot | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
- name: Unpack tar | |
run: mkdir ./out && tar -xf ./build/distributions/*.tar --strip-components 1 -C ./out | |
- name: Upload build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build | |
path: ./out | |
if-no-files-found: error | |
validate_java_8: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Download build | |
uses: actions/download-artifact@v2 | |
with: | |
name: build | |
path: ./out | |
- name: Grant execute permission for cm | |
run: chmod +x ./out/bin/cm | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Execute to check if Java version is compatible | |
run: ./out/bin/cm | |
validate_java_11: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Download build | |
uses: actions/download-artifact@v2 | |
with: | |
name: build | |
path: ./out | |
- name: Grant execute permission for cm | |
run: chmod +x ./out/bin/cm | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Execute to check if Java version is compatible | |
run: ./out/bin/cm | |
validate_java_17: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Download build | |
uses: actions/download-artifact@v2 | |
with: | |
name: build | |
path: ./out | |
- name: Grant execute permission for cm | |
run: chmod +x ./out/bin/cm | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Execute to check if Java version is compatible | |
run: ./out/bin/cm || if [ $? != 1 ]; then exit -1; fi |