Allow triggering build-mkdocs-website.yml manually #1077
This file contains hidden or 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@v5 | |
| - name: "Configure JDK" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: "Setup Gradle" | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: "Check plugins and publish them to MavenLocal" | |
| working-directory: plugins | |
| run: ./gradlew check publishToMavenLocal --stacktrace --daemon | |
| - name: "Configure JDK for old Gradle" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - 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' }} | |
| working-directory: sample-kotlin | |
| run: ./gradlew refreshVersions --stacktrace --daemon | |
| - name: "Check sample-kotlin" | |
| if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.sample-kotlin == 'true' }} | |
| working-directory: sample-kotlin | |
| run: ./gradlew check --stacktrace --configuration-cache --daemon | |
| - name: "Configure JDK back for new Gradle" | |
| uses: actions/setup-java@v4 | |
| 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' }} | |
| working-directory: sample-groovy | |
| run: ./gradlew refreshVersions --stacktrace --daemon | |
| - name: "Check sample-groovy" | |
| if: ${{ github.event.inputs.sample-groovy == 'true' }} | |
| working-directory: sample-groovy | |
| run: ./gradlew check --stacktrace --daemon | |
| - name: "Check buildSrc of sample-groovy (simulates IDE Gradle sync)" | |
| if: ${{ github.event.inputs.sample-groovy == 'true' }} | |
| working-directory: sample-groovy | |
| run: ./gradlew 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' }} | |
| working-directory: sample-multi-modules | |
| run: ./gradlew help refreshVersions --stacktrace --daemon | |
| - name: "Check sample-multi-modules" | |
| if: ${{ github.event.inputs.sample-multi-modules == 'true' }} | |
| working-directory: sample-multi-modules | |
| run: ./gradlew 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' }} | |
| working-directory: sample-kotlin-js | |
| run: ./gradlew refreshVersions --stacktrace --daemon | |
| - name: "Check sample-kotlin-js" | |
| if: ${{ github.event.inputs.sample-kotlin-js == 'true' }} | |
| working-directory: sample-kotlin-js | |
| run: ./gradlew check --stacktrace --daemon | |
| - name: "Run refreshVersions on sample-android" | |
| if: ${{ github.event.inputs.sample-android == 'true' && github.event.inputs.run-refreshVersions-task == 'true' }} | |
| working-directory: sample-android | |
| run: ./gradlew refreshVersions --stacktrace --daemon | |
| - name: "Check sample-android" | |
| if: ${{ github.event.inputs.sample-android == 'true' }} | |
| working-directory: sample-android | |
| run: ./gradlew check --stacktrace --daemon | |
| - name: "Stop Gradle daemon" | |
| working-directory: plugins | |
| run: ./gradlew --stop |