From 4dcfce8d23e1229e08c588dca44db0d207964b4c Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 3 Mar 2021 15:09:03 +0100 Subject: [PATCH 1/5] Revert "Disable "shadow" incremental CI for dependabot, master and release branches" This reverts commit 5c2fc26226d62cd5319615dec9382676aab62cd2. --- .github/workflows/ci-actions-incremental.yml | 30 ++++++-------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 5516eddd39179..f46834f1197ef 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -4,9 +4,6 @@ on: push: branches-ignore: - 'dependabot/**' - # TODO: revisit master and 1.** in case incremental becomes the default - - 'master' - - '1.**' # paths-ignore in ci-fork-mvn-cache.yml should match paths-ignore: - '.gitignore' @@ -46,8 +43,7 @@ jobs: name: "CI Sanity Check" runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" steps: - name: Build run: sleep 30 @@ -56,8 +52,7 @@ jobs: runs-on: ubuntu-latest # Skip master in forks # Skip draft PRs and those with WIP in the subject, rerun as soon as its removed - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "((github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')) && ( \ + if: "(github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')) && ( \ github.event_name != 'pull_request' || ( \ github.event.pull_request.draft == false && \ github.event.pull_request.state != 'closed' && \ @@ -149,8 +144,7 @@ jobs: name: JVM Tests - JDK ${{matrix.java.name}} runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" needs: build-jdk11 timeout-minutes: 240 env: @@ -274,8 +268,7 @@ jobs: name: Maven Tests - JDK ${{matrix.java.name}} runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" needs: build-jdk11 timeout-minutes: 60 strategy: @@ -366,8 +359,7 @@ jobs: name: Gradle Tests - JDK ${{matrix.java.name}} runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" needs: build-jdk11 timeout-minutes: 60 strategy: @@ -440,8 +432,7 @@ jobs: name: Devtools Tests - JDK ${{matrix.java.name}} runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" needs: build-jdk11 timeout-minutes: 60 strategy: @@ -532,8 +523,7 @@ jobs: name: MicroProfile TCKs Tests needs: build-jdk11 # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" runs-on: ubuntu-latest timeout-minutes: 150 @@ -589,8 +579,7 @@ jobs: name: Native Tests - Read JSON matrix runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" outputs: matrix: ${{ steps.read.outputs.matrix }} steps: @@ -606,8 +595,7 @@ jobs: needs: [build-jdk11, native-tests-read-json-matrix] runs-on: ubuntu-latest # Skip master in forks - # TODO: revisit dependabot predicate in case incremental becomes the default - if: "(github.repository == 'quarkusio/quarkus' && !contains(github.head_ref, 'dependabot/')) || !endsWith(github.ref, '/master')" + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" # Ignore the following YAML Schema error timeout-minutes: ${{matrix.timeout}} strategy: From da58dda3edd348a287f5b7100ea24d33facf61c5 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 3 Mar 2021 15:19:52 +0100 Subject: [PATCH 2/5] Disable standard CI workflow in favor of the incremental one --- .github/workflows/{ci-actions.yml => ci-actions.yml.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci-actions.yml => ci-actions.yml.disabled} (100%) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml.disabled similarity index 100% rename from .github/workflows/ci-actions.yml rename to .github/workflows/ci-actions.yml.disabled From f5fde84ba2079bbd3b4af8df8753c9267706abe5 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 3 Mar 2021 15:20:14 +0100 Subject: [PATCH 3/5] Enable all testing for incremental CI We previously disabled some builds to reduce the load. --- .github/workflows/ci-actions-incremental.yml | 342 +++++++++---------- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index f46834f1197ef..92ded24826093 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -1,4 +1,4 @@ -name: Quarkus CI incremental +name: Quarkus CI on: push: @@ -153,20 +153,20 @@ jobs: fail-fast: false matrix: java : - #- { name: "8", - # java-version: 8, - # maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" - #} + - { name: "8", + java-version: 8, + maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" + } - { name: "11", java-version: 11, maven_args: "" } - #- { - # name: "15", - # java-version: 15, - # maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" - #} + - { + name: "15", + java-version: 15, + maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" + } steps: - name: Stop mysql @@ -218,51 +218,51 @@ jobs: name: test-reports-linux-jvm${{matrix.java.name}} path: 'test-reports.tgz' -# windows-jdk11-jvm-tests: -# name: JVM Tests - JDK 11 Windows -# runs-on: windows-latest -# # Skip master in forks -# if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" -# needs: build-jdk11 -# timeout-minutes: 180 -# env: -# MAVEN_OPTS: -Xmx1408m -XX:MaxMetaspaceSize=1000m -# -# steps: -# - uses: actions/checkout@v2 -# with: -# fetch-depth: 0 -# - name: Add quarkusio remote -# shell: bash -# run: git remote add quarkusio https://github.com/quarkusio/quarkus.git -# - name: Set up JDK 11 -# # Uses sha for added security since tags can be updated -# uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 -# with: -# java-version: 11 -# - name: Download Maven Repo -# uses: actions/download-artifact@v1 -# with: -# name: maven-repo -# path: . -# - name: Extract Maven Repo -# shell: bash -# run: tar -xzf maven-repo.tgz -C ~ -# - name: Build with Maven -# shell: bash -# run: mvn -B --settings .github/mvn-settings.xml -DskipDocs -Dformat.skip -pl !integration-tests/gradle -pl !integration-tests/maven -pl !integration-tests/devtools install ${{ needs.build-jdk11.outputs.gib_args }} -# - name: Prepare failure archive (if maven failed) -# if: failure() -# shell: bash -# run: | -# # Disambiguate windows find from cygwin find -# /usr/bin/find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - -# - name: Upload failure Archive (if maven failed) -# uses: actions/upload-artifact@v1 -# if: failure() -# with: -# name: test-reports-windows-jdk11-jvm -# path: 'test-reports.tgz' + windows-jdk11-jvm-tests: + name: JVM Tests - JDK 11 Windows + runs-on: windows-latest + # Skip master in forks + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" + needs: build-jdk11 + timeout-minutes: 180 + env: + MAVEN_OPTS: -Xmx1408m -XX:MaxMetaspaceSize=1000m + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Add quarkusio remote + shell: bash + run: git remote add quarkusio https://github.com/quarkusio/quarkus.git + - name: Set up JDK 11 + # Uses sha for added security since tags can be updated + uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 + with: + java-version: 11 + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ + - name: Build with Maven + shell: bash + run: mvn -B --settings .github/mvn-settings.xml -DskipDocs -Dformat.skip -pl !integration-tests/gradle -pl !integration-tests/maven -pl !integration-tests/devtools install ${{ needs.build-jdk11.outputs.gib_args }} + - name: Prepare failure archive (if maven failed) + if: failure() + shell: bash + run: | + # Disambiguate windows find from cygwin find + /usr/bin/find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - + - name: Upload failure Archive (if maven failed) + uses: actions/upload-artifact@v1 + if: failure() + with: + name: test-reports-windows-jdk11-jvm + path: 'test-reports.tgz' linux-jvm-maven-tests: name: Maven Tests - JDK ${{matrix.java.name}} @@ -312,48 +312,48 @@ jobs: name: test-reports-linux-maven-java${{matrix.java.name}} path: 'test-reports.tgz' -# windows-jdk11-jvm-maven-tests: -# name: Maven Tests - JDK 11 Windows -# runs-on: windows-latest -# # Skip master in forks -# if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" -# needs: build-jdk11 -# timeout-minutes: 60 -# strategy: -# fail-fast: false -# steps: -# - uses: actions/checkout@v2 -# with: -# fetch-depth: 0 -# - name: Add quarkusio remote -# shell: bash -# run: git remote add quarkusio https://github.com/quarkusio/quarkus.git -# - name: Download Maven Repo -# uses: actions/download-artifact@v1 -# with: -# name: maven-repo -# path: . -# - name: Extract Maven Repo -# shell: bash -# run: tar -xzf maven-repo.tgz -C ~ -# - name: Set up JDK 11 -# # Uses sha for added security since tags can be updated -# uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 -# with: -# java-version: 11 -# - name: Run Maven integration tests -# shell: bash -# run: mvn $JVM_TEST_MAVEN_OPTS install -pl 'integration-tests/maven' ${{ needs.build-jdk11.outputs.gib_args }} -# - name: Prepare failure archive (if maven failed) -# if: failure() -# shell: bash -# run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - -# - name: Upload failure Archive (if maven failed) -# uses: actions/upload-artifact@v1 -# if: failure() -# with: -# name: test-reports-windows-maven-java11 -# path: 'test-reports.tgz' + windows-jdk11-jvm-maven-tests: + name: Maven Tests - JDK 11 Windows + runs-on: windows-latest + # Skip master in forks + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" + needs: build-jdk11 + timeout-minutes: 60 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Add quarkusio remote + shell: bash + run: git remote add quarkusio https://github.com/quarkusio/quarkus.git + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ + - name: Set up JDK 11 + # Uses sha for added security since tags can be updated + uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 + with: + java-version: 11 + - name: Run Maven integration tests + shell: bash + run: mvn $JVM_TEST_MAVEN_OPTS install -pl 'integration-tests/maven' ${{ needs.build-jdk11.outputs.gib_args }} + - name: Prepare failure archive (if maven failed) + if: failure() + shell: bash + run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - + - name: Upload failure Archive (if maven failed) + uses: actions/upload-artifact@v1 + if: failure() + with: + name: test-reports-windows-maven-java11 + path: 'test-reports.tgz' linux-jvm-gradle-tests: name: Gradle Tests - JDK ${{matrix.java.name}} @@ -395,38 +395,38 @@ jobs: build-root-directory: integration-tests/gradle arguments: clean test -i -S --stacktrace --no-daemon -# windows-jdk11-jvm-gradle-tests: -# name: Gradle Tests - JDK 11 Windows -# needs: build-jdk11 -# # Skip master in forks -# if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" -# runs-on: windows-latest -# timeout-minutes: 80 -# steps: -# - uses: actions/checkout@v2 -# - name: Set up JDK 11 -# # Uses sha for added security since tags can be updated -# uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 -# with: -# java-version: 11 -# - name: Download Maven Repo -# uses: actions/download-artifact@v1 -# with: -# name: maven-repo -# path: . -# - name: Extract Maven Repo -# shell: bash -# run: tar -xzf maven-repo.tgz -C ~ -# - name: Build with Gradle -# uses: eskatos/gradle-command-action@v1 -# timeout-minutes: 60 -# env: -# GRADLE_OPTS: -Xmx1408m -# with: -# gradle-version: wrapper -# wrapper-directory: integration-tests/gradle -# build-root-directory: integration-tests/gradle -# arguments: clean test -i -S --stacktrace --no-daemon + windows-jdk11-jvm-gradle-tests: + name: Gradle Tests - JDK 11 Windows + needs: build-jdk11 + # Skip master in forks + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" + runs-on: windows-latest + timeout-minutes: 80 + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + # Uses sha for added security since tags can be updated + uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 + with: + java-version: 11 + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ + - name: Build with Gradle + uses: eskatos/gradle-command-action@v1 + timeout-minutes: 60 + env: + GRADLE_OPTS: -Xmx1408m + with: + gradle-version: wrapper + wrapper-directory: integration-tests/gradle + build-root-directory: integration-tests/gradle + arguments: clean test -i -S --stacktrace --no-daemon linux-jvm-devtools-tests: name: Devtools Tests - JDK ${{matrix.java.name}} @@ -476,48 +476,48 @@ jobs: name: test-reports-linux-devtools-java${{matrix.java.name}} path: 'test-reports.tgz' -# windows-jdk11-jvm-devtools-tests: -# name: Devtools Tests - JDK 11 Windows -# runs-on: windows-latest -# # Skip master in forks -# if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" -# needs: build-jdk11 -# timeout-minutes: 60 -# strategy: -# fail-fast: false -# steps: -# - uses: actions/checkout@v2 -# with: -# fetch-depth: 0 -# - name: Add quarkusio remote -# shell: bash -# run: git remote add quarkusio https://github.com/quarkusio/quarkus.git -# - name: Download Maven Repo -# uses: actions/download-artifact@v1 -# with: -# name: maven-repo -# path: . -# - name: Extract Maven Repo -# shell: bash -# run: tar -xzf maven-repo.tgz -C ~ -# - name: Set up JDK 11 -# # Uses sha for added security since tags can be updated -# uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 -# with: -# java-version: 11 -# - name: Run Devtools integration tests -# shell: bash -# run: mvn $JVM_TEST_MAVEN_OPTS install -pl 'integration-tests/devtools' ${{ needs.build-jdk11.outputs.gib_args }} -# - name: Prepare failure archive (if maven failed) -# if: failure() -# shell: bash -# run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - -# - name: Upload failure Archive (if maven failed) -# uses: actions/upload-artifact@v1 -# if: failure() -# with: -# name: test-reports-windows-devtools-java11 -# path: 'test-reports.tgz' + windows-jdk11-jvm-devtools-tests: + name: Devtools Tests - JDK 11 Windows + runs-on: windows-latest + # Skip master in forks + if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/master')" + needs: build-jdk11 + timeout-minutes: 60 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Add quarkusio remote + shell: bash + run: git remote add quarkusio https://github.com/quarkusio/quarkus.git + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ + - name: Set up JDK 11 + # Uses sha for added security since tags can be updated + uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 + with: + java-version: 11 + - name: Run Devtools integration tests + shell: bash + run: mvn $JVM_TEST_MAVEN_OPTS install -pl 'integration-tests/devtools' ${{ needs.build-jdk11.outputs.gib_args }} + - name: Prepare failure archive (if maven failed) + if: failure() + shell: bash + run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T - + - name: Upload failure Archive (if maven failed) + uses: actions/upload-artifact@v1 + if: failure() + with: + name: test-reports-windows-devtools-java11 + path: 'test-reports.tgz' tcks-test: name: MicroProfile TCKs Tests From 58a4e0410dbc12e3aad1ebab23836e0b7758e0d6 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 3 Mar 2021 15:23:23 +0100 Subject: [PATCH 4/5] Fix a few minor YAML formatting issues Noticed while validating the file with yamllint. --- .github/workflows/ci-actions-incremental.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 92ded24826093..1d8f40b184bca 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -152,10 +152,11 @@ jobs: strategy: fail-fast: false matrix: - java : - - { name: "8", - java-version: 8, - maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" + java: + - { + name: "8", + java-version: 8, + maven_args: "-pl !integration-tests/kubernetes/quarkus-standard-way" } - { name: "11", @@ -366,7 +367,7 @@ jobs: fail-fast: false matrix: java: - - { + - { name: "11", java-version: 11 } From c74ae8bb4a52879041ec438fcbf3fa7c4816693a Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 3 Mar 2021 17:54:14 +0100 Subject: [PATCH 5/5] Update Docker Client User Agent in CI in incremental build --- .github/workflows/ci-actions-incremental.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 1d8f40b184bca..8aca2a8382bac 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -617,6 +617,11 @@ jobs: java-version: 11 - name: Reclaim Disk Space run: .github/ci-prerequisites.sh + # We do this so we can get better analytics for the downloaded version of the build images + - name: Update Docker Client User Agent + shell: bash + run: | + cat <<< $(jq '.HttpHeaders += {"User-Agent": "Quarkus-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json - name: Download Maven Repo uses: actions/download-artifact@v1 with: