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

Add windows-latest to CI #42

Merged
merged 1 commit into from
Oct 6, 2024
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
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,31 @@ jobs:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-latest]
os:
- ubuntu-latest
- macos-12
- macos-latest
- windows-latest
scala: [2.12.20, 2.13.15, 3.3.4]
java: [temurin@8, temurin@11, temurin@17, temurin@21]
exclude:
- java: temurin@8
os: macos-latest
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/[email protected]
with:
minimum-size: 2GB
maximum-size: 8GB
disk-root: 'C:'

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -72,24 +89,30 @@ jobs:

- name: Install sbt
if: matrix.os == 'macos-latest'
shell: bash
run: brew install sbt

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

- name: Report version policy issues
shell: bash
run: sbt '++ ${{ matrix.scala }}' versionPolicyCheck

- 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 @@ -109,6 +132,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/[email protected]
with:
minimum-size: 2GB
maximum-size: 8GB
disk-root: 'C:'

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ ThisBuild / githubWorkflowPublishTargetBranches :=
RefPredicate.Equals(Ref.Branch("main"))
)

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

ThisBuild / githubWorkflowJavaVersions := List(
JavaSpec.temurin("8"),
Expand Down
Loading