Skip to content

Commit

Permalink
Drop Java 8 support && Introduce Java21 (#296)
Browse files Browse the repository at this point in the history
* Drop Java 8 support

* Drop Java 8 support

* Drop Java 8 support

* Drop Java 8 support

* scalafmt

* Update actions/checkout to v4.1.0
  • Loading branch information
guizmaii authored Sep 24, 2023
1 parent 47de8fc commit 3a44fe8
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 84 deletions.
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/setup-java@v3.13.0
with:
distribution: temurin
java-version: '8'
distribution: corretto
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/setup-java@v3.13.0
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/setup-java@v3.13.0
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/setup-java@v3.13.0
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/setup-java@v3.13.0
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/setup-java@v3.13.0
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/setup-java@v3.12.0
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/setup-java@v3.10.0
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/setup-java@v3.12.0
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/setup-java@v3.10.0
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

0 comments on commit 3a44fe8

Please sign in to comment.