Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support newer java versions #131

Merged
merged 30 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8cacd72
Set version to 2.0.0-SNAPSHOT
davecromberge Jun 11, 2021
e380337
Introduce maven multi-module configuration
davecromberge Jun 14, 2021
aed6050
Split java8 maven module
davecromberge Jun 14, 2021
69b8324
Add datasketches-memory module
davecromberge Jun 16, 2021
b1cda03
Add java9 module scaffolding
davecromberge Jun 17, 2021
352dddd
Add support for Multi-Release JAR assembly
davecromberge Jun 17, 2021
3664b8d
Add support for Java 9 and Java 10
davecromberge Jun 17, 2021
2ac0b35
Add support for Java Platform Module System
davecromberge Jun 17, 2021
14156da
Add datasketches-memory-tests maven module
davecromberge Jun 17, 2021
4379db0
Use dynamic profiles when testing the assembled JAR
davecromberge Jun 17, 2021
0f993f5
Add support for Java 11
davecromberge Jun 17, 2021
52c7af8
Update IDE documentation
davecromberge Jun 17, 2021
facb373
Remove slf4j dependency
davecromberge Jun 17, 2021
5af68db
Use aggregate test coverage report for coveralls
davecromberge Jun 17, 2021
3e90f64
Use Github actions matrix build
davecromberge Jun 17, 2021
636d7ce
Add java 9 toolchain
davecromberge Jun 17, 2021
50538fa
Adjust activation string for strict profile
davecromberge Jun 17, 2021
6cad71a
Add initial LGTM project settings
davecromberge Jun 18, 2021
c6ee82e
Correct toolchains location
davecromberge Jun 21, 2021
deabfa1
Checkstyle fixes and formatting changes
davecromberge Jun 21, 2021
68831b5
Update dependencies
davecromberge Jun 21, 2021
3babd27
Remove unused add-opens from assembly tests
davecromberge Jun 22, 2021
d958474
Introduce transient dependency scope
davecromberge Jun 22, 2021
412a39e
Support maven nexus deployment
davecromberge Jun 23, 2021
468a62d
Use maven aggregation over inheritance
davecromberge Jun 24, 2021
ff6b389
Additional matrix test versions
davecromberge Jun 24, 2021
971731a
Remove additonal matrix tests
davecromberge Jun 24, 2021
8f47110
Explicit toolchain version in github actions
davecromberge Jun 24, 2021
e6632b3
Instructions for javadoc command
davecromberge Jun 30, 2021
eac2025
Remove maven help plugin and align poms
davecromberge Jul 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions .github/workflows/.toolchains.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,50 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA8_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>8</version>
<vendor>adoptopenjdk</vendor>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA8_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>9</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA9_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>10</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${JAVA_HOME}</jdkHome>
<jdkHome>${env.JAVA10_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
<vendor>adoptopenjdk</vendor>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA11_HOME}</jdkHome>
Expand All @@ -23,21 +53,21 @@
<toolchain>
<type>jdk</type>
<provides>
<version>15</version>
<vendor>adoptopenjdk</vendor>
<version>12</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA15_HOME}</jdkHome>
<jdkHome>${env.JAVA12_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>16</version>
<vendor>adoptopenjdk</vendor>
<version>13</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA16_HOME}</jdkHome>
<jdkHome>${env.JAVA13_HOME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
163 changes: 116 additions & 47 deletions .github/workflows/maven.yml
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
60 changes: 60 additions & 0 deletions .lgtm.yml
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"
Loading