From 9169d368800d1a615cf7acd7201c65d113b719ec Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 05:00:05 -0600 Subject: [PATCH 01/13] Consolidate 'dependency-submission' tests into integ-test workflow --- .github/workflows/ci-dependency-review.yml | 28 -------- .../workflows/dependency-submission-save.yml | 25 ------- .../dependency-submission-submit.yml | 23 ------- .github/workflows/dependency-submission.yml | 65 ------------------- .../integ-test-dependency-submission.yml | 42 +++++++++++- 5 files changed, 41 insertions(+), 142 deletions(-) delete mode 100644 .github/workflows/ci-dependency-review.yml delete mode 100644 .github/workflows/dependency-submission-save.yml delete mode 100644 .github/workflows/dependency-submission-submit.yml delete mode 100644 .github/workflows/dependency-submission.yml diff --git a/.github/workflows/ci-dependency-review.yml b/.github/workflows/ci-dependency-review.yml deleted file mode 100644 index b31c1ee..0000000 --- a/.github/workflows/ci-dependency-review.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Dependency Review Action -# -# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. -# -# Source repository: https://github.com/actions/dependency-review-action -# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: CI-dependency-review -on: [pull_request] - -permissions: - contents: write - -jobs: - dependency-review: - runs-on: ubuntu-latest - steps: - - name: 'Checkout Repository' - uses: actions/checkout@v4 - - name: Dependencies for groovy-dsl - uses: ./dependency-submission - with: - build-root-directory: .github/workflow-samples/groovy-dsl - - name: Dependencies for kotlin-dsl - uses: ./dependency-submission - with: - build-root-directory: .github/workflow-samples/kotlin-dsl - - name: 'Dependency Review' - uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/dependency-submission-save.yml b/.github/workflows/dependency-submission-save.yml deleted file mode 100644 index 8d70dfa..0000000 --- a/.github/workflows/dependency-submission-save.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Test dependency-submission save - -on: - workflow_dispatch: - push: - -permissions: - contents: read - -jobs: - dependency-submission-save: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Generate and save dependency graph - uses: ./dependency-submission - with: - build-root-directory: .github/workflow-samples/groovy-dsl - dependency-graph: generate-and-upload - env: - GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository diff --git a/.github/workflows/dependency-submission-submit.yml b/.github/workflows/dependency-submission-submit.yml deleted file mode 100644 index 021404e..0000000 --- a/.github/workflows/dependency-submission-submit.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Test dependency-submission submit - -on: - workflow_run: - workflows: ['Test dependency-submission save'] - types: [completed] - -permissions: - contents: write - -jobs: - dependency-submission-submit: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Download and submit dependency graph - uses: ./dependency-submission - with: - dependency-graph: download-and-submit diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml deleted file mode 100644 index 3726777..0000000 --- a/.github/workflows/dependency-submission.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Test dependency-submission - -on: - workflow_dispatch: - push: - -permissions: - contents: write - -jobs: - test-dependency-submission: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Generate and submit dependencies - uses: ./dependency-submission - with: - build-root-directory: .github/workflow-samples/groovy-dsl - env: - GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository - - test-gradle-versions: - strategy: - fail-fast: false - matrix: - gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1] - include: - - gradle: 5.6.4 - build-root-suffix: -gradle-5 - - gradle: 5.2.1 - build-root-suffix: -gradle-5 - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Generate and submit dependencies - uses: ./dependency-submission - with: - gradle-version: ${{ matrix.gradle }} - build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }} - env: - GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository - - test-after-setup-gradle: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Setup Gradle - uses: ./setup-gradle - - name: Generate and submit dependencies - id: dependency-submission - uses: ./dependency-submission - with: - build-root-directory: .github/workflow-samples/groovy-dsl diff --git a/.github/workflows/integ-test-dependency-submission.yml b/.github/workflows/integ-test-dependency-submission.yml index 9db76d8..0f67512 100644 --- a/.github/workflows/integ-test-dependency-submission.yml +++ b/.github/workflows/integ-test-dependency-submission.yml @@ -18,6 +18,7 @@ permissions: env: DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} + GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a fake ref to avoid updating the real dependency graph for the repository jobs: groovy-generate-and-upload: @@ -194,4 +195,43 @@ jobs: echo "Expected no dependency graph files to be generated" ls -l dependency-graph-reports exit 1 - fi + fi + + gradle-versions: + strategy: + fail-fast: false + matrix: + gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1] + include: + - gradle: 5.6.4 + build-root-suffix: -gradle-5 + - gradle: 5.2.1 + build-root-suffix: -gradle-5 + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Initialize integ-test + uses: ./.github/actions/init-integ-test + + - name: Generate and submit dependencies + uses: ./dependency-submission + with: + gradle-version: ${{ matrix.gradle }} + build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }} + + after-setup-gradle: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Initialize integ-test + uses: ./.github/actions/init-integ-test + + - name: Setup Gradle + uses: ./setup-gradle + - name: Generate and submit dependencies + id: dependency-submission + uses: ./dependency-submission + with: + build-root-directory: .github/workflow-samples/groovy-dsl From 0ebfbb8f41fc0197e952107e33b9aea8b3875bea Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 05:06:37 -0600 Subject: [PATCH 02/13] Always build 'dist' directory for integ-tests --- .github/actions/init-integ-test/action.yml | 4 +-- .github/workflows/ci-full-check.yml | 26 +++++++++++++++++++ .github/workflows/ci-quick-check.yml | 20 -------------- .../workflows/integ-test-action-inputs.yml | 4 --- .../workflows/integ-test-cache-cleanup.yml | 4 --- .../workflows/integ-test-caching-config.yml | 4 --- .../workflows/integ-test-dependency-graph.yml | 4 --- ...eg-test-dependency-submission-failures.yml | 4 --- .../integ-test-dependency-submission.yml | 7 ++--- .../integ-test-detect-java-toolchains.yml | 4 --- .../integ-test-execution-with-caching.yml | 4 --- .github/workflows/integ-test-execution.yml | 4 --- .../integ-test-inject-develocity.yml | 4 --- .../integ-test-provision-gradle-versions.yml | 4 --- ...integ-test-restore-configuration-cache.yml | 4 --- ...test-restore-containerized-gradle-home.yml | 4 --- .../integ-test-restore-custom-gradle-home.yml | 4 --- .../integ-test-restore-gradle-home.yml | 4 --- .../integ-test-restore-java-toolchain.yml | 4 --- .../integ-test-sample-gradle-plugin.yml | 4 --- .../integ-test-sample-kotlin-dsl.yml | 4 --- 21 files changed, 29 insertions(+), 96 deletions(-) diff --git a/.github/actions/init-integ-test/action.yml b/.github/actions/init-integ-test/action.yml index 8cf3f0c..8124f3e 100644 --- a/.github/actions/init-integ-test/action.yml +++ b/.github/actions/init-integ-test/action.yml @@ -9,10 +9,8 @@ runs: distribution: 'temurin' java-version: 11 - # Downloads a 'dist' directory artifact that was uploaded in an earlier step - # We control this with an environment variable to allow for easier global configuration. + # Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step - name: Download dist - if: ${{ env.DOWNLOAD_DIST == 'true' }} uses: actions/download-artifact@v4 with: name: dist diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml index d2e3219..915fb56 100644 --- a/.github/workflows/ci-full-check.yml +++ b/.github/workflows/ci-full-check.yml @@ -16,22 +16,34 @@ on: - '**/action.yml' jobs: + build-distribution: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Build and upload distribution + uses: ./.github/actions/build-dist + action-inputs: + needs: build-distribution uses: ./.github/workflows/integ-test-action-inputs.yml with: cache-key-prefix: ${{github.run_number}}- cache-cleanup: + needs: build-distribution uses: ./.github/workflows/integ-test-cache-cleanup.yml with: cache-key-prefix: ${{github.run_number}}- caching-config: + needs: build-distribution uses: ./.github/workflows/integ-test-caching-config.yml with: cache-key-prefix: ${{github.run_number}}- dependency-graph: + needs: build-distribution uses: ./.github/workflows/integ-test-dependency-graph.yml permissions: contents: write @@ -39,6 +51,7 @@ jobs: cache-key-prefix: ${{github.run_number}}- dependency-submission: + needs: build-distribution uses: ./.github/workflows/integ-test-dependency-submission.yml permissions: contents: write @@ -46,21 +59,25 @@ jobs: cache-key-prefix: ${{github.run_number}}- dependency-submission-failures: + needs: build-distribution uses: ./.github/workflows/integ-test-dependency-submission-failures.yml with: cache-key-prefix: ${{github.run_number}}- execution-with-caching: + needs: build-distribution uses: ./.github/workflows/integ-test-execution-with-caching.yml with: cache-key-prefix: ${{github.run_number}}- execution: + needs: build-distribution uses: ./.github/workflows/integ-test-execution.yml with: cache-key-prefix: ${{github.run_number}}- develocity-injection: + needs: build-distribution uses: ./.github/workflows/integ-test-inject-develocity.yml with: cache-key-prefix: ${{github.run_number}}- @@ -68,11 +85,13 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} provision-gradle-versions: + needs: build-distribution uses: ./.github/workflows/integ-test-provision-gradle-versions.yml with: cache-key-prefix: ${{github.run_number}}- restore-configuration-cache: + needs: build-distribution uses: ./.github/workflows/integ-test-restore-configuration-cache.yml with: cache-key-prefix: ${{github.run_number}}- @@ -80,36 +99,43 @@ jobs: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} restore-custom-gradle-home: + needs: build-distribution uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml with: cache-key-prefix: ${{github.run_number}}- restore-containerized-gradle-home: + needs: build-distribution uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml with: cache-key-prefix: ${{github.run_number}}- restore-gradle-home: + needs: build-distribution uses: ./.github/workflows/integ-test-restore-gradle-home.yml with: cache-key-prefix: ${{github.run_number}}- restore-java-toolchain: + needs: build-distribution uses: ./.github/workflows/integ-test-restore-java-toolchain.yml with: cache-key-prefix: ${{github.run_number}}- sample-kotlin-dsl: + needs: build-distribution uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml with: cache-key-prefix: ${{github.run_number}}- sample-gradle-plugin: + needs: build-distribution uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml with: cache-key-prefix: ${{github.run_number}}- toolchain-detection: + needs: build-distribution uses: ./.github/workflows/integ-test-detect-java-toolchains.yml with: cache-key-prefix: ${{github.run_number}}- diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index 32e481f..a90dc80 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -36,14 +36,12 @@ jobs: uses: ./.github/workflows/integ-test-action-inputs.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true cache-cleanup: needs: build-distribution uses: ./.github/workflows/integ-test-cache-cleanup.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run caching-config: @@ -51,7 +49,6 @@ jobs: uses: ./.github/workflows/integ-test-caching-config.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true dependency-graph: needs: build-distribution @@ -60,7 +57,6 @@ jobs: contents: write with: runner-os: '["ubuntu-latest"]' - download-dist: true dependency-submission: needs: build-distribution @@ -69,7 +65,6 @@ jobs: contents: write with: runner-os: '["ubuntu-latest"]' - download-dist: true dependency-submission-failures: needs: build-distribution @@ -78,28 +73,24 @@ jobs: contents: write with: runner-os: '["ubuntu-latest"]' - download-dist: true execution-with-caching: needs: build-distribution uses: ./.github/workflows/integ-test-execution-with-caching.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true execution: needs: build-distribution uses: ./.github/workflows/integ-test-execution.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true develocity-injection: needs: build-distribution uses: ./.github/workflows/integ-test-inject-develocity.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true secrets: DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} @@ -108,60 +99,49 @@ jobs: uses: ./.github/workflows/integ-test-provision-gradle-versions.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true restore-configuration-cache: needs: build-distribution uses: ./.github/workflows/integ-test-restore-configuration-cache.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} restore-containerized-gradle-home: needs: build-distribution uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml - with: - download-dist: true restore-custom-gradle-home: needs: build-distribution uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml - with: - download-dist: true restore-gradle-home: needs: build-distribution uses: ./.github/workflows/integ-test-restore-gradle-home.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true restore-java-toolchain: needs: build-distribution uses: ./.github/workflows/integ-test-restore-java-toolchain.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true sample-kotlin-dsl: needs: build-distribution uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true sample-gradle-plugin: needs: build-distribution uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true toolchain-detection: needs: build-distribution uses: ./.github/workflows/integ-test-detect-java-toolchains.yml with: runner-os: '["ubuntu-latest"]' - download-dist: true diff --git a/.github/workflows/integ-test-action-inputs.yml b/.github/workflows/integ-test-action-inputs.yml index 81c46f2..841c573 100644 --- a/.github/workflows/integ-test-action-inputs.yml +++ b/.github/workflows/integ-test-action-inputs.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-cache-cleanup.yml b/.github/workflows/integ-test-cache-cleanup.yml index d14c98c..575af8b 100644 --- a/.github/workflows/integ-test-cache-cleanup.yml +++ b/.github/workflows/integ-test-cache-cleanup.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: integ-test-cache-cleanup-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-caching-config.yml b/.github/workflows/integ-test-caching-config.yml index a771b1d..cec3ef8 100644 --- a/.github/workflows/integ-test-caching-config.yml +++ b/.github/workflows/integ-test-caching-config.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-caching-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-dependency-graph.yml b/.github/workflows/integ-test-dependency-graph.yml index 8885735..481f89a 100644 --- a/.github/workflows/integ-test-dependency-graph.yml +++ b/.github/workflows/integ-test-dependency-graph.yml @@ -8,15 +8,11 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false permissions: contents: write env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-dependency-submission-failures.yml b/.github/workflows/integ-test-dependency-submission-failures.yml index ac5e7dd..05246e4 100644 --- a/.github/workflows/integ-test-dependency-submission-failures.yml +++ b/.github/workflows/integ-test-dependency-submission-failures.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-dependency-submission.yml b/.github/workflows/integ-test-dependency-submission.yml index 0f67512..68b8598 100644 --- a/.github/workflows/integ-test-dependency-submission.yml +++ b/.github/workflows/integ-test-dependency-submission.yml @@ -8,17 +8,12 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false permissions: contents: write env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} - GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a fake ref to avoid updating the real dependency graph for the repository jobs: groovy-generate-and-upload: @@ -219,6 +214,8 @@ jobs: with: gradle-version: ${{ matrix.gradle }} build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }} + env: + GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository after-setup-gradle: runs-on: ubuntu-latest diff --git a/.github/workflows/integ-test-detect-java-toolchains.yml b/.github/workflows/integ-test-detect-java-toolchains.yml index d08ba8b..f01f93b 100644 --- a/.github/workflows/integ-test-detect-java-toolchains.yml +++ b/.github/workflows/integ-test-detect-java-toolchains.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-execution-with-caching.yml b/.github/workflows/integ-test-execution-with-caching.yml index 08b26cd..f348be4 100644 --- a/.github/workflows/integ-test-execution-with-caching.yml +++ b/.github/workflows/integ-test-execution-with-caching.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true diff --git a/.github/workflows/integ-test-execution.yml b/.github/workflows/integ-test-execution.yml index 9cafa29..0fe6a06 100644 --- a/.github/workflows/integ-test-execution.yml +++ b/.github/workflows/integ-test-execution.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index 75c1ed2..43eccad 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -8,15 +8,11 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false secrets: DEVELOCITY_ACCESS_KEY: required: true env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-provision-gradle-versions.yml b/.github/workflows/integ-test-provision-gradle-versions.yml index 61a5a8b..9024f6b 100644 --- a/.github/workflows/integ-test-provision-gradle-versions.yml +++ b/.github/workflows/integ-test-provision-gradle-versions.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true diff --git a/.github/workflows/integ-test-restore-configuration-cache.yml b/.github/workflows/integ-test-restore-configuration-cache.yml index 7e75ea7..1750ae6 100644 --- a/.github/workflows/integ-test-restore-configuration-cache.yml +++ b/.github/workflows/integ-test-restore-configuration-cache.yml @@ -8,15 +8,11 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false secrets: GRADLE_ENCRYPTION_KEY: required: true env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-restore-containerized-gradle-home.yml b/.github/workflows/integ-test-restore-containerized-gradle-home.yml index 4a177ec..a485494 100644 --- a/.github/workflows/integ-test-restore-containerized-gradle-home.yml +++ b/.github/workflows/integ-test-restore-containerized-gradle-home.yml @@ -5,12 +5,8 @@ on: inputs: cache-key-prefix: type: string - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-restore-custom-gradle-home.yml b/.github/workflows/integ-test-restore-custom-gradle-home.yml index 3ebe4ee..f07131d 100644 --- a/.github/workflows/integ-test-restore-custom-gradle-home.yml +++ b/.github/workflows/integ-test-restore-custom-gradle-home.yml @@ -5,12 +5,8 @@ on: inputs: cache-key-prefix: type: string - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-restore-gradle-home.yml b/.github/workflows/integ-test-restore-gradle-home.yml index 63527a2..0d3ce72 100644 --- a/.github/workflows/integ-test-restore-gradle-home.yml +++ b/.github/workflows/integ-test-restore-gradle-home.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home diff --git a/.github/workflows/integ-test-restore-java-toolchain.yml b/.github/workflows/integ-test-restore-java-toolchain.yml index 43421d2..cd4f82c 100644 --- a/.github/workflows/integ-test-restore-java-toolchain.yml +++ b/.github/workflows/integ-test-restore-java-toolchain.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-sample-gradle-plugin.yml b/.github/workflows/integ-test-sample-gradle-plugin.yml index 9a44b4b..a44d728 100644 --- a/.github/workflows/integ-test-sample-gradle-plugin.yml +++ b/.github/workflows/integ-test-sample-gradle-plugin.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }} jobs: diff --git a/.github/workflows/integ-test-sample-kotlin-dsl.yml b/.github/workflows/integ-test-sample-kotlin-dsl.yml index d3e92f9..ecacb14 100644 --- a/.github/workflows/integ-test-sample-kotlin-dsl.yml +++ b/.github/workflows/integ-test-sample-kotlin-dsl.yml @@ -8,12 +8,8 @@ on: runner-os: type: string default: '["ubuntu-latest", "windows-latest", "macos-latest"]' - download-dist: - type: boolean - default: false env: - DOWNLOAD_DIST: ${{ inputs.download-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }} jobs: From cd54673221db134604bae922f4c961a9f1b4b87f Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 05:45:58 -0600 Subject: [PATCH 03/13] Use runner-os consistently in integ-tests --- .github/workflows/integ-test-caching-config.yml | 2 +- .github/workflows/integ-test-dependency-graph.yml | 6 +++++- .../integ-test-dependency-submission.yml | 15 ++++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integ-test-caching-config.yml b/.github/workflows/integ-test-caching-config.yml index cec3ef8..e1afc0c 100644 --- a/.github/workflows/integ-test-caching-config.yml +++ b/.github/workflows/integ-test-caching-config.yml @@ -100,7 +100,7 @@ jobs: # Test that build scans are captured when caching is disabled because Gradle User Home already exists cache-disabled-pre-existing-gradle-home: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # This test only runs on Ubuntu steps: - name: Checkout sources uses: actions/checkout@v4 diff --git a/.github/workflows/integ-test-dependency-graph.yml b/.github/workflows/integ-test-dependency-graph.yml index 481f89a..5ed3c3f 100644 --- a/.github/workflows/integ-test-dependency-graph.yml +++ b/.github/workflows/integ-test-dependency-graph.yml @@ -116,7 +116,11 @@ jobs: fi config-cache: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: ${{fromJSON(inputs.runner-os)}} + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 diff --git a/.github/workflows/integ-test-dependency-submission.yml b/.github/workflows/integ-test-dependency-submission.yml index 68b8598..3d0835b 100644 --- a/.github/workflows/integ-test-dependency-submission.yml +++ b/.github/workflows/integ-test-dependency-submission.yml @@ -158,7 +158,11 @@ jobs: build-root-directory: .github/workflow-samples/groovy-dsl config-cache: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: ${{fromJSON(inputs.runner-os)}} + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 @@ -196,13 +200,14 @@ jobs: strategy: fail-fast: false matrix: + os: ${{fromJSON(inputs.runner-os)}} gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1] include: - gradle: 5.6.4 build-root-suffix: -gradle-5 - gradle: 5.2.1 build-root-suffix: -gradle-5 - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 @@ -218,7 +223,11 @@ jobs: GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository after-setup-gradle: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: ${{fromJSON(inputs.runner-os)}} + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 From 667e034cd941079383978eed95f81ff982f7ec79 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 05:45:10 -0600 Subject: [PATCH 04/13] Split out test that requires DV access key --- .github/workflows/ci-full-check.yml | 6 +++ .github/workflows/ci-quick-check.yml | 6 +++ .../integ-test-build-scan-publish.yml | 53 +++++++++++++++++++ .../integ-test-inject-develocity.yml | 42 +-------------- 4 files changed, 67 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/integ-test-build-scan-publish.yml diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml index 915fb56..f97146b 100644 --- a/.github/workflows/ci-full-check.yml +++ b/.github/workflows/ci-full-check.yml @@ -30,6 +30,12 @@ jobs: with: cache-key-prefix: ${{github.run_number}}- + build-scan-publish: + needs: build-distribution + uses: ./.github/workflows/integ-test-build-scan-publish.yml + with: + cache-key-prefix: ${{github.run_number}}- + cache-cleanup: needs: build-distribution uses: ./.github/workflows/integ-test-cache-cleanup.yml diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index a90dc80..bdafe89 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -37,6 +37,12 @@ jobs: with: runner-os: '["ubuntu-latest"]' + build-scan-publish: + needs: build-distribution + uses: ./.github/workflows/integ-test-build-scan-publish.yml + with: + runner-os: '["ubuntu-latest"]' + cache-cleanup: needs: build-distribution uses: ./.github/workflows/integ-test-cache-cleanup.yml diff --git a/.github/workflows/integ-test-build-scan-publish.yml b/.github/workflows/integ-test-build-scan-publish.yml new file mode 100644 index 0000000..d0a554a --- /dev/null +++ b/.github/workflows/integ-test-build-scan-publish.yml @@ -0,0 +1,53 @@ +name: Test develocity injection + +on: + workflow_call: + inputs: + cache-key-prefix: + type: string + runner-os: + type: string + default: '["ubuntu-latest", "windows-latest", "macos-latest"]' + +env: + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }} + +jobs: + build-scan-publish: + strategy: + fail-fast: false + matrix: + gradle: [current, 7.6.2, 6.9.4, 5.6.4] + os: ${{fromJSON(inputs.runner-os)}} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Initialize integ-test + uses: ./.github/actions/init-integ-test + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + - name: Setup Gradle + id: setup-gradle + uses: ./setup-gradle + with: + cache-read-only: false # For testing, allow writing cache entries on non-default branches + gradle-version: ${{ matrix.gradle }} + build-scan-publish: true + build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" + build-scan-terms-of-use-agree: "yes" + - name: Run Gradle build + id: gradle + working-directory: .github/workflow-samples/no-ge + run: gradle help + - name: Check Build Scan url + if: ${{ !steps.gradle.outputs.build-scan-url }} + uses: actions/github-script@v7 + with: + script: | + core.setFailed('No Build Scan detected') + diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index 43eccad..de25b5f 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -13,7 +13,7 @@ on: required: true env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }} jobs: inject-develocity: @@ -30,7 +30,7 @@ jobs: gradle: [current, 7.6.2, 6.9.4, 5.6.4] os: ${{fromJSON(inputs.runner-os)}} plugin-version: [3.16.2, 3.17] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 @@ -58,41 +58,3 @@ jobs: with: script: | core.setFailed('No Build Scan detected') - - build-scan-publish: - strategy: - fail-fast: false - matrix: - gradle: [current, 7.6.2, 6.9.4, 5.6.4] - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Initialize integ-test - uses: ./.github/actions/init-integ-test - - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 8 - - name: Setup Gradle - id: setup-gradle - uses: ./setup-gradle - with: - cache-read-only: false # For testing, allow writing cache entries on non-default branches - gradle-version: ${{ matrix.gradle }} - build-scan-publish: true - build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" - build-scan-terms-of-use-agree: "yes" - - name: Run Gradle build - id: gradle - working-directory: .github/workflow-samples/no-ge - run: gradle help - - name: Check Build Scan url - if: ${{ !steps.gradle.outputs.build-scan-url }} - uses: actions/github-script@v7 - with: - script: | - core.setFailed('No Build Scan detected') - From bd3d4b02467ca7249d40c21daa44c980102ff45b Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 05:47:43 -0600 Subject: [PATCH 05/13] Check for secrets when running tests that require them --- .github/workflows/ci-quick-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index bdafe89..d458466 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -93,6 +93,7 @@ jobs: runner-os: '["ubuntu-latest"]' develocity-injection: + if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} needs: build-distribution uses: ./.github/workflows/integ-test-inject-develocity.yml with: @@ -107,6 +108,7 @@ jobs: runner-os: '["ubuntu-latest"]' restore-configuration-cache: + if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} needs: build-distribution uses: ./.github/workflows/integ-test-restore-configuration-cache.yml with: From 8bac4a819c06225e98f1e930db2f3ac806162577 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:01:23 -0600 Subject: [PATCH 06/13] Split out check-and-unit-test into separate workflow --- .github/workflows/ci-check-and-unit-test.yml | 30 ++++++++++++++++++++ .github/workflows/ci-quick-check.yml | 15 ---------- sources/package.json | 9 +++--- 3 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/ci-check-and-unit-test.yml diff --git a/.github/workflows/ci-check-and-unit-test.yml b/.github/workflows/ci-check-and-unit-test.yml new file mode 100644 index 0000000..96a7def --- /dev/null +++ b/.github/workflows/ci-check-and-unit-test.yml @@ -0,0 +1,30 @@ +name: CI-check-and-unit-test + +on: + push: + +permissions: + contents: read + +jobs: + check-format-and-unit-test: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: sources/package-lock.json + + - name: Check formatting and compile + run: | + npm install + npm run check + npm run compile + working-directory: sources + - name: Run unit tests + run: | + npm test + working-directory: sources diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index d458466..aa1410f 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -16,21 +16,6 @@ jobs: - name: Build and upload distribution uses: ./.github/actions/build-dist - run-unit-tests: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Configure Gradle as default for unit test - uses: ./setup-gradle - with: - gradle-version: 8.7 - - name: Run tests - run: | - npm install - npm run all - working-directory: sources - action-inputs: needs: build-distribution uses: ./.github/workflows/integ-test-action-inputs.yml diff --git a/sources/package.json b/sources/package.json index e366242..6c3b53a 100644 --- a/sources/package.json +++ b/sources/package.json @@ -5,17 +5,18 @@ "description": "Execute Gradle Build", "scripts": { "postinstall": "patch-package", - "format": "prettier --write 'src/**/*.ts'", - "format-check": "prettier --check 'src/**/*.ts'", + "prettier-write": "prettier --write 'src/**/*.ts'", + "prettier-check": "prettier --check 'src/**/*.ts'", "lint": "eslint 'src/**/*.ts'", "compile-dependency-submission-main": "ncc build src/dependency-submission/main.ts --out ../dist/dependency-submission/main --source-map --no-source-map-register", "compile-dependency-submission-post": "ncc build src/dependency-submission/post.ts --out ../dist/dependency-submission/post --source-map --no-source-map-register", "compile-setup-gradle-main": "ncc build src/setup-gradle/main.ts --out ../dist/setup-gradle/main --source-map --no-source-map-register", "compile-setup-gradle-post": "ncc build src/setup-gradle/post.ts --out ../dist/setup-gradle/post --source-map --no-source-map-register", "compile": "npm-run-all --parallel compile-*", - "check": "npm-run-all --parallel format lint", + "check": "npm-run-all --parallel prettier-check lint", + "format": "npm-run-all --parallel prettier-write lint", "test": "jest", - "build": "npm run check && npm run compile", + "build": "npm run format && npm run compile", "all": "npm run build && npm test" }, "repository": { From d28f25d60af4ad6e6c25a123f44c7beed72afe92 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:04:32 -0600 Subject: [PATCH 07/13] Cache npm --- .github/actions/build-dist/action.yml | 2 ++ .github/workflows/ci-verify-outputs.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/actions/build-dist/action.yml b/.github/actions/build-dist/action.yml index 5ab27ea..851b943 100644 --- a/.github/actions/build-dist/action.yml +++ b/.github/actions/build-dist/action.yml @@ -6,6 +6,8 @@ runs: - uses: actions/setup-node@v4 with: node-version: 20 + cache: npm + cache-dependency-path: sources/package-lock.json - name: Build distribution shell: bash run: | diff --git a/.github/workflows/ci-verify-outputs.yml b/.github/workflows/ci-verify-outputs.yml index 12dd172..f33cc7d 100644 --- a/.github/workflows/ci-verify-outputs.yml +++ b/.github/workflows/ci-verify-outputs.yml @@ -20,6 +20,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 + cache: npm + cache-dependency-path: sources/package-lock.json - name: Build run: | npm -v From 73638aa3512a046f1e5a6bf372d9032f9ab17afc Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:28:13 -0600 Subject: [PATCH 08/13] Run quick-check only if commit is NOT part of a PR Without a mechanism to check this in the workflow trigger, we instead run the workflow but skip all jobs if the commit belongs to a PR. This effectively means that commits-without-PR will run quick-check, and commits-with-PR will run full-check. --- .github/workflows/ci-full-check.yml | 7 ------- .github/workflows/ci-quick-check.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml index f97146b..b8d1df3 100644 --- a/.github/workflows/ci-full-check.yml +++ b/.github/workflows/ci-full-check.yml @@ -3,17 +3,10 @@ name: CI-full-check on: workflow_dispatch: pull_request: - types: - - assigned - - review_requested push: branches: - main - release/** - paths: - - '.github/**' - - 'dist/**' - - '**/action.yml' jobs: build-distribution: diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index aa1410f..e72b639 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -8,7 +8,18 @@ on: - release/** jobs: + check-for-pr: + runs-on: ubuntu-latest + outputs: + is-pr-commit: ${{ steps.PR.outputs.pr_found }} + steps: + - name: Get current PR details + uses: 8BitJonny/gh-get-current-pr@3.0.0 + id: PR + build-distribution: + needs: check-for-pr + if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }} runs-on: ubuntu-latest steps: - name: Checkout sources From 0979245ebd3d0b07a25f4743729dd62043f555ce Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:50:04 -0600 Subject: [PATCH 09/13] Rename 'check' workflows to 'integ-test' --- .github/workflows/ci-full-check.yml | 7 +- .github/workflows/ci-integ-test-full.yml | 140 ++++++++++++++++++++ .github/workflows/ci-integ-test-quick.yml | 151 ++++++++++++++++++++++ .github/workflows/ci-quick-check.yml | 6 +- 4 files changed, 293 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci-integ-test-full.yml create mode 100644 .github/workflows/ci-integ-test-quick.yml diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml index b8d1df3..accf5c3 100644 --- a/.github/workflows/ci-full-check.yml +++ b/.github/workflows/ci-full-check.yml @@ -1,12 +1,7 @@ -name: CI-full-check +name: X-CI-full-check on: workflow_dispatch: - pull_request: - push: - branches: - - main - - release/** jobs: build-distribution: diff --git a/.github/workflows/ci-integ-test-full.yml b/.github/workflows/ci-integ-test-full.yml new file mode 100644 index 0000000..13f4cd6 --- /dev/null +++ b/.github/workflows/ci-integ-test-full.yml @@ -0,0 +1,140 @@ +name: CI-integ-test-full + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + - release/** + +jobs: + build-distribution: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Build and upload distribution + uses: ./.github/actions/build-dist + + action-inputs: + needs: build-distribution + uses: ./.github/workflows/integ-test-action-inputs.yml + with: + cache-key-prefix: ${{github.run_number}}- + + build-scan-publish: + needs: build-distribution + uses: ./.github/workflows/integ-test-build-scan-publish.yml + with: + cache-key-prefix: ${{github.run_number}}- + + cache-cleanup: + needs: build-distribution + uses: ./.github/workflows/integ-test-cache-cleanup.yml + with: + cache-key-prefix: ${{github.run_number}}- + + caching-config: + needs: build-distribution + uses: ./.github/workflows/integ-test-caching-config.yml + with: + cache-key-prefix: ${{github.run_number}}- + + dependency-graph: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-graph.yml + permissions: + contents: write + with: + cache-key-prefix: ${{github.run_number}}- + + dependency-submission: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-submission.yml + permissions: + contents: write + with: + cache-key-prefix: ${{github.run_number}}- + + dependency-submission-failures: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-submission-failures.yml + with: + cache-key-prefix: ${{github.run_number}}- + + execution-with-caching: + needs: build-distribution + uses: ./.github/workflows/integ-test-execution-with-caching.yml + with: + cache-key-prefix: ${{github.run_number}}- + + execution: + needs: build-distribution + uses: ./.github/workflows/integ-test-execution.yml + with: + cache-key-prefix: ${{github.run_number}}- + + develocity-injection: + needs: build-distribution + uses: ./.github/workflows/integ-test-inject-develocity.yml + with: + cache-key-prefix: ${{github.run_number}}- + secrets: + DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} + + provision-gradle-versions: + needs: build-distribution + uses: ./.github/workflows/integ-test-provision-gradle-versions.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-configuration-cache: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-configuration-cache.yml + with: + cache-key-prefix: ${{github.run_number}}- + secrets: + GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + + restore-custom-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-containerized-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-gradle-home.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-java-toolchain: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-java-toolchain.yml + with: + cache-key-prefix: ${{github.run_number}}- + + sample-kotlin-dsl: + needs: build-distribution + uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml + with: + cache-key-prefix: ${{github.run_number}}- + + sample-gradle-plugin: + needs: build-distribution + uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml + with: + cache-key-prefix: ${{github.run_number}}- + + toolchain-detection: + needs: build-distribution + uses: ./.github/workflows/integ-test-detect-java-toolchains.yml + with: + cache-key-prefix: ${{github.run_number}}- diff --git a/.github/workflows/ci-integ-test-quick.yml b/.github/workflows/ci-integ-test-quick.yml new file mode 100644 index 0000000..f085dc9 --- /dev/null +++ b/.github/workflows/ci-integ-test-quick.yml @@ -0,0 +1,151 @@ +name: CI-integ-test-quick + +on: + workflow_dispatch: + push: + branches-ignore: + - main + - release/** + +jobs: + check-for-pr: + runs-on: ubuntu-latest + outputs: + is-pr-commit: ${{ steps.PR.outputs.pr_found }} + steps: + - name: Get current PR details + uses: 8BitJonny/gh-get-current-pr@3.0.0 + id: PR + + build-distribution: + needs: check-for-pr + if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }} + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Build and upload distribution + uses: ./.github/actions/build-dist + + action-inputs: + needs: build-distribution + uses: ./.github/workflows/integ-test-action-inputs.yml + with: + runner-os: '["ubuntu-latest"]' + + build-scan-publish: + needs: build-distribution + uses: ./.github/workflows/integ-test-build-scan-publish.yml + with: + runner-os: '["ubuntu-latest"]' + + cache-cleanup: + needs: build-distribution + uses: ./.github/workflows/integ-test-cache-cleanup.yml + with: + runner-os: '["ubuntu-latest"]' + cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run + + caching-config: + needs: build-distribution + uses: ./.github/workflows/integ-test-caching-config.yml + with: + runner-os: '["ubuntu-latest"]' + + dependency-graph: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-graph.yml + permissions: + contents: write + with: + runner-os: '["ubuntu-latest"]' + + dependency-submission: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-submission.yml + permissions: + contents: write + with: + runner-os: '["ubuntu-latest"]' + + dependency-submission-failures: + needs: build-distribution + uses: ./.github/workflows/integ-test-dependency-submission-failures.yml + permissions: + contents: write + with: + runner-os: '["ubuntu-latest"]' + + execution-with-caching: + needs: build-distribution + uses: ./.github/workflows/integ-test-execution-with-caching.yml + with: + runner-os: '["ubuntu-latest"]' + + execution: + needs: build-distribution + uses: ./.github/workflows/integ-test-execution.yml + with: + runner-os: '["ubuntu-latest"]' + + develocity-injection: + if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} + needs: build-distribution + uses: ./.github/workflows/integ-test-inject-develocity.yml + with: + runner-os: '["ubuntu-latest"]' + secrets: + DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} + + provision-gradle-versions: + needs: build-distribution + uses: ./.github/workflows/integ-test-provision-gradle-versions.yml + with: + runner-os: '["ubuntu-latest"]' + + restore-configuration-cache: + if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-configuration-cache.yml + with: + runner-os: '["ubuntu-latest"]' + secrets: + GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + + restore-containerized-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml + + restore-custom-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml + + restore-gradle-home: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-gradle-home.yml + with: + runner-os: '["ubuntu-latest"]' + + restore-java-toolchain: + needs: build-distribution + uses: ./.github/workflows/integ-test-restore-java-toolchain.yml + with: + runner-os: '["ubuntu-latest"]' + + sample-kotlin-dsl: + needs: build-distribution + uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml + with: + runner-os: '["ubuntu-latest"]' + + sample-gradle-plugin: + needs: build-distribution + uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml + with: + runner-os: '["ubuntu-latest"]' + + toolchain-detection: + needs: build-distribution + uses: ./.github/workflows/integ-test-detect-java-toolchains.yml + with: + runner-os: '["ubuntu-latest"]' diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index e72b639..fdc5083 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -1,11 +1,7 @@ -name: CI-quick-check +name: X-CI-quick-check on: workflow_dispatch: - push: - branches-ignore: - - main - - release/** jobs: check-for-pr: From e7c0080dc5c0fa4cd8c90330e465e699e1a85729 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:52:39 -0600 Subject: [PATCH 10/13] Remove old workflows --- .github/workflows/ci-full-check.yml | 135 ------------------------ .github/workflows/ci-quick-check.yml | 147 --------------------------- 2 files changed, 282 deletions(-) delete mode 100644 .github/workflows/ci-full-check.yml delete mode 100644 .github/workflows/ci-quick-check.yml diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml deleted file mode 100644 index accf5c3..0000000 --- a/.github/workflows/ci-full-check.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: X-CI-full-check - -on: - workflow_dispatch: - -jobs: - build-distribution: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Build and upload distribution - uses: ./.github/actions/build-dist - - action-inputs: - needs: build-distribution - uses: ./.github/workflows/integ-test-action-inputs.yml - with: - cache-key-prefix: ${{github.run_number}}- - - build-scan-publish: - needs: build-distribution - uses: ./.github/workflows/integ-test-build-scan-publish.yml - with: - cache-key-prefix: ${{github.run_number}}- - - cache-cleanup: - needs: build-distribution - uses: ./.github/workflows/integ-test-cache-cleanup.yml - with: - cache-key-prefix: ${{github.run_number}}- - - caching-config: - needs: build-distribution - uses: ./.github/workflows/integ-test-caching-config.yml - with: - cache-key-prefix: ${{github.run_number}}- - - dependency-graph: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-graph.yml - permissions: - contents: write - with: - cache-key-prefix: ${{github.run_number}}- - - dependency-submission: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-submission.yml - permissions: - contents: write - with: - cache-key-prefix: ${{github.run_number}}- - - dependency-submission-failures: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-submission-failures.yml - with: - cache-key-prefix: ${{github.run_number}}- - - execution-with-caching: - needs: build-distribution - uses: ./.github/workflows/integ-test-execution-with-caching.yml - with: - cache-key-prefix: ${{github.run_number}}- - - execution: - needs: build-distribution - uses: ./.github/workflows/integ-test-execution.yml - with: - cache-key-prefix: ${{github.run_number}}- - - develocity-injection: - needs: build-distribution - uses: ./.github/workflows/integ-test-inject-develocity.yml - with: - cache-key-prefix: ${{github.run_number}}- - secrets: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} - - provision-gradle-versions: - needs: build-distribution - uses: ./.github/workflows/integ-test-provision-gradle-versions.yml - with: - cache-key-prefix: ${{github.run_number}}- - - restore-configuration-cache: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-configuration-cache.yml - with: - cache-key-prefix: ${{github.run_number}}- - secrets: - GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - - restore-custom-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml - with: - cache-key-prefix: ${{github.run_number}}- - - restore-containerized-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml - with: - cache-key-prefix: ${{github.run_number}}- - - restore-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-gradle-home.yml - with: - cache-key-prefix: ${{github.run_number}}- - - restore-java-toolchain: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-java-toolchain.yml - with: - cache-key-prefix: ${{github.run_number}}- - - sample-kotlin-dsl: - needs: build-distribution - uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml - with: - cache-key-prefix: ${{github.run_number}}- - - sample-gradle-plugin: - needs: build-distribution - uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml - with: - cache-key-prefix: ${{github.run_number}}- - - toolchain-detection: - needs: build-distribution - uses: ./.github/workflows/integ-test-detect-java-toolchains.yml - with: - cache-key-prefix: ${{github.run_number}}- diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml deleted file mode 100644 index fdc5083..0000000 --- a/.github/workflows/ci-quick-check.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: X-CI-quick-check - -on: - workflow_dispatch: - -jobs: - check-for-pr: - runs-on: ubuntu-latest - outputs: - is-pr-commit: ${{ steps.PR.outputs.pr_found }} - steps: - - name: Get current PR details - uses: 8BitJonny/gh-get-current-pr@3.0.0 - id: PR - - build-distribution: - needs: check-for-pr - if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }} - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Build and upload distribution - uses: ./.github/actions/build-dist - - action-inputs: - needs: build-distribution - uses: ./.github/workflows/integ-test-action-inputs.yml - with: - runner-os: '["ubuntu-latest"]' - - build-scan-publish: - needs: build-distribution - uses: ./.github/workflows/integ-test-build-scan-publish.yml - with: - runner-os: '["ubuntu-latest"]' - - cache-cleanup: - needs: build-distribution - uses: ./.github/workflows/integ-test-cache-cleanup.yml - with: - runner-os: '["ubuntu-latest"]' - cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run - - caching-config: - needs: build-distribution - uses: ./.github/workflows/integ-test-caching-config.yml - with: - runner-os: '["ubuntu-latest"]' - - dependency-graph: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-graph.yml - permissions: - contents: write - with: - runner-os: '["ubuntu-latest"]' - - dependency-submission: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-submission.yml - permissions: - contents: write - with: - runner-os: '["ubuntu-latest"]' - - dependency-submission-failures: - needs: build-distribution - uses: ./.github/workflows/integ-test-dependency-submission-failures.yml - permissions: - contents: write - with: - runner-os: '["ubuntu-latest"]' - - execution-with-caching: - needs: build-distribution - uses: ./.github/workflows/integ-test-execution-with-caching.yml - with: - runner-os: '["ubuntu-latest"]' - - execution: - needs: build-distribution - uses: ./.github/workflows/integ-test-execution.yml - with: - runner-os: '["ubuntu-latest"]' - - develocity-injection: - if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} - needs: build-distribution - uses: ./.github/workflows/integ-test-inject-develocity.yml - with: - runner-os: '["ubuntu-latest"]' - secrets: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} - - provision-gradle-versions: - needs: build-distribution - uses: ./.github/workflows/integ-test-provision-gradle-versions.yml - with: - runner-os: '["ubuntu-latest"]' - - restore-configuration-cache: - if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }} - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-configuration-cache.yml - with: - runner-os: '["ubuntu-latest"]' - secrets: - GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - - restore-containerized-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml - - restore-custom-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml - - restore-gradle-home: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-gradle-home.yml - with: - runner-os: '["ubuntu-latest"]' - - restore-java-toolchain: - needs: build-distribution - uses: ./.github/workflows/integ-test-restore-java-toolchain.yml - with: - runner-os: '["ubuntu-latest"]' - - sample-kotlin-dsl: - needs: build-distribution - uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml - with: - runner-os: '["ubuntu-latest"]' - - sample-gradle-plugin: - needs: build-distribution - uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml - with: - runner-os: '["ubuntu-latest"]' - - toolchain-detection: - needs: build-distribution - uses: ./.github/workflows/integ-test-detect-java-toolchains.yml - with: - runner-os: '["ubuntu-latest"]' From 6599acbe4683b3244206604feffb28b940a182ce Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:54:54 -0600 Subject: [PATCH 11/13] Add back dependency-review.yml so we can rename it --- .github/workflows/ci-dependency-review.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/ci-dependency-review.yml diff --git a/.github/workflows/ci-dependency-review.yml b/.github/workflows/ci-dependency-review.yml new file mode 100644 index 0000000..e88eaa5 --- /dev/null +++ b/.github/workflows/ci-dependency-review.yml @@ -0,0 +1,9 @@ +name: CI-dependency-review +on: + push: + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - run: echo "This is a placeholder workspace for UI cleanup" From 211d342ee6947decb7c3047d69197a815b538f2c Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:57:13 -0600 Subject: [PATCH 12/13] Rename workflow --- .github/workflows/ci-dependency-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dependency-review.yml b/.github/workflows/ci-dependency-review.yml index e88eaa5..220f786 100644 --- a/.github/workflows/ci-dependency-review.yml +++ b/.github/workflows/ci-dependency-review.yml @@ -1,4 +1,4 @@ -name: CI-dependency-review +name: X-CI-dependency-review on: push: From 153b1135d07a206e25b03edaa61304525e977c01 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 06:58:06 -0600 Subject: [PATCH 13/13] Remove old workflow --- .github/workflows/ci-dependency-review.yml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .github/workflows/ci-dependency-review.yml diff --git a/.github/workflows/ci-dependency-review.yml b/.github/workflows/ci-dependency-review.yml deleted file mode 100644 index 220f786..0000000 --- a/.github/workflows/ci-dependency-review.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: X-CI-dependency-review -on: - push: - -jobs: - dependency-review: - runs-on: ubuntu-latest - steps: - - run: echo "This is a placeholder workspace for UI cleanup"