From 8d946556811503aea17f9acee064fcd50cbb49c2 Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Thu, 10 Aug 2023 14:18:15 +0200 Subject: [PATCH 01/10] Add concurrency in maven and gradle functional testing workflows --- .../workflows/test-native-gradle-plugin.yml | 45 +++++++++++++------ .../workflows/test-native-maven-plugin.yml | 30 ++++++++++--- build-logic/common-plugins/build.gradle.kts | 1 + ...graalvm.build.github-actions-helper.gradle | 37 +++++++++++++++ native-gradle-plugin/build.gradle | 1 + native-maven-plugin/build.gradle.kts | 1 + 6 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 822ceb21f..41b17adb1 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -22,14 +22,34 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/native-build-tools' }} jobs: + populate-matrix: + name: "Set matrix" + runs-on: "ubuntu-20.04" + timeout-minutes: 5 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: "☁️ Checkout repository" + uses: actions/checkout@v3 + - name: "πŸ”§ Prepare environment" + uses: graalvm/setup-graalvm@v1 + with: + java-version: '17' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: "πŸ•ΈοΈ Populate matrix" + id: set-matrix + run: | + ./gradlew :native-gradle-plugin:dumpFunctionalTestList + test-native-gradle-plugin: name: "Sanity checks" - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-20.04" + timeout-minutes: 60 + needs: populate-matrix strategy: fail-fast: false - matrix: - java-version: [ 17 ] - os: [ ubuntu-20.04 ] + matrix: ${{fromJson(needs.populate-matrix.outputs.matrix)}} steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -45,6 +65,7 @@ jobs: with: name: unit-tests-results path: native-gradle-plugin/build/reports/tests/test/ + functional-testing-gradle-plugin-dev: name: "Functional testing (GraalVM Dev Build)" runs-on: ${{ matrix.os }} @@ -79,17 +100,13 @@ jobs: name: functional-tests-results-graalvm-dev path: native-gradle-plugin/build/reports/tests/functionalTest/ functional-testing-gradle-plugin: - name: "Functional testing" + name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with gradle version: ${{ matrix.gradle-version }}" runs-on: ${{ matrix.os }} + timeout-minutes: 60 + needs: populate-matrix strategy: fail-fast: false - matrix: - gradle-version: ["current", "7.4"] - gradle-config-cache-version: ["current", "8.0.1"] - # Following versions are disabled temporarily in order to speed up PR testing - # "7.3.3", "7.2", "7.1", "6.8.3" - java-version: [ 17 ] - os: [ ubuntu-20.04 ] + matrix: ${{fromJson(needs.populate-matrix.outputs.matrix)}} steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -99,9 +116,9 @@ jobs: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin" - run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion=${{ matrix.gradle-version }} + run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion=${{ matrix.gradle-version }} --tests ${{ matrix.test }} - name: "❓ Check and test the plugin with configuration cache" - run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} + run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() uses: actions/upload-artifact@v3 diff --git a/.github/workflows/test-native-maven-plugin.yml b/.github/workflows/test-native-maven-plugin.yml index 572f65b6a..79b17c7c8 100644 --- a/.github/workflows/test-native-maven-plugin.yml +++ b/.github/workflows/test-native-maven-plugin.yml @@ -22,14 +22,34 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/native-build-tools' }} jobs: + populate-matrix: + name: "Set matrix" + runs-on: "ubuntu-20.04" + timeout-minutes: 5 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: "☁️ Checkout repository" + uses: actions/checkout@v3 + - name: "πŸ”§ Prepare environment" + uses: graalvm/setup-graalvm@v1 + with: + java-version: '17' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: "πŸ•ΈοΈ Populate matrix" + id: set-matrix + run: | + ./gradlew :native-maven-plugin:dumpFunctionalTestList + test-native-maven-plugin: - name: "Maven plugin tests" + name: "πŸ§ͺ Maven: ${{ matrix.test }} on ${{ matrix.os }}" runs-on: ${{ matrix.os }} + timeout-minutes: 60 + needs: populate-matrix strategy: fail-fast: false - matrix: - java-version: [ 17 ] - os: [ ubuntu-20.04 ] + matrix: ${{fromJson(needs.populate-matrix.outputs.matrix)}} steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -39,7 +59,7 @@ jobs: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin" - run: ./gradlew :native-maven-plugin:check --no-daemon + run: ./gradlew :native-maven-plugin:functionalTest --no-daemon --fail-fast --tests ${{ matrix.test }} - name: "πŸ“œ Upload unit test results" if: always() uses: actions/upload-artifact@v3 diff --git a/build-logic/common-plugins/build.gradle.kts b/build-logic/common-plugins/build.gradle.kts index e1fc239a9..424902864 100644 --- a/build-logic/common-plugins/build.gradle.kts +++ b/build-logic/common-plugins/build.gradle.kts @@ -41,6 +41,7 @@ plugins { `kotlin-dsl` + `groovy-gradle-plugin` } repositories { diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle new file mode 100644 index 000000000..d2a6afd58 --- /dev/null +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -0,0 +1,37 @@ +import groovy.json.JsonOutput + +import java.nio.file.Files + +def matrixDefault = [ + "gradle-version": ["current", "7.4"], + "gradle-config-cache-version": ["current", "8.0.1"], + // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", + "java-version": [ "17" ], + "os": [ "ubuntu-20.04" ] +] + +sourceSets.configureEach { sourceSet -> + if (sourceSet.name == 'functionalTest') { + tasks.register("dumpFunctionalTestList") { + doLast { + def matrix = [ + test: [] + ] + matrix.putAll(matrixDefault) + sourceSet.allSource.each { + matrix.test << it.name.substring(0, it.name.lastIndexOf('.')) + } + + String githubOut = System.getenv("GITHUB_OUTPUT") + if (githubOut != null) { + new File(githubOut).withWriterAppend { + it.println "matrix=${JsonOutput.toJson(matrix)}" + } + } else { + println "Warning: GITHUB_OUTPUT environment variable not found" + } + println "Build Matrix: $matrix" + } + } + } +} diff --git a/native-gradle-plugin/build.gradle b/native-gradle-plugin/build.gradle index a7ad9b3b1..d5ce50d35 100644 --- a/native-gradle-plugin/build.gradle +++ b/native-gradle-plugin/build.gradle @@ -47,6 +47,7 @@ plugins { id 'org.graalvm.build.java' id 'org.graalvm.build.functional-testing' id 'org.graalvm.build.publishing' + id 'org.graalvm.build.github-actions-helper' } maven { diff --git a/native-maven-plugin/build.gradle.kts b/native-maven-plugin/build.gradle.kts index 83cc46db2..78032343d 100644 --- a/native-maven-plugin/build.gradle.kts +++ b/native-maven-plugin/build.gradle.kts @@ -51,6 +51,7 @@ plugins { id("org.graalvm.build.publishing") id("org.graalvm.build.maven-plugin") id("org.graalvm.build.maven-functional-testing") + id("org.graalvm.build.github-actions-helper") } maven { From 8225541ef6deba73174854ff7584baebb5e77a3f Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Mon, 25 Sep 2023 15:14:47 +0200 Subject: [PATCH 02/10] Remove redudant test executions for maven plugin caused by multiple gradle versions --- .../workflows/test-native-gradle-plugin.yml | 2 ++ ...graalvm.build.github-actions-helper.gradle | 20 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 41b17adb1..357c85c32 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -99,6 +99,7 @@ jobs: with: name: functional-tests-results-graalvm-dev path: native-gradle-plugin/build/reports/tests/functionalTest/ + functional-testing-gradle-plugin: name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with gradle version: ${{ matrix.gradle-version }}" runs-on: ${{ matrix.os }} @@ -125,6 +126,7 @@ jobs: with: name: functional-tests-results-${{ matrix.gradle-version }} path: native-gradle-plugin/build/reports/tests/functionalTest/ + functional-testing-gradle-plugin-windows: name: "Windows Gradle plugin functional testing" runs-on: ${{ matrix.os }} diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle index d2a6afd58..c47ae371f 100644 --- a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -1,15 +1,16 @@ import groovy.json.JsonOutput -import java.nio.file.Files - def matrixDefault = [ - "gradle-version": ["current", "7.4"], - "gradle-config-cache-version": ["current", "8.0.1"], - // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", "java-version": [ "17" ], "os": [ "ubuntu-20.04" ] ] +def gradleVersions = [ + "gradle-version": ["current", "7.4"], + "gradle-config-cache-version": ["current", "8.0.1"] + // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", +] + sourceSets.configureEach { sourceSet -> if (sourceSet.name == 'functionalTest') { tasks.register("dumpFunctionalTestList") { @@ -17,7 +18,16 @@ sourceSets.configureEach { sourceSet -> def matrix = [ test: [] ] + + // add all defaults matrix.putAll(matrixDefault) + + // add gradle specific stuff + if (project.getDisplayName().contains(":native-gradle-plugin")) { + matrix.putAll(gradleVersions) + } + + // add functional tests sourceSet.allSource.each { matrix.test << it.name.substring(0, it.name.lastIndexOf('.')) } From 0347fa22aecf7f9bd2f250834c0f432b8d0249ba Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Mon, 9 Oct 2023 11:29:38 +0200 Subject: [PATCH 03/10] Reduce number of sanity checks --- .github/workflows/test-native-gradle-plugin.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 357c85c32..f6ec246e3 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -46,10 +46,11 @@ jobs: name: "Sanity checks" runs-on: "ubuntu-20.04" timeout-minutes: 60 - needs: populate-matrix strategy: fail-fast: false - matrix: ${{fromJson(needs.populate-matrix.outputs.matrix)}} + matrix: + java-version: [ 17 ] + os: [ ubuntu-20.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 From 154f98e8db1f70e8929dac531b7d88fcaefc5b6d Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Fri, 13 Oct 2023 14:16:07 +0200 Subject: [PATCH 04/10] Split jobs for gradle testing to avoid duplications --- .../workflows/test-native-gradle-plugin.yml | 48 +++++++++++++------ .../workflows/test-native-maven-plugin.yml | 26 +--------- ...graalvm.build.github-actions-helper.gradle | 13 +++-- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index f6ec246e3..1242051cd 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -40,7 +40,7 @@ jobs: - name: "πŸ•ΈοΈ Populate matrix" id: set-matrix run: | - ./gradlew :native-gradle-plugin:dumpFunctionalTestList + ./gradlew -PmatrixType=gradle :native-gradle-plugin:dumpFunctionalTestList test-native-gradle-plugin: name: "Sanity checks" @@ -119,23 +119,41 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin" run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion=${{ matrix.gradle-version }} --tests ${{ matrix.test }} - - name: "❓ Check and test the plugin with configuration cache" - run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() uses: actions/upload-artifact@v3 with: name: functional-tests-results-${{ matrix.gradle-version }} path: native-gradle-plugin/build/reports/tests/functionalTest/ - - functional-testing-gradle-plugin-windows: - name: "Windows Gradle plugin functional testing" + + populate-cache-matrix: + name: "Set cache matrix" + runs-on: "ubuntu-20.04" + timeout-minutes: 5 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: "☁️ Checkout repository" + uses: actions/checkout@v3 + - name: "πŸ”§ Prepare environment" + uses: graalvm/setup-graalvm@v1 + with: + java-version: '17' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: "πŸ•ΈοΈ Populate matrix" + id: set-matrix + run: | + ./gradlew -PmatrixType=gradleCached :native-gradle-plugin:dumpFunctionalTestList + + functional-testing-gradle-with-cache-version: + name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with cache gradle version: ${{ matrix.gradle-config-cache-version }}" runs-on: ${{ matrix.os }} + timeout-minutes: 60 + needs: populate-cache-matrix strategy: fail-fast: false - matrix: - java-version: [ 17 ] - os: [ windows-latest ] + matrix: ${{fromJson(needs.populate-cache-matrix.outputs.matrix)}} steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -144,11 +162,11 @@ jobs: with: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - - name: "❓ Check and test the Gradle plugin" - run: ./gradlew :native-gradle-plugin:functionalTest --no-daemon --fail-fast - - name: "πŸ“œ Upload tests results" + - name: "❓ Check and test the plugin with configuration cache" + run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} + - name: "πŸ“œ Upload functional tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: - name: windows-gradle-functional-tests-results - path: native-gradle-plugin/build/reports/tests/ + name: functional-tests-results-${{ matrix.gradle-config-cache-version }} + path: native-gradle-plugin/build/reports/tests/functionalTest/ diff --git a/.github/workflows/test-native-maven-plugin.yml b/.github/workflows/test-native-maven-plugin.yml index 79b17c7c8..c504cff26 100644 --- a/.github/workflows/test-native-maven-plugin.yml +++ b/.github/workflows/test-native-maven-plugin.yml @@ -40,7 +40,7 @@ jobs: - name: "πŸ•ΈοΈ Populate matrix" id: set-matrix run: | - ./gradlew :native-maven-plugin:dumpFunctionalTestList + ./gradlew -PmatrixType=maven :native-maven-plugin:dumpFunctionalTestList test-native-maven-plugin: name: "πŸ§ͺ Maven: ${{ matrix.test }} on ${{ matrix.os }}" @@ -66,27 +66,3 @@ jobs: with: name: maven-functional-tests-results-${{ matrix.os }} path: native-maven-plugin/build/reports/tests/ - test-native-maven-plugin-windows: - name: "Windows Minimal Tests for Maven plugin" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - java-version: [ 17 ] - os: [ windows-latest ] - steps: - - name: "☁️ Checkout repository" - uses: actions/checkout@v4 - - name: "πŸ”§ Prepare environment" - uses: ./.github/actions/prepare-environment - with: - java-version: ${{ matrix.java-version }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: "❓ Check and test the Maven plugin" - run: ./gradlew :native-maven-plugin:functionalTest --no-daemon --fail-fast - - name: "πŸ“œ Upload tests results" - if: always() - uses: actions/upload-artifact@v3 - with: - name: windows-maven-functional-tests-results - path: native-maven-plugin/build/reports/tests/ diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle index c47ae371f..ec829c3b4 100644 --- a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -2,13 +2,16 @@ import groovy.json.JsonOutput def matrixDefault = [ "java-version": [ "17" ], - "os": [ "ubuntu-20.04" ] + "os": [ "ubuntu-20.04", "windows-latest" ] ] +// # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", def gradleVersions = [ "gradle-version": ["current", "7.4"], +] + +def gradleCachedVersions = [ "gradle-config-cache-version": ["current", "8.0.1"] - // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", ] sourceSets.configureEach { sourceSet -> @@ -23,10 +26,14 @@ sourceSets.configureEach { sourceSet -> matrix.putAll(matrixDefault) // add gradle specific stuff - if (project.getDisplayName().contains(":native-gradle-plugin")) { + if (matrixType == "gradle") { matrix.putAll(gradleVersions) } + if (matrixType == "gradleCached") { + matrix.putAll(gradleCachedVersions) + } + // add functional tests sourceSet.allSource.each { matrix.test << it.name.substring(0, it.name.lastIndexOf('.')) From 26910fdc3e585bea99163c7dd59ab5d49cfa6b6b Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Fri, 13 Oct 2023 15:35:44 +0200 Subject: [PATCH 05/10] Remove windows testing --- .github/workflows/test-native-gradle-plugin.yml | 2 +- .../main/groovy/org.graalvm.build.github-actions-helper.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 1242051cd..07bf6ef47 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -163,7 +163,7 @@ jobs: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin with configuration cache" - run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} + run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() uses: actions/upload-artifact@v2 diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle index ec829c3b4..d124f9e43 100644 --- a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -2,7 +2,7 @@ import groovy.json.JsonOutput def matrixDefault = [ "java-version": [ "17" ], - "os": [ "ubuntu-20.04", "windows-latest" ] + "os": [ "ubuntu-20.04" ] ] // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", From 4e1248cd4c3a4234da878ad02e63296214b94beb Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Mon, 16 Oct 2023 12:34:13 +0200 Subject: [PATCH 06/10] Update .github/workflows/test-native-gradle-plugin.yml Co-authored-by: Fabio Niephaus --- .github/workflows/test-native-gradle-plugin.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 07bf6ef47..84cef3388 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -39,8 +39,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: "πŸ•ΈοΈ Populate matrix" id: set-matrix - run: | - ./gradlew -PmatrixType=gradle :native-gradle-plugin:dumpFunctionalTestList + run: ./gradlew -PmatrixType=gradle :native-gradle-plugin:dumpFunctionalTestList test-native-gradle-plugin: name: "Sanity checks" From 90572bf094daa33b1499a6ccaa3af70ee8e2fefb Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Mon, 16 Oct 2023 13:10:37 +0200 Subject: [PATCH 07/10] Reduce timeout --- .github/workflows/test-native-gradle-plugin.yml | 6 +++--- .github/workflows/test-native-maven-plugin.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 84cef3388..3af5ebc1b 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -44,7 +44,7 @@ jobs: test-native-gradle-plugin: name: "Sanity checks" runs-on: "ubuntu-20.04" - timeout-minutes: 60 + timeout-minutes: 40 strategy: fail-fast: false matrix: @@ -103,7 +103,7 @@ jobs: functional-testing-gradle-plugin: name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with gradle version: ${{ matrix.gradle-version }}" runs-on: ${{ matrix.os }} - timeout-minutes: 60 + timeout-minutes: 40 needs: populate-matrix strategy: fail-fast: false @@ -148,7 +148,7 @@ jobs: functional-testing-gradle-with-cache-version: name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with cache gradle version: ${{ matrix.gradle-config-cache-version }}" runs-on: ${{ matrix.os }} - timeout-minutes: 60 + timeout-minutes: 40 needs: populate-cache-matrix strategy: fail-fast: false diff --git a/.github/workflows/test-native-maven-plugin.yml b/.github/workflows/test-native-maven-plugin.yml index c504cff26..231dd89bc 100644 --- a/.github/workflows/test-native-maven-plugin.yml +++ b/.github/workflows/test-native-maven-plugin.yml @@ -45,7 +45,7 @@ jobs: test-native-maven-plugin: name: "πŸ§ͺ Maven: ${{ matrix.test }} on ${{ matrix.os }}" runs-on: ${{ matrix.os }} - timeout-minutes: 60 + timeout-minutes: 40 needs: populate-matrix strategy: fail-fast: false From 9850e8fe2055a8f853ec3df7af0cc138e0b03110 Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Wed, 18 Oct 2023 16:30:25 +0200 Subject: [PATCH 08/10] Rebase and update matrix --- .github/workflows/test-native-gradle-plugin.yml | 2 +- .../main/groovy/org.graalvm.build.github-actions-helper.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 3af5ebc1b..14d62472a 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -165,7 +165,7 @@ jobs: run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: functional-tests-results-${{ matrix.gradle-config-cache-version }} path: native-gradle-plugin/build/reports/tests/functionalTest/ diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle index d124f9e43..ec829c3b4 100644 --- a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -2,7 +2,7 @@ import groovy.json.JsonOutput def matrixDefault = [ "java-version": [ "17" ], - "os": [ "ubuntu-20.04" ] + "os": [ "ubuntu-20.04", "windows-latest" ] ] // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", From 62726c1d2d6ef6eb1d51f0affad2ef422d225920 Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Thu, 19 Oct 2023 10:52:37 +0200 Subject: [PATCH 09/10] Add quotes around gradle version to prevent windows failures --- .github/workflows/test-native-gradle-plugin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 14d62472a..e07de464a 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -117,7 +117,7 @@ jobs: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin" - run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion=${{ matrix.gradle-version }} --tests ${{ matrix.test }} + run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion="${{ matrix.gradle-version }}" --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() uses: actions/upload-artifact@v3 @@ -162,7 +162,7 @@ jobs: java-version: ${{ matrix.java-version }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: "❓ Check and test the plugin with configuration cache" - run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} --tests ${{ matrix.test }} + run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion="${{ matrix.gradle-config-cache-version }}" --tests ${{ matrix.test }} - name: "πŸ“œ Upload functional tests results" if: always() uses: actions/upload-artifact@v3 From 3b31ada531d6dd0053860de14599306136270db2 Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Thu, 19 Oct 2023 13:53:57 +0200 Subject: [PATCH 10/10] Increase timeout --- .github/workflows/test-native-gradle-plugin.yml | 6 +++--- .github/workflows/test-native-maven-plugin.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index e07de464a..997000877 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -44,7 +44,7 @@ jobs: test-native-gradle-plugin: name: "Sanity checks" runs-on: "ubuntu-20.04" - timeout-minutes: 40 + timeout-minutes: 50 strategy: fail-fast: false matrix: @@ -103,7 +103,7 @@ jobs: functional-testing-gradle-plugin: name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with gradle version: ${{ matrix.gradle-version }}" runs-on: ${{ matrix.os }} - timeout-minutes: 40 + timeout-minutes: 60 needs: populate-matrix strategy: fail-fast: false @@ -148,7 +148,7 @@ jobs: functional-testing-gradle-with-cache-version: name: "πŸ§ͺ Gradle: ${{ matrix.test }} on ${{ matrix.os }} with cache gradle version: ${{ matrix.gradle-config-cache-version }}" runs-on: ${{ matrix.os }} - timeout-minutes: 40 + timeout-minutes: 60 needs: populate-cache-matrix strategy: fail-fast: false diff --git a/.github/workflows/test-native-maven-plugin.yml b/.github/workflows/test-native-maven-plugin.yml index 231dd89bc..c504cff26 100644 --- a/.github/workflows/test-native-maven-plugin.yml +++ b/.github/workflows/test-native-maven-plugin.yml @@ -45,7 +45,7 @@ jobs: test-native-maven-plugin: name: "πŸ§ͺ Maven: ${{ matrix.test }} on ${{ matrix.os }}" runs-on: ${{ matrix.os }} - timeout-minutes: 40 + timeout-minutes: 60 needs: populate-matrix strategy: fail-fast: false