From 5049a6a1e590d9cd3b935ed00c45478afda3481f Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 17:53:48 -0400 Subject: [PATCH 1/7] Switch testing to JDK17 Progress toward #186 --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scala-steward.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7e1d68e..d4e904b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: - jvm: adopt:1.8 + jvm: adopt:1.17 - name: Build, test, and package project on Spark 3.5 run: bin/sbt clean compile test package makePom -DsparkVersion=3.5.1 - name: Build and package project on "legacy" Spark diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4c6c21c..3cd9a40 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: - jvm: adopt:1.8 + jvm: adopt:1.17 # uses sbt-github-packages, see build.sbt - name: Publish with SBT run: bin/sbt publish diff --git a/.github/workflows/scala-steward.yaml b/.github/workflows/scala-steward.yaml index 92d8c41..410cf0a 100644 --- a/.github/workflows/scala-steward.yaml +++ b/.github/workflows/scala-steward.yaml @@ -24,7 +24,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Launch Scala Steward uses: scala-steward-org/scala-steward-action@v2 with: From 945970ac1558b6497b38e9bb2fed788a56b92bd7 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:03:36 -0400 Subject: [PATCH 2/7] Use adoptium, new name from adopt --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4e904b..4c08827 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: - jvm: adopt:1.17 + jvm: adoptium:1.17 - name: Build, test, and package project on Spark 3.5 run: bin/sbt clean compile test package makePom -DsparkVersion=3.5.1 - name: Build and package project on "legacy" Spark diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3cd9a40..f4f8116 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: - jvm: adopt:1.17 + jvm: adoptium:1.17 # uses sbt-github-packages, see build.sbt - name: Publish with SBT run: bin/sbt publish From a1b6588a13b50494378d7c7f61abaf3c1f036d96 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:07:04 -0400 Subject: [PATCH 3/7] Adds MODERN_JAVA flag now that we're on a modern JDK --- .github/workflows/ci.yaml | 4 ++++ .github/workflows/release.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4c08827..7006578 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,5 +25,9 @@ jobs: jvm: adoptium:1.17 - name: Build, test, and package project on Spark 3.5 run: bin/sbt clean compile test package makePom -DsparkVersion=3.5.1 + env: + MODERN_JAVA: true - name: Build and package project on "legacy" Spark run: bin/sbt clean compile package makePom + env: + MODERN_JAVA: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f4f8116..31b1b24 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,5 +25,9 @@ jobs: # uses sbt-github-packages, see build.sbt - name: Publish with SBT run: bin/sbt publish + env: + MODERN_JAVA: true - name: Publish with SBT run: bin/sbt publish -DsparkVersion=3.5.1 + env: + MODERN_JAVA: true From 7664368caa80611a988946837f1b30320c873a91 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:19:13 -0400 Subject: [PATCH 4/7] Continue testing on JDK1.8 for legacy DV on Spark 2.3 --- .github/workflows/ci.yaml | 9 +++++---- .github/workflows/release.yaml | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7006578..2d28a0f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,11 @@ jobs: - uses: coursier/cache-action@v6 with: extraKey: ${{ runner.os }} + - uses: coursier/setup-action@v1 + with: + jvm: adopt:1.8 + - name: Build, test, and package project on "legacy" Spark + run: bin/sbt clean compile test package makePom - uses: coursier/setup-action@v1 with: jvm: adoptium:1.17 @@ -27,7 +32,3 @@ jobs: run: bin/sbt clean compile test package makePom -DsparkVersion=3.5.1 env: MODERN_JAVA: true - - name: Build and package project on "legacy" Spark - run: bin/sbt clean compile package makePom - env: - MODERN_JAVA: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 31b1b24..7dd600b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,13 +21,14 @@ jobs: extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: - jvm: adoptium:1.17 + jvm: adopt:1.8 # uses sbt-github-packages, see build.sbt - - name: Publish with SBT + - name: Publish for Spark 2 with SBT run: bin/sbt publish - env: - MODERN_JAVA: true - - name: Publish with SBT + - uses: coursier/setup-action@v1 + with: + jvm: adoptium:1.17 + - name: Publish for Spark 3 with SBT run: bin/sbt publish -DsparkVersion=3.5.1 env: MODERN_JAVA: true From e6f029aed11acad78cebcbef91cb79136e7807a4 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:24:25 -0400 Subject: [PATCH 5/7] Separate legacy and modern steps into separate jobs --- .github/workflows/ci.yaml | 13 +++++++++++-- .github/workflows/release.yaml | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d28a0f..f44985a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,8 +11,8 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - build: - name: Build and Test + build-legacy: + name: Build and Test on legacy JDK and Spark runs-on: ubuntu-latest steps: - name: Checkout current branch (full) @@ -25,6 +25,15 @@ jobs: jvm: adopt:1.8 - name: Build, test, and package project on "legacy" Spark run: bin/sbt clean compile test package makePom + build-modern: + name: Build and Test on Modern JDK and Spark + runs-on: ubuntu-latest + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + - uses: coursier/cache-action@v6 + with: + extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: jvm: adoptium:1.17 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7dd600b..ac9a0fd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - deploy: + deploy-legacy: name: Release runs-on: ubuntu-latest steps: @@ -23,12 +23,21 @@ jobs: with: jvm: adopt:1.8 # uses sbt-github-packages, see build.sbt - - name: Publish for Spark 2 with SBT + - name: Publish for Spark 2 / Scala 2.11 with SBT run: bin/sbt publish + deploy-modern: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + - uses: coursier/cache-action@v6 + with: + extraKey: ${{ runner.os }} - uses: coursier/setup-action@v1 with: jvm: adoptium:1.17 - - name: Publish for Spark 3 with SBT + - name: Publish for Spark 3 / Scala 2.12 with SBT run: bin/sbt publish -DsparkVersion=3.5.1 env: MODERN_JAVA: true From 0978a943b47de6fa6471ff47b29a939aa0f5ada8 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:25:16 -0400 Subject: [PATCH 6/7] Build only for push events Leave PR events for comments and whatnot --- .github/workflows/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f44985a..373b07f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,8 +2,6 @@ name: Continuous Integration on: workflow_call: - pull_request: - branches: ['*'] push: branches: ['*'] From 4aefbc7691c3140b756dbdddd4978d2b6db57495 Mon Sep 17 00:00:00 2001 From: Colin Dean Date: Wed, 10 Apr 2024 18:29:09 -0400 Subject: [PATCH 7/7] Uppercase true because that's what's the check is :upside_down_face: --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 373b07f..a8990fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,4 +38,4 @@ jobs: - name: Build, test, and package project on Spark 3.5 run: bin/sbt clean compile test package makePom -DsparkVersion=3.5.1 env: - MODERN_JAVA: true + MODERN_JAVA: TRUE diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ac9a0fd..4b7c280 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,4 +40,4 @@ jobs: - name: Publish for Spark 3 / Scala 2.12 with SBT run: bin/sbt publish -DsparkVersion=3.5.1 env: - MODERN_JAVA: true + MODERN_JAVA: TRUE