[SPARK-35924][BUILD][TESTS] Add Java 17 ea build test to GitHub action

### What changes were proposed in this pull request?
This PR aims to add Java 17-ea build test to GitHub action.

### Why are the changes needed?
To improve test coverage.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass newly added Java 17-ea GitHub action job.

Closes #33126 from williamhyun/SPARK-35924.

Authored-by: William Hyun <william@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This commit is contained in:
William Hyun 2021-06-29 11:19:38 -07:00 committed by Dongjoon Hyun
parent 4a17e7a5ae
commit a6088e5036

View file

@ -414,8 +414,14 @@ jobs:
cd docs
bundle exec jekyll build
java-11:
name: Java 11 build with Maven
java-11-17:
name: Java ${{ matrix.java }} build with Maven
strategy:
fail-fast: false
matrix:
java:
- 11
- 17-ea
runs-on: ubuntu-20.04
steps:
- name: Checkout Spark repository
@ -446,19 +452,20 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: java11-maven-${{ hashFiles('**/pom.xml') }}
key: java${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
java11-maven-
- name: Install Java 11
java${{ matrix.java }}-maven-
- name: Install Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: 11
java-version: ${{ matrix.java }}
- name: Build with Maven
run: |
export MAVEN_OPTS="-Xss64m -Xmx2g -XX:ReservedCodeCacheSize=1g -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
export MAVEN_CLI_OPTS="--no-transfer-progress"
export JAVA_VERSION=${{ matrix.java }}
# It uses Maven's 'install' intentionally, see https://github.com/apache/spark/pull/26414.
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-cloud -Djava.version=11 install
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -Phadoop-cloud -Djava.version=${JAVA_VERSION/-ea} install
rm -rf ~/.m2/repository/org/apache/spark
scala-213: