Compare commits
No commits in common. "e5cb0bd9035632da0ee0531673f9e43359ed743c" and "38dee4d2363e7badb610849078e0320656c0f6ec" have entirely different histories.
e5cb0bd903
...
38dee4d236
2 changed files with 19 additions and 54 deletions
43
.github/workflows/gradle.yml
vendored
43
.github/workflows/gradle.yml
vendored
|
@ -1,34 +1,22 @@
|
||||||
name: gradle-ci
|
name: gradle-ci
|
||||||
|
|
||||||
on:
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
java-version: [ 11, 17, 20 ]
|
|
||||||
os:
|
|
||||||
- macos-latest
|
|
||||||
- ubuntu-latest
|
|
||||||
- windows-latest
|
|
||||||
fail-fast: false
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
env:
|
env:
|
||||||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java-version: [ 11, 17, 20 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
|
@ -36,19 +24,10 @@ jobs:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
- name: Validate Gradle wrapper
|
- name: Grant execute permission for gradlew
|
||||||
uses: gradle/wrapper-validation-action@v1
|
run: chmod +x gradlew
|
||||||
|
|
||||||
- name: Cache Kotlin Konan
|
|
||||||
id: cache-kotlin-konan
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.konan/**/*
|
|
||||||
key: kotlin-konan-${{ runner.os }}
|
|
||||||
|
|
||||||
- name: Test with Gradle
|
- name: Test with Gradle
|
||||||
uses: gradle/gradle-build-action@v2
|
uses: gradle/gradle-build-action@v2
|
||||||
with:
|
with:
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
arguments: build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
arguments: build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
||||||
|
|
|
@ -3,10 +3,7 @@ package buildsrc.conventions.lang
|
||||||
import buildsrc.utils.Rife2TestListener
|
import buildsrc.utils.Rife2TestListener
|
||||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
|
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +22,7 @@ plugins {
|
||||||
|
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
//jvmToolchain(11)
|
jvmToolchain(11)
|
||||||
|
|
||||||
targets.configureEach {
|
targets.configureEach {
|
||||||
compilations.configureEach {
|
compilations.configureEach {
|
||||||
|
@ -52,22 +49,11 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks.withType<Test>().configureEach {
|
||||||
withType<JavaCompile>().configureEach {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
|
||||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
withType<KotlinJvmCompile>().configureEach {
|
|
||||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
|
|
||||||
}
|
|
||||||
|
|
||||||
withType<Test>().configureEach {
|
|
||||||
val testsBadgeApiKey = providers.gradleProperty("testsBadgeApiKey")
|
val testsBadgeApiKey = providers.gradleProperty("testsBadgeApiKey")
|
||||||
addTestListener(Rife2TestListener(testsBadgeApiKey))
|
addTestListener(Rife2TestListener(testsBadgeApiKey))
|
||||||
testLogging {
|
testLogging {
|
||||||
exceptionFormat = TestExceptionFormat.FULL
|
exceptionFormat = TestExceptionFormat.FULL
|
||||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue