Merge pull request #156 from gradle/test-macos

Fix detection of Gradle User Home on macOS runners
This commit is contained in:
Daz DeBoer 2022-02-03 10:08:11 -07:00 committed by GitHub
commit 937999e9cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 39 additions and 41 deletions

View file

@ -13,7 +13,7 @@ jobs:
action-inputs: action-inputs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -14,7 +14,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -38,7 +38,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -61,7 +61,7 @@ jobs:
cache-disabled: cache-disabled:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -108,7 +108,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only- GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only-
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -127,7 +127,7 @@ jobs:
needs: seed-build-write-only needs: seed-build-write-only
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -17,7 +17,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy- GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -34,7 +34,7 @@ jobs:
needs: seed-build-groovy needs: seed-build-groovy
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -56,7 +56,7 @@ jobs:
needs: seed-build-groovy needs: seed-build-groovy
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -76,7 +76,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin- GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -93,7 +93,7 @@ jobs:
needs: seed-build-kotlin needs: seed-build-kotlin
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -111,7 +111,7 @@ jobs:
needs: modify-build-kotlin needs: modify-build-kotlin
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -13,7 +13,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -29,7 +29,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -47,7 +47,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -65,7 +65,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -13,7 +13,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -29,7 +29,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -13,7 +13,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -29,7 +29,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -15,7 +15,7 @@ jobs:
gradle-execution: gradle-execution:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
include: include:
- os: windows-latest - os: windows-latest
script-suffix: '.bat' script-suffix: '.bat'
@ -46,7 +46,7 @@ jobs:
strategy: strategy:
matrix: matrix:
gradle: [7.3, 6.9, 5.6.4, 4.10.3] gradle: [7.3, 6.9, 5.6.4, 4.10.3]
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
include: include:
- gradle: 5.6.4 - gradle: 5.6.4
build-root-suffix: -gradle-5 build-root-suffix: -gradle-5

View file

@ -16,7 +16,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -32,7 +32,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -50,7 +50,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -15,7 +15,7 @@ jobs:
provision-gradle: provision-gradle:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
include: include:
- os: windows-latest - os: windows-latest
script-suffix: '.bat' script-suffix: '.bat'
@ -49,7 +49,7 @@ jobs:
strategy: strategy:
matrix: matrix:
gradle: [7.3, 6.9, 5.6.4, 4.10.3] gradle: [7.3, 6.9, 5.6.4, 4.10.3]
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
include: include:
- gradle: 5.6.4 - gradle: 5.6.4
build-root-suffix: -gradle-5 build-root-suffix: -gradle-5

View file

@ -14,7 +14,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -29,7 +29,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View file

@ -14,7 +14,7 @@ jobs:
seed-build: seed-build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@ -29,7 +29,7 @@ jobs:
needs: seed-build needs: seed-build
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

2
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -102,13 +102,11 @@ export class GradleStateCache {
} }
cacheOutputExists(): boolean { cacheOutputExists(): boolean {
const paths = this.getCachePath() const cachesDir = path.resolve(this.gradleUserHome, 'caches')
for (const p of paths) { if (fs.existsSync(cachesDir)) {
if (fs.existsSync(p)) { cacheDebug(`Cache output exists at ${cachesDir}`)
cacheDebug(`Cache output exists at ${p}`)
return true return true
} }
}
return false return false
} }