Always build 'dist' directory for integ-tests

This commit is contained in:
daz 2024-04-10 05:06:37 -06:00
parent 9169d36880
commit 0ebfbb8f41
No known key found for this signature in database
21 changed files with 29 additions and 96 deletions

View file

@ -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

View file

@ -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}}-

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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: