-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply gradle github action everywhere (open-telemetry#5089)
- Loading branch information
Showing
18 changed files
with
607 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,20 +39,10 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Restore cache | ||
uses: burrunan/[email protected] | ||
with: | ||
job-id: jdk${{ matrix.test-java-version }} | ||
read-only: true | ||
|
||
- 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 | ||
run: ./gradlew test -PtestJavaVersion=${{ matrix.test-java-version }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: test -PtestJavaVersion=${{ matrix.test-java-version }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false | ||
|
||
# testLatestDeps is intentionally not included in the release workflows | ||
# because any time a new library version is released to maven central | ||
|
@@ -94,20 +84,10 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Restore cache | ||
uses: burrunan/[email protected] | ||
with: | ||
job-id: smokeTests | ||
read-only: true | ||
|
||
- 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 | ||
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} | ||
|
||
# muzzle is intentionally not included in the release workflows | ||
# because any time a new library version is released to maven central it can fail, | ||
|
@@ -134,29 +114,40 @@ jobs: | |
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 | ||
working-directory: examples/distro | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts | ||
build-root-directory: examples/distro | ||
|
||
- name: Build extension | ||
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts | ||
working-directory: examples/extension | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts | ||
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 | ||
cache-read-only: true | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [ test, smoke-test, examples ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
@@ -170,10 +161,8 @@ jobs: | |
java-version: 11 | ||
|
||
- name: Build and publish artifacts | ||
uses: burrunan/gradle-cache-action@v1.10 | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
job-id: jdk11 | ||
remote-build-cache-proxy-enabled: false | ||
arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
env: | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,21 +20,12 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Cache gradle dependencies | ||
uses: burrunan/[email protected] | ||
with: | ||
job-id: fakebackend-smoke | ||
read-only: true | ||
|
||
- name: Cache Gradle Wrapper | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/images/fake-backend/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
- name: Build Docker Image | ||
run: ./gradlew jibDockerBuild -Djib.httpTimeout=120000 -Djib.console=plain | ||
working-directory: smoke-tests/images/fake-backend | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: jibDockerBuild -Djib.httpTimeout=120000 -Djib.console=plain | ||
build-root-directory: smoke-tests/images/fake-backend | ||
cache-read-only: true | ||
|
||
buildWindows: | ||
runs-on: windows-latest | ||
|
@@ -55,17 +46,9 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Cache gradle dependencies | ||
uses: burrunan/[email protected] | ||
with: | ||
job-id: fakebackend-smoke | ||
|
||
- name: Cache Gradle Wrapper | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/images/fake-backend/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
- name: Build Docker Image | ||
run: ./gradlew windowsBackendImageBuild | ||
working-directory: smoke-tests/images/fake-backend | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: windowsBackendImageBuild | ||
build-root-directory: smoke-tests/images/fake-backend | ||
cache-read-only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,22 +20,24 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Cache gradle dependencies | ||
uses: burrunan/[email protected] | ||
# Quarkus 2.0+ does not support Java 8 | ||
- name: Build Java 11 Docker Image | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
job-id: quarkus-smoke | ||
read-only: true | ||
arguments: jibDockerBuild -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain | ||
build-root-directory: smoke-tests/images/quarkus | ||
cache-read-only: true | ||
|
||
- name: Cache Gradle Wrapper | ||
uses: actions/cache@v2 | ||
- name: Build Java 17 Docker Image | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/images/quarkus/gradle/wrapper/gradle-wrapper.properties') }} | ||
arguments: jibDockerBuild -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain | ||
build-root-directory: smoke-tests/images/quarkus | ||
cache-read-only: true | ||
|
||
- name: Build Docker Image | ||
# Quarkus 2.0+ does not support Java 8 | ||
run: | | ||
./gradlew jibDockerBuild -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain | ||
./gradlew jibDockerBuild -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain | ||
./gradlew jibDockerBuild -PtargetJDK=18 -Djib.httpTimeout=120000 -Djib.console=plain | ||
working-directory: smoke-tests/images/quarkus | ||
- name: Build Java 18 Docker Image | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: jibDockerBuild -PtargetJDK=18 -Djib.httpTimeout=120000 -Djib.console=plain | ||
build-root-directory: smoke-tests/images/quarkus | ||
cache-read-only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,24 +41,18 @@ jobs: | |
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Cache gradle dependencies | ||
uses: burrunan/[email protected] | ||
with: | ||
job-id: matrix-smoke | ||
read-only: true | ||
|
||
- name: Cache Gradle Wrapper | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/images/servlet/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
- name: Build Linux docker images | ||
working-directory: smoke-tests/images/servlet | ||
run: ./gradlew buildLinuxTestImages -PsmokeTestServer=${{ matrix.smoke-test-server }} | ||
if: matrix.os != 'windows-latest' | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: buildLinuxTestImages -PsmokeTestServer=${{ matrix.smoke-test-server }} | ||
build-root-directory: smoke-tests/images/servlet | ||
cache-read-only: true | ||
|
||
- name: Build Windows docker images | ||
working-directory: smoke-tests/images/servlet | ||
run: ./gradlew buildWindowsTestImages -PsmokeTestServer=${{ matrix.smoke-test-server }} | ||
if: matrix.os == 'windows-latest' | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: buildWindowsTestImages -PsmokeTestServer=${{ matrix.smoke-test-server }} | ||
build-root-directory: smoke-tests/images/servlet | ||
cache-read-only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.