Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Java 8 support && Introduce Java21 #296

Merged
merged 7 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
name: CI
env:
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags
JVM_OPTS: -XX:+PrintCommandLineFlags
'on':
workflow_dispatch: {}
release:
Expand All @@ -21,16 +20,16 @@ jobs:
continue-on-error: true
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: '8'
distribution: corretto
Copy link
Member Author

@guizmaii guizmaii Sep 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temurin didn't publish their version of Java 21 yet

java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
Expand All @@ -46,16 +45,16 @@ jobs:
continue-on-error: false
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
Expand All @@ -71,22 +70,22 @@ jobs:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
- '21'
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
Expand All @@ -98,16 +97,16 @@ jobs:
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
Expand Down Expand Up @@ -172,16 +171,16 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
Expand All @@ -201,16 +200,16 @@ jobs:
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
java-version: '8'
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
Expand All @@ -232,7 +231,7 @@ jobs:
if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: notify the main repo about the new release of docs package
Expand Down
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,20 @@ test:
strategy:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
java: ['11', '17', '21']
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
Expand All @@ -171,12 +168,12 @@ In some cases, we may have multiple submodules in our project and we want to tes

The `ciTargetScalaVersions` setting key is used to define a mapping of project names to the Scala versions that should be used for testing phase of continuous integration (CI).

For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.18`, and for the "submoduleB" we want to test it against Scala `2.12.18` and `2.13.11` and `3.3.0`, We can define the `ciTargetScalaVersions` setting as follows:
For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.18`, and for the "submoduleB" we want to test it against Scala `2.12.18` and `2.13.12` and `3.3.1`, We can define the `ciTargetScalaVersions` setting as follows:

```scala
ThisBuild / ciTargetScalaVersions := Map(
"submoduleA" -> Seq("2.12.18"),
"submoduleB" -> Seq("2.12.18", "2.13.11", "3.3.0")
"submoduleB" -> Seq("2.12.18", "2.13.12", "3.3.1")
)
```

Expand Down Expand Up @@ -207,28 +204,25 @@ test:
strategy:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
java: ['11', '17', '21']
scala-project:
- ++2.12.18 submoduleA
- ++2.12.18 submoduleB
- ++2.13.11 submoduleB
- ++3.3.0 submoduleB
- ++2.13.12 submoduleB
- ++3.3.1 submoduleB
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
Expand Down
27 changes: 10 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,20 @@ test:
continue-on-error: false
strategy:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
java: ['11', '17', '21']
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
Expand All @@ -170,12 +166,12 @@ In some cases, we may have multiple submodules in our project and we want to tes

The `ciTargetScalaVersions` setting key is used to define a mapping of project names to the Scala versions that should be used for testing phase of continuous integration (CI).

For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.18`, and for the "submoduleB" we want to test it against Scala `2.12.18` and `2.13.11` and `3.3.0`, We can define the `ciTargetScalaVersions` setting as follows:
For example, suppose we have a project with the name "submoduleA" and we want to test it against Scala `2.12.18`, and for the "submoduleB" we want to test it against Scala `2.12.18` and `2.13.12` and `3.3.1`, We can define the `ciTargetScalaVersions` setting as follows:

```scala
ThisBuild / ciTargetScalaVersions := Map(
"submoduleA" -> Seq("2.12.18"),
"submoduleB" -> Seq("2.12.18", "2.13.11", "3.3.0")
"submoduleB" -> Seq("2.12.18", "2.13.12", "3.3.1")
)
```

Expand Down Expand Up @@ -206,28 +202,25 @@ test:
strategy:
fail-fast: false
matrix:
java:
- '8'
- '11'
- '17'
java: ['11', '17', '21']
scala-project:
- ++2.12.18 submoduleA
- ++2.12.18 submoduleB
- ++2.13.11 submoduleB
- ++3.3.0 submoduleB
- ++2.13.12 submoduleB
- ++3.3.1 submoduleB
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/[email protected]
with:
distribution: temurin
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.0
with:
fetch-depth: '0'
- name: Test
Expand Down
6 changes: 3 additions & 3 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Versions {
val Scala212 = "2.12.18"
val Scala213 = "2.13.11"
val Scala3 = "3.3.0"
val zio = "2.0.16"
val Scala213 = "2.13.12"
val Scala3 = "3.3.1"
val zio = "2.0.17"
}
2 changes: 1 addition & 1 deletion zio-sbt-ci/src/main/scala/zio/sbt/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object V {
"peter-evans/create-pull-request" -> "v5.0.2",
"zio/generate-github-app-token" -> "v1.0.0",
"pierotofy/set-swap-space" -> "master",
"actions/checkout" -> "v4.0.0",
"actions/checkout" -> "v4.1.0",
"actions/setup-java" -> "v3.13.0",
"coursier/cache-action" -> "v6",
"actions/setup-node" -> "v3"
Expand Down
Loading