Skip to content

Commit

Permalink
[v1.10.x branch] Cherry pick github action workflow updates into v1.1…
Browse files Browse the repository at this point in the history
…0.x branch (#5249)

* More gradle build action cleanup (#5140)

* Remove unnecessary gradle wrapper caching

* Convert more to gradle-build-action

* Remove fetch-depth (#5145)

* Simplify release workflow (#5144)

* Bump release date
  • Loading branch information
trask authored Jan 27, 2022
1 parent 4264519 commit efc7894
Show file tree
Hide file tree
Showing 24 changed files with 65 additions and 416 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand All @@ -34,8 +32,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand All @@ -44,8 +40,10 @@ jobs:
java-version: 11

- name: Build
run: ../gradlew build
working-directory: gradle-plugins
uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: gradle-plugins

test:
runs-on: ubuntu-latest
Expand All @@ -61,8 +59,6 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- id: setup-test-java
name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests
Expand Down Expand Up @@ -94,8 +90,6 @@ jobs:
if: ${{ !startsWith(github.ref_name, 'v') }}
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand Down Expand Up @@ -138,8 +132,6 @@ jobs:
if: matrix.os == 'windows-latest'

- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand Down Expand Up @@ -167,8 +159,6 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand All @@ -194,8 +184,6 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand All @@ -222,8 +210,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand Down Expand Up @@ -274,8 +260,6 @@ jobs:
if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation'
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- uses: gradle/wrapper-validation-action@v1.0.4
8 changes: 4 additions & 4 deletions .github/workflows/nightly-benchmark-overhead.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
run: |
rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/
- name: run tests
working-directory: benchmark-overhead
run: ./gradlew test
uses: gradle/gradle-build-action@v2
with:
arguments: test
build-root-directory: benchmark-overhead
- name: inspect the results dir
working-directory: benchmark-overhead
run: ls -lR results
Expand All @@ -46,8 +48,6 @@ jobs:
- uses: technote-space/workflow-conclusion-action@v2.2

- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- uses: JasonEtco/create-an-issue@v2.6
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/nightly-codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down Expand Up @@ -43,8 +41,6 @@ jobs:
- uses: technote-space/workflow-conclusion-action@v2.2

- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- uses: JasonEtco/create-an-issue@v2.6
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
Expand Down
88 changes: 25 additions & 63 deletions .github/workflows/nightly-no-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
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
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand All @@ -37,24 +29,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
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 --no-build-cache
working-directory: gradle-plugins
uses: gradle/gradle-build-action@v2
with:
arguments: build --no-build-cache
build-root-directory: gradle-plugins

test:
runs-on: ubuntu-latest
Expand All @@ -70,8 +56,6 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- id: setup-test-java
name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests
Expand All @@ -86,12 +70,6 @@ jobs:
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: Test
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand All @@ -103,21 +81,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
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: Test
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand Down Expand Up @@ -151,21 +121,13 @@ jobs:
if: matrix.os == 'windows-latest'

- uses: actions/checkout@v2.3.4
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: Test
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand All @@ -180,41 +142,43 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
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('examples/distro/gradle/wrapper/gradle-wrapper.properties') }}

- name: Local publish of artifacts
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
run: ./gradlew publishToMavenLocal -x javadoc
uses: gradle/gradle-build-action@v2
with:
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
arguments: publishToMavenLocal -x javadoc

- name: Local publish of gradle plugins
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
run: ../gradlew publishToMavenLocal -x javadoc
working-directory: gradle-plugins
uses: gradle/gradle-build-action@v2
with:
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
arguments: publishToMavenLocal -x javadoc
build-root-directory: gradle-plugins

- name: Build distro
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
working-directory: examples/distro
uses: gradle/gradle-build-action@v2
with:
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
build-root-directory: examples/distro

- name: Build extension
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
working-directory: examples/extension
uses: gradle/gradle-build-action@v2
with:
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
build-root-directory: examples/extension

- name: Run muzzle check against extension
run: ./gradlew muzzle --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/extension
uses: gradle/gradle-build-action@v2
with:
arguments: muzzle --init-script ../../.github/scripts/local.init.gradle.kts
build-root-directory: examples/extension

issue:
name: Open issue on failure
Expand All @@ -227,8 +191,6 @@ jobs:
- uses: technote-space/workflow-conclusion-action@v2.2

- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- uses: JasonEtco/create-an-issue@v2.6
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
Expand Down
Loading

0 comments on commit efc7894

Please sign in to comment.