From 6b1917babaaf9bca5a9e6c26669cdf0f8aee40f4 Mon Sep 17 00:00:00 2001 From: Zac Blanco Date: Tue, 15 Oct 2024 08:47:03 -0700 Subject: [PATCH] Use matrix to test java 8 and 17 with GH actions --- .github/workflows/cleanup.yml | 42 ------------------- .github/workflows/hive-tests.yml | 14 +++++-- .github/workflows/kudu.yml | 7 +++- .github/workflows/maven-checks.yml | 7 +++- .../product-tests-basic-environment.yml | 7 +++- .../product-tests-specific-environment.yml | 14 +++++-- .github/workflows/singlestore-tests.yml | 7 +++- .github/workflows/spark-integration.yml | 7 +++- .github/workflows/test-other-modules.yml | 7 +++- .github/workflows/tests.yml | 5 ++- 10 files changed, 53 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml deleted file mode 100644 index 176ee6e86db25..0000000000000 --- a/.github/workflows/cleanup.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: cleanup - -on: - schedule: - - cron: '*/5 * * * *' - -jobs: - cancel: - runs-on: ubuntu-latest - steps: - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: hive-tests.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: kudu.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: maven-checks.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: product-tests-basic-environment.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: product-tests-specific-environment.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: spark-integration.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: tests.yml - - uses: n1hility/cancel-previous-runs@2e3c1893986568a2197c41957b9c809cbcf1a61e - with: - token: ${{ github.token }} - workflow: web-ui-checks.yml diff --git a/.github/workflows/hive-tests.yml b/.github/workflows/hive-tests.yml index 28f5f4e50cdf8..c9e8320970b01 100644 --- a/.github/workflows/hive-tests.yml +++ b/.github/workflows/hive-tests.yml @@ -31,12 +31,15 @@ jobs: - '!presto-docs/**' hive-tests: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-hive-tests-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-hive-tests-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -45,7 +48,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 @@ -83,12 +86,15 @@ jobs: fi hive-dockerized-tests: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 20 concurrency: - group: ${{ github.workflow }}-hive-dockerized-tests-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-hive-dockerized-tests-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -97,7 +103,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/kudu.yml b/.github/workflows/kudu.yml index 509c4db108203..51b9fb74cb385 100644 --- a/.github/workflows/kudu.yml +++ b/.github/workflows/kudu.yml @@ -29,12 +29,15 @@ jobs: codechange: - '!presto-docs/**' kudu: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-kudu-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-kudu-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -43,7 +46,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/maven-checks.yml b/.github/workflows/maven-checks.yml index 0af35311b49bf..77d03a8eada15 100644 --- a/.github/workflows/maven-checks.yml +++ b/.github/workflows/maven-checks.yml @@ -12,10 +12,13 @@ env: jobs: maven-checks: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest timeout-minutes: 45 concurrency: - group: ${{ github.workflow }}-maven-checks-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-maven-checks-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - name: Free Disk Space @@ -29,7 +32,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/product-tests-basic-environment.yml b/.github/workflows/product-tests-basic-environment.yml index f400ede359086..006b9529dd7a8 100644 --- a/.github/workflows/product-tests-basic-environment.yml +++ b/.github/workflows/product-tests-basic-environment.yml @@ -29,12 +29,15 @@ jobs: codechange: - '!presto-docs/**' product-tests-basic-environment: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-product-tests-basic-environment-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-product-tests-basic-environment-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - name: Free Disk Space @@ -49,7 +52,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/product-tests-specific-environment.yml b/.github/workflows/product-tests-specific-environment.yml index 5b2cbc4658407..873a0b2b09304 100644 --- a/.github/workflows/product-tests-specific-environment.yml +++ b/.github/workflows/product-tests-specific-environment.yml @@ -29,12 +29,15 @@ jobs: codechange: - '!presto-docs/**' product-tests-specific-environment1: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-product-tests-specific-environment1-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-product-tests-specific-environment1-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - name: Free Disk Space @@ -49,7 +52,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 @@ -80,12 +83,15 @@ jobs: run: presto-product-tests/bin/run_on_docker.sh multinode-tls-kerberos -g cli,group-by,join,tls product-tests-specific-environment2: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-product-tests-specific-environment2-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-product-tests-specific-environment2-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - name: Free Disk Space @@ -100,7 +106,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/singlestore-tests.yml b/.github/workflows/singlestore-tests.yml index 54f7b674718a8..c0a88d2f07b53 100644 --- a/.github/workflows/singlestore-tests.yml +++ b/.github/workflows/singlestore-tests.yml @@ -30,13 +30,16 @@ jobs: codechange: - '!presto-docs/**' singlestore-dockerized-tests: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 30 concurrency: - group: ${{ github.workflow }}-singlestore-dockerized-tests-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-singlestore-dockerized-tests-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -56,7 +59,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/spark-integration.yml b/.github/workflows/spark-integration.yml index facd2b93034da..55f0b7be47b76 100644 --- a/.github/workflows/spark-integration.yml +++ b/.github/workflows/spark-integration.yml @@ -30,12 +30,15 @@ jobs: codechange: - '!presto-docs/**' spark-integration: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-spark-integration-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-spark-integration-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -44,7 +47,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/test-other-modules.yml b/.github/workflows/test-other-modules.yml index 6d1c983307d15..3e72ffb51e64b 100644 --- a/.github/workflows/test-other-modules.yml +++ b/.github/workflows/test-other-modules.yml @@ -30,12 +30,15 @@ jobs: codechange: - '!presto-docs/**' test-other-modules: + strategy: + matrix: + java: [ 8, 17 ] runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.codechange == 'true' timeout-minutes: 60 concurrency: - group: ${{ github.workflow }}-test-other-modules-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-test-other-modules-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -44,7 +47,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository id: cache-maven uses: actions/cache@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f949be43b1066..5099494c920f9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,6 +36,7 @@ jobs: strategy: fail-fast: false matrix: + java: [8, 17] modules: - ":presto-tests -P presto-tests-execution-memory" - ":presto-tests -P presto-tests-general" @@ -68,7 +69,7 @@ jobs: - ":presto-iceberg" timeout-minutes: 80 concurrency: - group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }}-${{ matrix.java }} cancel-in-progress: true steps: - uses: actions/checkout@v4 @@ -79,7 +80,7 @@ jobs: if: needs.changes.outputs.codechange == 'true' with: distribution: 'temurin' - java-version: 17 + java-version: ${{ matrix.java }} - name: Cache local Maven repository if: needs.changes.outputs.codechange == 'true' id: cache-maven