-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from apache/support-newer-java-versions
Support newer java versions
- Loading branch information
Showing
152 changed files
with
2,906 additions
and
340 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,123 @@ | ||
name: Java Test Coverage with Maven, Coveralls | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
env: | ||
MAVEN_OPTS: -Xmx4g -Xms1g | ||
repo_token: ${{secrets.coveralls_token}} | ||
MAVEN_OPTS: -Xmx4g -Xms1g | ||
repo_token: ${{secrets.coveralls_token}} | ||
RUNNER_TEMP: /tmp | ||
|
||
jobs: | ||
build: | ||
name: Build, Test, Coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: build-${{ runner.os }}-maven- | ||
|
||
- name: Install JDK | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '8' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JDK_8;JAVA_HOME' | ||
|
||
- name: Install Dependencies | ||
run: > | ||
mvn clean install -B -V -q | ||
-DskipTests=true | ||
-Dmaven.javadoc.skip=true | ||
-Dgpg.skip=true | ||
--toolchains .github/workflows/.toolchains.xml | ||
- name: Test & Report | ||
if: ${{ success() }} | ||
run: > | ||
mvn verify coveralls:report -B -V -q | ||
-Dcoveralls-repo-token=${repo_token} | ||
-Dmaven.javadoc.skip=true | ||
-Dgpg.skip=true | ||
--toolchains .github/workflows/.toolchains.xml | ||
build: | ||
name: Build, Test, Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jdk: [8,9,10,11,12,13] | ||
|
||
# All JDKs are installed per build machine which is inefficient | ||
|
||
env: | ||
JDK_VERSION: ${{ matrix.jdk }} | ||
|
||
steps: | ||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: build-${{ runner.os }}-maven- | ||
|
||
- name: Install JDK 8 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '8' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA8_HOME' | ||
|
||
- name: Install JDK 9 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '9' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA9_HOME' | ||
|
||
- name: Install JDK 10 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '10' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA10_HOME' | ||
|
||
- name: Install JDK 11 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '11' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA11_HOME' | ||
|
||
- name: Install JDK 12 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '12' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA12_HOME' | ||
|
||
- name: Install JDK 13 | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: '13' | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA13_HOME' | ||
|
||
- name: Install Matrix JDK | ||
uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: ${{ matrix.jdk }} | ||
architecture: x64 | ||
impl: hotspot | ||
targets: 'JAVA_HOME' | ||
|
||
- name: Echo Java Version | ||
run: > | ||
java -version | ||
- name: Install Dependencies | ||
run: > | ||
mvn clean install | ||
-DskipTests=true | ||
-Dmaven.javadoc.skip=true | ||
-Dgpg.skip=true | ||
--toolchains .github/workflows/.toolchains.xml | ||
- name: Package | ||
run: > | ||
mvn package | ||
-Dmaven.javadoc.skip=true | ||
-Dgpg.skip=true | ||
--toolchains .github/workflows/.toolchains.xml | ||
- name: Test & Report | ||
if: ${{ matrix.jdk == 8 && success() }} | ||
run: > | ||
mvn verify coveralls:report -B -V | ||
-Dcoveralls-repo-token=${repo_token} | ||
-Dmaven.javadoc.skip=true | ||
-Dgpg.skip=true | ||
--toolchains .github/workflows/.toolchains.xml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
########################################################################################## | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
########################################################################################## | ||
|
||
######################################################################################### | ||
# Use the extraction block to define changes to the default code extraction process # | ||
# for one or more languages. The settings for each language are defined in a child # | ||
# block, with one or more steps. # | ||
######################################################################################### | ||
|
||
extraction: | ||
|
||
# Define settings for Java analysis | ||
#################################### | ||
java: | ||
# The `index` step extracts information from the files in the codebase. | ||
index: | ||
# Specify the Java version required to build the project. | ||
java_version: 8 | ||
# Specify Maven settings. | ||
maven: | ||
# Specify the path of a Maven toolchains file. | ||
# Default: Maven uses a toolchains file in the default location, if it exists. | ||
toolchains_file: .github/workflows/.toolchains.xml | ||
|
||
# Define settings for JavaScript analysis | ||
########################################## | ||
javascript: | ||
|
||
# The `index` step extracts information from the files in the codebase. | ||
index: | ||
# Specify a list of files and folders to exclude from extraction. | ||
exclude: | ||
- **/*/site | ||
# Specify a list of glob patterns to include/exclude files from extraction; this | ||
# is applied on top of the include/exclude paths from above; patterns are | ||
# processed in the same way as for path classifiers above. | ||
# Default: include all files with known extensions (such as .js, .ts and .html), | ||
# but exclude files ending in `-min.js` or `.min.js` and folders named `node_modules` | ||
# or `bower_components` | ||
filters: | ||
# exclude any *.js files anywhere. | ||
- exclude: "**/*.js" | ||
# exclude any *.html files anywhere. | ||
- exclude: "**/*.html" |
Oops, something went wrong.