You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2020/05/01 07:45:35 UTC
[incubator-tuweni] branch master updated: use multiple jobs (#76)
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
The following commit(s) were added to refs/heads/master by this push:
new 8bb12d4 use multiple jobs (#76)
8bb12d4 is described below
commit 8bb12d442f6ac43e1ea616e0cc2e5d1fcb1e73ee
Author: Antoine Toulme <at...@users.noreply.github.com>
AuthorDate: Fri May 1 00:45:27 2020 -0700
use multiple jobs (#76)
* use multiple jobs
* fine tune build
* rat depends on spotlessCheck
* fix wildcard
* fix wildcard
* fix wildcard
---
.github/pull_request_template.md | 17 ----------
.github/workflows/master-pr-build.yml | 64 ++++++++++++++++++++++++++++-------
build.gradle | 28 ++++++++-------
gradle/rat.gradle | 1 -
4 files changed, 67 insertions(+), 43 deletions(-)
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index f225d15..e035359 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -6,20 +6,3 @@
## Fixed Issue(s)
<!-- Please link to fixed issue(s) here using format: fixes #<issue number> -->
<!-- Example: "fixes #2" -->
-
-<!--
- 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.
--->
\ No newline at end of file
diff --git a/.github/workflows/master-pr-build.yml b/.github/workflows/master-pr-build.yml
index be88761..0e796e7 100644
--- a/.github/workflows/master-pr-build.yml
+++ b/.github/workflows/master-pr-build.yml
@@ -24,7 +24,28 @@ on:
branches: [ master ]
jobs:
- build:
+ checks:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ '1.11' ]
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ submodules: true
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: gradle checks
+ uses: eskatos/gradle-command-action@v1
+ with:
+ gradle-version: 6.3
+ arguments: rat spotlessCheck checkLicenses
+# Disable for now
+# - name: Collect JUnit tests
+# uses: danger/danger-js@9.1.8
+ assemble:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -49,29 +70,48 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/dependency-versions.gradle') }}
restore-keys: ${{ runner.os }}-m2
- - name: gradle checks
- uses: eskatos/gradle-command-action@v1
- with:
- gradle-version: 6.3
- arguments: spotlessCheck checkLicenses
- name: gradle assemble
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 6.3
arguments: assemble -x test
- - uses: actions/upload-artifact@v1
+ - name: Upload build
+ uses: actions/upload-artifact@v1
with:
name: Libs
path: build/libs
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ '1.11' ]
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ submodules: true
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache Gradle packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.gradle/caches
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
+ restore-keys: ${{ runner.os }}-gradle
+ - name: Cache Maven Repository
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/dependency-versions.gradle') }}
+ restore-keys: ${{ runner.os }}-m2
- name: gradle test
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 6.3
arguments: test
- - uses: actions/upload-artifact@v1
+ - name: Upload test reports
+ uses: actions/upload-artifact@v2
with:
name: Reports
- path: build/reports
-# Disable for now
-# - name: Collect JUnit tests
-# uses: danger/danger-js@9.1.8
\ No newline at end of file
+ path: "**/build/reports"
diff --git a/build.gradle b/build.gradle
index 83d6ed3..5d5638b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -120,11 +120,13 @@ if (file('.git').exists()) {
'hard_example.toml',
'toml-v0.5.0-spec-example.toml',
'eth2-reference-tests/**',
- 'package-lock.json'
+ 'package-lock.json',
+ '.github/pull_request_template.md'
])
return list
}
}
+ spotlessCheck.dependsOn rat
}
//////
@@ -314,23 +316,23 @@ allprojects {
// Artifact locations
jar {
- destinationDir = file("${rootProject.buildDir}/libs")
+ destinationDirectory = file("${rootProject.buildDir}/libs")
}
task sourcesJar(type: Jar, dependsOn: classes) {
- destinationDir = file("${rootProject.buildDir}/src")
+ destinationDirectory = file("${rootProject.buildDir}/src")
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
- destinationDir = file("${rootProject.buildDir}/docs")
+ destinationDirectory = file("${rootProject.buildDir}/docs")
classifier = 'javadoc'
- from javadoc.destinationDir
+ from javadoc.outputDirectory
}
task dokkaJar(type: Jar, dependsOn: dokka) {
- destinationDir = file("${rootProject.buildDir}/docs")
+ destinationDirectory = file("${rootProject.buildDir}/docs")
classifier = 'dokka'
from dokka.outputDirectory
}
@@ -341,12 +343,12 @@ allprojects {
tasks.withType(Jar) {
if (rootProject == project) {
- baseName = project.name
+ archiveBaseName = project.name
} else {
- baseName = rootProject.name + '-' + project.name
+ archiveBaseName = rootProject.name + '-' + project.name
}
manifest {
- attributes('Implementation-Title': baseName,
+ attributes('Implementation-Title': archiveBaseName,
'Implementation-Version': project.version)
}
from(rootProject.projectDir) {
@@ -414,11 +416,11 @@ allprojects {
}
artifact dokkaJar { classifier 'javadoc' }
groupId 'org.apache.tuweni'
- artifactId project.jar.baseName
+ artifactId project.jar.archiveBaseName.toString()
version project.version
pom {
- name = project.jar.baseName
+ name = project.jar.archiveBaseName
afterEvaluate { description = project.description }
url = 'https://github.com/apache/incubator-tuweni'
licenses {
@@ -622,9 +624,9 @@ dokka {
}
dokkaJar {
- baseName = rootProject.name
+ archiveBaseName = rootProject.name
manifest {
- attributes('Implementation-Title': baseName,
+ attributes('Implementation-Title': archiveBaseName,
'Implementation-Version': project.version)
}
}
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
index 070797e..93f43c5 100644
--- a/gradle/rat.gradle
+++ b/gradle/rat.gradle
@@ -104,7 +104,6 @@ class RatPlugin implements Plugin<Project> {
type: RatTask,
group: 'Build',
description: 'Runs Apache Rat checks.')
- project.tasks[JavaPlugin.TEST_TASK_NAME].dependsOn ratTask
}
void configureDependencies(final Project project) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org