Prepare for release 0.60.5 #1062
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
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | |
# Yes, booleans used here are 'strings' despite the type of input being declared as boolean because… well, see here: | |
# https://docs.github.com/en/actions/learn-github-actions/expressions | |
# https://github.com/marketplace/actions/gradle-build-action | |
name: Check build and tests of plugins and samples | |
on: | |
workflow_dispatch: | |
inputs: | |
check-for-memory-leaks: | |
description: "Check for memory leaks" | |
required: true | |
type: boolean | |
default: true | |
run-refreshVersions-task: | |
description: "Run the refreshVersions task" | |
required: true | |
type: boolean | |
default: false | |
sample-kotlin: | |
description: "Enable sample-kotlin" | |
required: true | |
type: boolean | |
default: true | |
sample-groovy: | |
description: "Enable sample-groovy" | |
required: true | |
type: boolean | |
default: true | |
sample-multi-modules: | |
description: "Enable sample-multi-modules" | |
required: true | |
type: boolean | |
default: true | |
sample-kotlin-js: | |
description: "Enable sample-kotlin-js" | |
required: true | |
type: boolean | |
default: true | |
sample-android: | |
description: "Enable sample-android" | |
required: true | |
type: boolean | |
default: false | |
run-on: | |
type: choice | |
description: "Where to run this workflow" | |
default: 'ubuntu-latest' | |
required: true | |
options: | |
- windows-2022 | |
- windows-2019 | |
- windows-latest | |
- macos-12 | |
- macos-11 | |
- macos-10.5 | |
- macos-latest | |
- ubuntu-22.04 | |
- ubuntu-20.04 | |
- ubuntu-18.04 | |
- ubuntu-latest | |
pull_request: | |
paths: | |
- 'plugins/**' | |
- 'sample-kotlin/**' | |
- 'sample-groovy/**' | |
- '!**.md' | |
- '!.editorconfig' | |
- '!**/.gitignore' | |
- '!**.adoc' | |
- '!docs/**' | |
push: | |
branches: | |
- main | |
paths: | |
- 'plugins/**' | |
- 'sample-kotlin/**' | |
- 'sample-groovy/**' | |
- '!**.md' | |
- '!.editorconfig' | |
- '!**/.gitignore' | |
- '!**.adoc' | |
- '!docs/**' | |
jobs: | |
check-all: | |
env: | |
GPG_key_id: ${{ secrets.GPG_KEY_ID }} | |
GPG_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_private_password: ${{ secrets.GPG_PRIVATE_PASSWORD }} | |
runs-on: ${{ github.event.inputs.run-on || 'ubuntu-latest' }} | |
steps: | |
- name: "Enable long paths for git Windows" | |
if: ${{ runner.os == 'Windows' }} | |
run: git config --global core.longpaths true | |
- uses: actions/checkout@v2 | |
- name: "Configure JDK" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: "Check plugins and publish them to MavenLocal" | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: plugins/gradlew | |
build-root-directory: plugins | |
arguments: check publishToMavenLocal --stacktrace --daemon | |
- name: "Configure JDK for old Gradle" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: "Run refreshVersions on sample-kotlin" | |
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.sample-kotlin == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-kotlin/gradlew | |
build-root-directory: sample-kotlin | |
arguments: refreshVersions --stacktrace --daemon | |
- name: "Check sample-kotlin" | |
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.sample-kotlin == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-kotlin/gradlew | |
build-root-directory: sample-kotlin | |
arguments: check --stacktrace --configuration-cache --daemon | |
- name: "Configure JDK back for new Gradle" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: "Check for memory leaks" | |
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.check-for-memory-leaks == 'true' }} | |
working-directory: sample-groovy | |
run: ./counted-stress-test.sh 10 ./gradlew --daemon -Dorg.gradle.jvmargs="-Xmx150M" | |
- name: "Run refreshVersions on sample-groovy" | |
if: ${{ github.event.inputs.sample-groovy == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-groovy/gradlew | |
build-root-directory: sample-groovy | |
arguments: refreshVersions --stacktrace --daemon | |
- name: "Check sample-groovy" | |
if: ${{ github.event.inputs.sample-groovy == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-groovy/gradlew | |
build-root-directory: sample-groovy | |
arguments: check --stacktrace --daemon | |
- name: "Check buildSrc of sample-groovy (simulates IDE Gradle sync)" | |
if: ${{ github.event.inputs.sample-groovy == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-groovy/gradlew | |
build-root-directory: sample-groovy/buildSrc | |
arguments: help --stacktrace --daemon | |
- name: "Run refreshVersions on sample-multi-modules" | |
if: ${{ github.event.inputs.sample-multi-modules == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-multi-modules/gradlew | |
build-root-directory: sample-multi-modules | |
arguments: refreshVersions --stacktrace --daemon | |
- name: "Check sample-multi-modules" | |
if: ${{ github.event.inputs.sample-multi-modules == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-multi-modules/gradlew | |
build-root-directory: sample-multi-modules | |
arguments: check --stacktrace --daemon | |
- name: "Run refreshVersions on sample-kotlin-js" | |
if: ${{ github.event.inputs.sample-kotlin-js == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-kotlin-js/gradlew | |
build-root-directory: sample-kotlin-js | |
arguments: refreshVersions --stacktrace --daemon | |
- name: "Check sample-kotlin-js" | |
if: ${{ github.event.inputs.sample-kotlin-js == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-kotlin-js/gradlew | |
build-root-directory: sample-kotlin-js | |
arguments: check --stacktrace --daemon | |
- name: "Run refreshVersions on sample-android" | |
if: ${{ github.event.inputs.sample-android == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-android/gradlew | |
build-root-directory: sample-android | |
arguments: refreshVersions --stacktrace --daemon | |
- name: "Check sample-android" | |
if: ${{ github.event.inputs.sample-android == 'true' }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-executable: sample-android/gradlew | |
build-root-directory: sample-android | |
arguments: check --stacktrace --daemon | |
- name: "Stop Gradle daemon" | |
working-directory: plugins | |
run: ./gradlew --stop |