From 4ce2cac645e7b07252a0c58ac572504bc19a5204 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 31 May 2021 13:43:19 -0700 Subject: [PATCH] Sync yaml files (#3145) --- .github/workflows/build-grpc-smoke-dist.yaml | 3 + .github/workflows/build-play-smoke-dist.yaml | 3 + .../build-smoke-dist-fakebackend.yaml | 7 +- .../build-springboot-smoke-dist.yaml | 3 + .github/workflows/build-test-matrix.yaml | 7 +- .github/workflows/ci.yaml | 4 +- .github/workflows/codeql-analysis.yml | 2 + .../workflows/gradle-wrapper-validation.yml | 3 + .github/workflows/nightly-no-cache.yaml | 24 +++- .github/workflows/nightly.yaml | 30 +++- .github/workflows/patch-release-build.yml | 129 +++++++++++++++++- .github/workflows/pr.yaml | 15 ++ .github/workflows/release-build.yml | 52 ++++++- 13 files changed, 272 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-grpc-smoke-dist.yaml b/.github/workflows/build-grpc-smoke-dist.yaml index 4ad66327c6..54427acad9 100644 --- a/.github/workflows/build-grpc-smoke-dist.yaml +++ b/.github/workflows/build-grpc-smoke-dist.yaml @@ -13,6 +13,9 @@ 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: diff --git a/.github/workflows/build-play-smoke-dist.yaml b/.github/workflows/build-play-smoke-dist.yaml index 3307d3fb90..4bc3da38f6 100644 --- a/.github/workflows/build-play-smoke-dist.yaml +++ b/.github/workflows/build-play-smoke-dist.yaml @@ -13,6 +13,9 @@ 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: diff --git a/.github/workflows/build-smoke-dist-fakebackend.yaml b/.github/workflows/build-smoke-dist-fakebackend.yaml index d9f442d634..398940e538 100644 --- a/.github/workflows/build-smoke-dist-fakebackend.yaml +++ b/.github/workflows/build-smoke-dist-fakebackend.yaml @@ -5,7 +5,7 @@ on: paths: - 'smoke-tests/fake-backend/**' - '.github/workflows/build-smoke-dist-fakebackend.yaml' - branches: ['main'] + branches: [ 'main' ] workflow_dispatch: jobs: @@ -13,6 +13,9 @@ 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: @@ -48,6 +51,8 @@ jobs: run: git config --system core.longpaths true - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/build-springboot-smoke-dist.yaml b/.github/workflows/build-springboot-smoke-dist.yaml index 5ee4d4cac4..13d92be40c 100644 --- a/.github/workflows/build-springboot-smoke-dist.yaml +++ b/.github/workflows/build-springboot-smoke-dist.yaml @@ -13,6 +13,9 @@ 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: diff --git a/.github/workflows/build-test-matrix.yaml b/.github/workflows/build-test-matrix.yaml index 7b10ed0296..ee261ee42e 100644 --- a/.github/workflows/build-test-matrix.yaml +++ b/.github/workflows/build-test-matrix.yaml @@ -5,7 +5,7 @@ on: paths: - 'smoke-tests/matrix/**' - '.github/workflows/build-test-matrix.yaml' - branches: ['main'] + branches: [ 'main' ] workflow_dispatch: jobs: @@ -13,6 +13,9 @@ 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: @@ -48,6 +51,8 @@ jobs: run: git config --system core.longpaths true - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 14c272f2ea..87ba58c1af 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - id: setup-test-java name: Set up JDK ${{ matrix.java }} for running tests uses: actions/setup-java@v2 @@ -71,6 +72,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - name: Set up JDK 11 uses: actions/setup-java@v2 with: @@ -145,7 +147,7 @@ jobs: snapshot: runs-on: ubuntu-latest - needs: [ build, example-distro, smoke-test, test, testLatestDep ] + needs: [ build, test, testLatestDep, smoke-test, example-distro ] steps: - uses: actions/checkout@v2.3.4 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9afe9e8d73..8e0af3d970 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 1da161dc63..e341f364f0 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -13,4 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: gradle/wrapper-validation-action@v1.0.4 diff --git a/.github/workflows/nightly-no-cache.yaml b/.github/workflows/nightly-no-cache.yaml index 4aebd4cd85..848f4bb162 100644 --- a/.github/workflows/nightly-no-cache.yaml +++ b/.github/workflows/nightly-no-cache.yaml @@ -20,7 +20,6 @@ jobs: distribution: adopt java-version: 11 - - name: Build run: ./gradlew build --stacktrace -x :smoke-tests:test --no-build-cache @@ -34,6 +33,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - id: setup-test-java name: Set up JDK ${{ matrix.java }} for running tests uses: actions/setup-java@v2 @@ -50,6 +50,22 @@ jobs: - name: Test run: ./gradlew test -PtestJavaVersion=${{ matrix.java }} --stacktrace -x :smoke-tests:test -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false --no-build-cache + testLatestDep: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Test + run: ./gradlew test -x :smoke-tests:test -PtestLatestDeps=true --stacktrace --no-build-cache + smoke-test: runs-on: ${{ matrix.os }} strategy: @@ -94,14 +110,18 @@ jobs: issue: name: Open issue on failure - needs: [ build, test, example-distro, smoke-test ] + needs: [ build, test, testLatestDep, smoke-test, example-distro ] runs-on: ubuntu-latest if: always() steps: # run this action to get workflow conclusion # You can get conclusion by env (env.WORKFLOW_CONCLUSION) - uses: technote-space/workflow-conclusion-action@v2.1.6 + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: JasonEtco/create-an-issue@v2.5.0 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure env: diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index df6837d53c..0dcd3f92b2 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -41,6 +41,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - id: setup-test-java name: Set up JDK ${{ matrix.java }} for running tests uses: actions/setup-java@v2 @@ -71,6 +72,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - name: Set up JDK 11 uses: actions/setup-java@v2 with: @@ -121,16 +123,42 @@ jobs: S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }} run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.suite }} + example-distro: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Set up JDK 11 for running checks + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: jdk11 + + - name: Build + run: ./gradlew build --stacktrace + working-directory: examples/distro + issue: name: Open issue on failure - needs: [ build, smoke-test, test, testLatestDep ] + needs: [ build, test, testLatestDep, smoke-test, example-distro ] runs-on: ubuntu-latest if: always() steps: # run this action to get workflow conclusion # You can get conclusion by env (env.WORKFLOW_CONCLUSION) - uses: technote-space/workflow-conclusion-action@v2.1.6 + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: JasonEtco/create-an-issue@v2.5.0 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure env: diff --git a/.github/workflows/patch-release-build.yml b/.github/workflows/patch-release-build.yml index 100296bfce..0050ab9ede 100644 --- a/.github/workflows/patch-release-build.yml +++ b/.github/workflows/patch-release-build.yml @@ -23,39 +23,159 @@ jobs: echo "::set-output name=release-branch-name::$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.x/')" # Sets the release-tag-name output to the version number with the last non-period element replace with a '0' and prepended with v echo "::set-output name=release-tag-name::$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.0/')" + - id: checkout-release-branch name: Check out release branch continue-on-error: true uses: actions/checkout@v2.3.4 with: ref: ${{ steps.parse-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + - id: checkout-release-tag name: Check out release tag if: ${{ steps.checkout-release-branch.outcome == 'failure' }} uses: actions/checkout@v2.3.4 with: ref: ${{ steps.parse-release-branch.outputs.release-tag-name }} + fetch-depth: 0 + - name: Create release branch if: ${{ steps.checkout-release-tag.outcome == 'success' }} run: | git checkout -b ${{ steps.parse-release-branch.outputs.release-branch-name }} git push --set-upstream origin ${{ steps.parse-release-branch.outputs.release-branch-name }} - build: + + test: + runs-on: ubuntu-latest + needs: prepare-release-branch + strategy: + matrix: + java: [ 8, 11, 15 ] + steps: + - uses: actions/checkout@v2.3.4 + with: + ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + + - id: setup-test-java + name: Set up JDK ${{ matrix.java }} for running tests + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: ${{ matrix.java }} + + - name: Set up JDK 11 for running Gradle + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: jdk${{ matrix.java }} + + - name: Test + run: ./gradlew test -PtestJavaVersion=${{ matrix.java }} --stacktrace -x :smoke-tests:test -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false + + testLatestDep: runs-on: ubuntu-latest needs: prepare-release-branch steps: - - name: Checkout release branch - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.4 with: ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: latestDepTest + + - name: Test + run: ./gradlew test -x :smoke-tests:test -PtestLatestDeps=true --stacktrace + + smoke-test: + runs-on: ${{ matrix.os }} + needs: prepare-release-branch + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + suite: [ "glassfish", "jetty", "liberty", "tomcat", "tomee", "wildfly", "other" ] + steps: + - name: Support longpaths + run: git config --system core.longpaths true + if: matrix.os == 'windows-latest' + + - uses: actions/checkout@v2.3.4 + with: + ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + + - name: Set up JDK 11 for running Gradle + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: smokeTests + + - name: Test + run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.suite }} + + example-distro: + runs-on: ubuntu-latest + needs: prepare-release-branch + steps: + - uses: actions/checkout@v2.3.4 + with: + ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + + - name: Set up JDK 11 for running checks + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: jdk11 + + - name: Build + run: ./gradlew build --stacktrace + working-directory: examples/distro + + release: + runs-on: ubuntu-latest + needs: prepare-release-branch + steps: + - uses: actions/checkout@v2.3.4 + with: + ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }} + fetch-depth: 0 + - uses: actions/setup-java@v2 with: distribution: adopt java-version: 11 + - name: Setup git name run: | git config user.name github-actions git config user.email github-actions@github.com + - name: Cherrypicks if: ${{ github.event.inputs.commits != '' }} run: | @@ -64,6 +184,7 @@ jobs: # Trim whitespaces and cherrypick echo $word | sed 's/ *$//g' | sed 's/^ *//g' | git cherry-pick --stdin done + - name: Build and publish artifacts uses: burrunan/gradle-cache-action@v1.10 with: @@ -77,6 +198,7 @@ jobs: GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + - name: Create Release id: create_release uses: actions/create-release@v1.1.4 @@ -87,6 +209,7 @@ jobs: release_name: Release v${{ github.event.inputs.version }} draft: true prerelease: false + - name: Upload Release Asset id: upload-release-asset uses: actions/upload-release-asset@v1.0.2 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index bfb5510b4d..cb8626fb18 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -45,6 +45,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - id: setup-test-java name: Set up JDK ${{ matrix.java }} for running tests uses: actions/setup-java@v2 @@ -77,6 +78,13 @@ jobs: path: /tmp/deadlock-detector-* if-no-files-found: ignore + # testLatestDep is intentionally not included in the PR workflow + # because any time a new library version is released to maven central + # it can fail due to test code incompatibility with the new release, + # or due to slight changes in emitted telemetry, which can be confusing for contributors + # (muzzle can also fail when a new library version is released to maven central + # but that happens much less often) + smoke-test: runs-on: ${{ matrix.os }} strategy: @@ -116,11 +124,13 @@ jobs: 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 + - id: set-matrix run: echo "::set-output name=matrix::{\"module\":[\"$(./gradlew -q instrumentation:listInstrumentations | xargs echo | sed 's/ /","/g')\"]}" @@ -133,11 +143,15 @@ 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 with: distribution: adopt java-version: 11 + - name: Run muzzle # using retry because of sporadic gradle download failures uses: nick-invision/retry@v2.4.0 @@ -177,6 +191,7 @@ jobs: # run this action to get workflow conclusion # You can get conclusion by env (env.WORKFLOW_CONCLUSION) - uses: technote-space/workflow-conclusion-action@v2.1.6 + - name: Fail build if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure run: exit 1 \ No newline at end of file diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 187cbadef8..e1112f58ea 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - id: setup-test-java name: Set up JDK ${{ matrix.java }} for running tests uses: actions/setup-java@v2 @@ -38,6 +39,27 @@ jobs: - name: Test run: ./gradlew test -PtestJavaVersion=${{ matrix.java }} --stacktrace -x :smoke-tests:test -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false + testLatestDep: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: latestDepTest + + - name: Test + run: ./gradlew test -x :smoke-tests:test -PtestLatestDeps=true --stacktrace + smoke-test: runs-on: ${{ matrix.os }} strategy: @@ -67,16 +89,42 @@ jobs: - name: Test run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.suite }} + example-distro: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Set up JDK 11 for running checks + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 11 + + - name: Restore cache + uses: burrunan/gradle-cache-action@v1.10 + with: + job-id: jdk11 + + - name: Build + run: ./gradlew build --stacktrace + working-directory: examples/distro + release: - needs: [ test, smoke-test ] + needs: [ test, testLatestDeps, smoke-test, example-distro ] name: Build and release runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v2 with: distribution: adopt java-version: 11 + - name: Build and publish artifacts uses: burrunan/gradle-cache-action@v1.10 with: @@ -90,6 +138,7 @@ jobs: GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + - name: Create Release id: create_release uses: actions/create-release@v1.1.4 @@ -100,6 +149,7 @@ jobs: release_name: Release v${{ github.event.inputs.version }} draft: true prerelease: false + - name: Upload Release Asset id: upload-release-asset uses: actions/upload-release-asset@v1.0.2