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

[MINOR] Update java language level #1430

Merged
merged 4 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/applicationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ on:
- main

jobs:
applicationsTests:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
name: Ap Test ${{ matrix.tests }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Cache Maven Dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-test-${{ hashFiles('**/pom.xml') }}
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,37 @@ on:

jobs:
build:
name: ${{ matrix.os }} Java ${{ matrix.java }} ${{ matrix.javadist }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
# macOS-latest,
macOS-latest,
windows-latest
]
java: [
# '8',
'11',
# '16'
]
javadist: [
# 'adopt',
'adopt-openj9',
# 'zulu',
# 'temurin'
]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Maven Dependencies
uses: actions/cache@v1
- name: Setup Java ${{ matrix.java }} ${{ matrix.javadist }}
uses: actions/setup-java@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: ${{ matrix.javadist }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build
run: mvn package -P rat
run: mvn package
22 changes: 9 additions & 13 deletions .github/workflows/componentTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,25 @@ on:
- main

jobs:
componentTests:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
name: Component Tests ${{ matrix.os }}
java: ['11']
javadist: ['adopt-openj9']
name: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java 1.8
uses: actions/setup-java@v1
- name: Setup Java ${{ matrix.java }} ${{ matrix.javadist }}
uses: actions/setup-java@v2
with:
java-version: 1.8

- name: Cache Maven Dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-test-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-test-
distribution: ${{ matrix.javadist }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Component Tests
run: ./docker/entrypoint.sh org.apache.sysds.test.component.**
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@ on:
- main

jobs:
documentation1:
runs-on: ubuntu-latest
name: Documentation Java
doc1:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['11']
javadist: ['adopt-openj9']
name: Java
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache Maven Dependencies
uses: actions/cache@v1
- name: Setup Java ${{ matrix.java }} ${{ matrix.javadist }}
uses: actions/setup-java@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: ${{ matrix.javadist }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Make Documentation SystemDS Java
run: mvn -ntp -P distribution package

documentation2:
doc2:
runs-on: ubuntu-latest
name: Documentation Python
name: Python
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -73,7 +73,7 @@ jobs:
architecture: 'x64'

- name: Cache Pip Dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('src/main/python/docs/requires-docs.txt') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/functionsTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
- main

jobs:
applicationsTests:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
Expand All @@ -65,13 +65,13 @@ jobs:
"**.functions.unary.matrix.**"
]
os: [ubuntu-latest]
name: Function Test ${{ matrix.tests }}
name: ${{ matrix.tests }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Cache Maven Dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-test-${{ hashFiles('**/pom.xml') }}
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#-------------------------------------------------------------
#
# 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.
#
#-------------------------------------------------------------

name: LicenseCheck

on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.html'
- 'src/main/python/docs/**'
- 'dev/**'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.html'
- 'src/main/python/docs/**'
- 'dev/**'
branches:
- main

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['11']
javadist: ['adopt-openj9']

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java ${{ matrix.java }} ${{ matrix.javadist }}
uses: actions/setup-java@v2
with:
distribution: ${{ matrix.javadist }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build
run: mvn package -P rat
44 changes: 19 additions & 25 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,59 +42,53 @@ on:
- main

jobs:
applicationsTests:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: [ubuntu-latest]
java: [ 11 ]
name: Python Test
java: ['11']
javadist: ['adopt-openj9']

name: ${{ matrix.os }} Java ${{ matrix.java }} ${{ matrix.javadist }} Python ${{ matrix.python-version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v1
- name: Setup Java ${{ matrix.java }} ${{ matrix.javadist }}
uses: actions/setup-java@v2
with:
distribution: ${{ matrix.javadist }}
java-version: ${{ matrix.java }}

- name: Cache Maven Dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
cache: 'maven'

- name: Cache Pip Dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('src/main/python/setup.py') }}

- name: Cache MNIST
uses: actions/cache@v1
with:
path: src/main/python/systemds/examples/tutorials/mnist
key: ${{ runner.os }}-mnist-${{ hashFiles('src/main/python/systemds/examples/tutorials/mnist.py') }}

- name: Cache Adult/Census
uses: actions/cache@v1
- name: Cache Datasets
uses: actions/cache@v2
with:
path: src/main/python/systemds/examples/tutorials/adult/data.zip
key: ${{ runner.os }}-adult-${{ hashFiles('src/main/python/systemds/examples/tutorials/adult.py') }}
path: |
src/main/python/systemds/examples/tutorials/mnist
src/main/python/systemds/examples/tutorials/adult/data.zip
key: ${{ runner.os }}-mnist-${{ hashFiles('src/main/python/systemds/examples/tutorials/mnist.py') }}-${{ hashFiles('src/main/python/systemds/examples/tutorials/adult.py') }}

- name: Cache Deb Dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/python.yml') }}

- name: Maven clean & package
run: mvn -ntp clean package -P distribution

- name: Setup Python
uses: actions/setup-python@v1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
Expand Down
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
<enableGPU>false</enableGPU>
<jcuda.scope>provided</jcuda.scope>
<jcuda.version>10.2.0</jcuda.version>
<!-- Set java compile level via argument, ex: 1.8 1.9 10 11-->
<java.level>1.8</java.level>
<!-->Testing settings<!-->
<maven.test.skip>true</maven.test.skip>
<rerun.failing.tests.count>2</rerun.failing.tests.count>
Expand Down Expand Up @@ -234,8 +236,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version><!--$NO-MVN-MAN-VER$-->
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.level}</source>
<target>${java.level}</target>
</configuration>
</plugin>

Expand Down Expand Up @@ -365,7 +367,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.7</version>
<configuration>
<includes>
<include>${jacoco.include}</include>
Expand Down Expand Up @@ -400,8 +402,8 @@
<version>3.2.0</version>
<configuration>
<quiet>true</quiet>
<!-- Skip java docs creation if not explicitly asked, to create use -P distribution-->
<skip>true</skip>
<source>8</source> <!-- TODO migrate to 11 -->
</configuration>
</plugin>

Expand Down Expand Up @@ -744,6 +746,7 @@
<quiet>true</quiet>
<skip>false</skip>
<show>public</show>
<source>${java.level}</source>
</configuration>
<executions>
<execution>
Expand Down