Skip to content

Commit

Permalink
Add building gradle-plugins to GHA workflows (#3951)
Browse files Browse the repository at this point in the history
* Add building gradle-plugins to GHA workflows

* Fix nightly-no-cache

* Fix yaml

* Fix

* Add --no-build-cache for nightly-no-cache

* Sync
  • Loading branch information
trask authored Aug 25, 2021
1 parent 99de444 commit b66d744
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 18 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand All @@ -39,6 +39,29 @@ jobs:
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
run: ./gradlew build --stacktrace

build-gradle-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
run: ../gradlew build --stacktrace
working-directory: gradle-plugins

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -94,7 +117,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down Expand Up @@ -238,7 +261,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down Expand Up @@ -269,7 +292,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-plugins-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-plugins-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/nightly-no-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand All @@ -29,6 +29,29 @@ jobs:
- name: Build
run: ./gradlew build --stacktrace --no-build-cache

build-gradle-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
run: ../gradlew build --stacktrace --no-build-cache
working-directory: gradle-plugins

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -75,7 +98,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down Expand Up @@ -140,7 +163,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand All @@ -37,6 +37,29 @@ jobs:
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
run: ./gradlew build --stacktrace

build-gradle-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
run: ../gradlew build --stacktrace
working-directory: gradle-plugins

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -92,7 +115,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down Expand Up @@ -236,7 +259,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/patch-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }}
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand All @@ -180,7 +180,8 @@ jobs:
ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }}
fetch-depth: 0

- uses: actions/setup-java@v2
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down Expand Up @@ -53,6 +53,29 @@ jobs:
path: "**/javacore.*.txt"
if-no-files-found: ignore

build-gradle-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
run: ../gradlew build --stacktrace
working-directory: gradle-plugins

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -237,7 +260,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for running checks
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
Expand All @@ -135,7 +135,8 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-java@v2
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
Expand Down

0 comments on commit b66d744

Please sign in to comment.