find v8 JDK #42
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
# This workflow will build a Java project with Ant | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant | |
name: Java CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
# We test for presence of build.gradle file | |
# Run gradle build if found, raw javac if not | |
# NOTE: We need to have the conditional for each run step because | |
# hashFiles is not supported at [jobs.<jobid>.if], | |
# only in [jobs.<jobid>.step.if] | |
build-with-shell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
# temurin is from Eclipse | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Build Java Code | |
if: ${{ hashFiles('build.gradle') == '' }} | |
run: javac -cp lib/hamcrest-core-1.3.jar:lib/junit-4.12.jar *.java | |
- name: Run Unit Tests | |
if: ${{ hashFiles('build.gradle') == '' }} | |
run: java -cp .:lib/hamcrest-core-1.3.jar:lib/junit-4.12.jar org.junit.runner.JUnitCore EdgeConnectorTest | |
# Display the files that the action sees in the home directory | |
- name: List files | |
run: tree | |
# If there's a build.gradle file then run gradle on it | |
build-with-gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# JDK17 compatible with Gradle 7.2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.2 | |
- name: Execute Gradle wrapper build | |
if: ${{ hashFiles('build.gradle') != '' && hashFiles('gradlew') != '' }} | |
run: ./gradlew build | |
- name: Execute Gradle build | |
if: ${{ hashFiles('build.gradle') == '' && hashFiles('gradlew') != '' }} | |
run: gradle test |