Add muzzle to other builds
MODIFY
.github/workflows/ci.yml
.github/workflows/ci.yml
@@ -173,6 +173,64 @@ jobs:
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}
+ setup-muzzle-matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ 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
+ 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') }}
+
+ - id: set-matrix
+ run: echo "::set-output name=matrix::{\"module\":[\"$(./gradlew -q instrumentation:listInstrumentations | xargs echo | sed 's/ /","/g')\"]}"
+
+ muzzle:
+ needs: setup-muzzle-matrix
+ runs-on: ubuntu-latest
+ strategy:
+ matrix: ${{fromJson(needs.setup-muzzle-matrix.outputs.matrix)}}
+ fail-fast: false
+ 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
+ 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: Run muzzle
+ # using retry because of sporadic gradle download failures
+ uses: nick-invision/retry@v2.4.1
+ with:
+ # timing out has not been a problem, these jobs typically finish in 2-3 minutes
+ timeout_minutes: 15
+ max_attempts: 3
+ command: ./gradlew ${{ matrix.module }}:muzzle
+
examples:
runs-on: ubuntu-latest
steps:

MODIFY
.github/workflows/nightly-no-cache.yml
.github/workflows/nightly-no-cache.yml
@@ -130,6 +130,9 @@ jobs:
- name: Test
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} --no-build-cache
+ # muzzle is intentionally not included in the nightly-no-cache build because
+ # it doesn't use gradle cache anyways and so is already covered by the normal nightly build
+
examples:
runs-on: ubuntu-latest
steps:

MODIFY
.github/workflows/nightly.yml
.github/workflows/nightly.yml
@@ -171,6 +171,64 @@ jobs:
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}
+ setup-muzzle-matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.set-matrix.outputs.matrix }}
+ 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
+ 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') }}
+
+ - id: set-matrix
+ run: echo "::set-output name=matrix::{\"module\":[\"$(./gradlew -q instrumentation:listInstrumentations | xargs echo | sed 's/ /","/g')\"]}"
+
+ muzzle:
+ needs: setup-muzzle-matrix
+ runs-on: ubuntu-latest
+ strategy:
+ matrix: ${{fromJson(needs.setup-muzzle-matrix.outputs.matrix)}}
+ fail-fast: false
+ 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
+ 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: Run muzzle
+ # using retry because of sporadic gradle download failures
+ uses: nick-invision/retry@v2.4.1
+ with:
+ # timing out has not been a problem, these jobs typically finish in 2-3 minutes
+ timeout_minutes: 15
+ max_attempts: 3
+ command: ./gradlew ${{ matrix.module }}:muzzle
+
examples:
runs-on: ubuntu-latest
steps:

MODIFY
.github/workflows/patch-release-build.yml
.github/workflows/patch-release-build.yml
@@ -90,7 +90,7 @@ jobs:
- name: Test
run: ./gradlew test -PtestJavaVersion=${{ matrix.test-java-version }} --stacktrace -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 workflow
+ # testLatestDeps is intentionally not included in the release workflows
# because any time a new library version is released to maven central
# it can fail due to test code incompatibility with the new library version,
# or due to slight changes in emitted telemetry
@@ -142,7 +142,11 @@ jobs:
- name: Test
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}
- example-distro:
+ # muzzle is intentionally not included in the release workflows
+ # because any time a new library version is released to maven central it can fail,
+ # and this is not a reason to hold up the release
+
+ examples:
runs-on: ubuntu-latest
needs: prepare-release-branch
steps:

MODIFY
.github/workflows/release-build.yml
.github/workflows/release-build.yml
@@ -49,7 +49,7 @@ jobs:
- name: Test
run: ./gradlew test -PtestJavaVersion=${{ matrix.test-java-version }} --stacktrace -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 workflow
+ # testLatestDeps is intentionally not included in the release workflows
# because any time a new library version is released to maven central
# it can fail due to test code incompatibility with the new library version,
# or due to slight changes in emitted telemetry
@@ -99,7 +99,11 @@ jobs:
- name: Test
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}
- example-distro:
+ # muzzle is intentionally not included in the release workflows
+ # because any time a new library version is released to maven central it can fail,
+ # and this is not a reason to hold up the release
+
+ examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4

Add muzzle to other builds (#3943)