Unverified Commit 613f4ec5 authored by Daz DeBoer's avatar Daz DeBoer Committed by GitHub
Browse files

Merge pull request #109 from gradle/dd/rc21

Fix issues for 2.0-rc.2
- Support multi-line strings for cache-tuning parameters #106 
- Include all downloaded files in `dependencies` bundle #100 
- Only restore configuration-cache if Gradle User Home is fully restored #107
parents d61e5be0 db6202ad
Loading
Loading
Loading
Loading
+1 −1
Changes for .eslintrc.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
      "eslint-comments/no-use": "off",
      "import/no-namespace": "off",
      "no-unused-vars": "off",
      "@typescript-eslint/no-unused-vars": "error",
      "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
      "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
      "@typescript-eslint/no-require-imports": "error",
      "@typescript-eslint/array-type": "error",
+10 −6
Changes for .github/workflows/integTest-caching-config.yml: 10 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -28,13 +28,15 @@ jobs:
        # Add "wrapper" to main cache entry and remove 'wrapper-zips' bundle
        # Exclude build-cache from main cache entry
        gradle-home-cache-includes: |
            ["caches", "notifications", "wrapper"]
            caches
            notifications
            wrapper
        gradle-home-cache-excludes: |
            ["caches/build-cache-1"]
            caches/build-cache-1
        gradle-home-cache-artifact-bundles: |
            [
              ["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
              ["dependency-jars", "caches/modules-*/files-*/**/*.jar"],
              ["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
              ["instrumented-jars", "caches/jars-*/*/"],
              ["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
            ]
@@ -57,13 +59,15 @@ jobs:
        cache-read-only: true
        # Need the same configuration when restoring state from cache
        gradle-home-cache-includes: |
            ["caches", "notifications", "wrapper"]
            caches
            notifications
            wrapper
        gradle-home-cache-excludes: |
            ["caches/build-cache-1"]
            caches/build-cache-1
        gradle-home-cache-artifact-bundles: |
            [
              ["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
              ["dependency-jars", "caches/modules-*/files-*/**/*.jar"],
              ["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
              ["instrumented-jars", "caches/jars-*/*/"],
              ["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
            ]
+65
Changes for .github/workflows/integTest-caching-configuration-cache.yml: 65 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: Test save/restore configuration-cache state

on:
  pull_request:
  push:
  workflow_dispatch:

env:
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true

jobs:
  # Run initial Gradle builds to push initial cache entries
  # These builds should start fresh without cache hits, due to the seed injected into the cache key above.
  seed-build:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Build with configuration-cache enabled
      uses: ./
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test --configuration-cache

  # Test that the project-dot-gradle cache will cache and restore configuration-cache
  configuration-cache:
    needs: seed-build
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Execute Gradle build and verify cached configuration
      uses: ./
      env: 
        VERIFY_CACHED_CONFIGURATION: true
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test --configuration-cache
        cache-read-only: true

  # Check that the build can run when no bundles are restored
  no-bundles-restored:
    needs: seed-build
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Execute Gradle build with no cache artifact bundles restored
      uses: ./
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test --configuration-cache
        cache-read-only: true
        gradle-home-cache-artifact-bundles: '[]'
+1 −25
Changes for .github/workflows/integTest-caching-gradle-home.yml: 1 added line, 25 removed lines.
Original line number Diff line number Diff line
name: Test caching
name: Test save/restore Gradle Home directory

on:
  pull_request:
@@ -24,11 +24,6 @@ jobs:
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test
    - name: Build with configuration-cache enabled
      uses: ./
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test --configuration-cache

  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
  dependencies-cache:
@@ -64,25 +59,6 @@ jobs:
        arguments: test -DverifyCachedBuild=true
        cache-read-only: true

  # Test that the project-dot-gradle cache will cache and restore configuration-cache
  configuration-cache:
    needs: seed-build
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Execute Gradle build and verify cached configuration
      uses: ./
      env: 
        VERIFY_CACHED_CONFIGURATION: true
      with:
        build-root-directory: __tests__/samples/groovy-dsl
        arguments: test --configuration-cache
        cache-read-only: true

  # Check that the build can run when no bundles are restored
  no-bundles-restored:
    needs: seed-build
+1 −1
Changes for .prettierrc.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
{
    "printWidth": 80,
    "printWidth": 120,
    "tabWidth": 4,
    "useTabs": false,
    "semi": false,
Loading