Skip to content

Commit

Permalink
Add JDK21 and macos-latest plus windows latest to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jan 23, 2024
1 parent 5fa73f5 commit dbaf912
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
50 changes: 48 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,24 @@ jobs:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
scala: [2.12.18, 2.13.12, 3.3.1]
java: [temurin@8, temurin@11, temurin@17]
java: [temurin@8, temurin@11, temurin@17, temurin@21]
runs-on: ${{ matrix.os }}
steps:
- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
shell: bash
run: git config --global core.autocrlf false

- name: Configure pagefile for Windows
if: contains(runner.os, 'windows')
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 2GB
maximum-size: 8GB
disk-root: 'C:'

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -56,22 +69,35 @@ jobs:
java-version: 17
cache: sbt

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt

- name: Check that workflows are up to date
shell: bash
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck

- name: Report binary compatibility issues
shell: bash
run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Build project
shell: bash
run: sbt '++ ${{ matrix.scala }}' clean coverage test

- name: Upload coverage data to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: Scala ${{ matrix.scala }}
shell: bash
run: sbt '++ ${{ matrix.scala }}' coverageReport coverageAggregate coveralls

- name: Compress target directories
shell: bash
run: tar cf targets.tar target support/stream-circe/target http-json/target tests/target stream-json/target support/http-circe/target project/target

- name: Upload target directories
Expand All @@ -91,6 +117,18 @@ jobs:
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Ignore line ending differences in git
if: contains(runner.os, 'windows')
run: git config --global core.autocrlf false

- name: Configure pagefile for Windows
if: contains(runner.os, 'windows')
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 2GB
maximum-size: 8GB
disk-root: 'C:'

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -120,6 +158,14 @@ jobs:
java-version: 17
cache: sbt

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt

- name: Download target directories (2.12.18)
uses: actions/download-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ ThisBuild / githubWorkflowPublishTargetBranches :=
RefPredicate.Equals(Ref.Branch("main"))
)

ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest")

ThisBuild / githubWorkflowJavaVersions := List(
JavaSpec.temurin("8"),
JavaSpec.temurin("11"),
JavaSpec.temurin("17")
JavaSpec.temurin("17"),
JavaSpec.temurin("21")
)

0 comments on commit dbaf912

Please sign in to comment.