name: master

on:
  push:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '1.8', '11' ]
    name: Build Spark with JDK ${{ matrix.java }}

    steps:
    - uses: actions/checkout@master
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
        export MAVEN_CLI_OPTS="--no-transfer-progress"
        ./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-3.2 -Phadoop-cloud package

name: master

on:
  push:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '1.8', '11' ]
    name: Build Spark with JDK ${{ matrix.java }}

    steps:
    - uses: actions/checkout@master
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        version: ${{ matrix.java }}
    - name: Build with Maven
      run: |
        export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
        export MAVEN_CLI_OPTS="--no-transfer-progress"
        ./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-3.2 -Phadoop-cloud -Djava.version=${{ matrix.java }} package

Set up java version for github workflow
[SPARK-28920][INFRA] Set up java version for github workflow

This patch adds java version parameter to GitHub workflow conf for JDK8/11.

As we want to build JDK8/11 on GitHub workflow, we might need to add java version according current matrix.

No

See the GitHub workflow run result.

Closes #25625 from viirya/github-workflow-java.

Authored-by: Liang-Chi Hsieh <56d6f1a570b23ccf100f962eeec2ef1658eed1f8@uber.com>
Signed-off-by: Dongjoon Hyun <9b02cb7e37158797a8e22c559f7c5f5ecd28ea57@apple.com>
