From 052db212adb52a7f9f64fbd7bfe06b0816056ef4 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Tue, 23 Jan 2024 12:35:39 +1100 Subject: [PATCH] Add macos-latest and windows-latest to CI --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++-- build.sbt | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45f6c73..cace8e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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] 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: @@ -65,11 +78,14 @@ jobs: cache: sbt - name: Check that workflows are up to date + shell: bash run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - - run: sbt '++ ${{ matrix.scala }}' test scripted + - shell: bash + run: sbt '++ ${{ matrix.scala }}' test scripted - name: Compress target directories + shell: bash run: tar cf targets.tar target project/target - name: Upload target directories @@ -89,6 +105,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: diff --git a/build.sbt b/build.sbt index 82d7601..bb4b333 100644 --- a/build.sbt +++ b/build.sbt @@ -55,7 +55,7 @@ ThisBuild / githubWorkflowPublish := Seq( ) ) -ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest") +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest") ThisBuild / githubWorkflowJavaVersions := Seq( JavaSpec.temurin("8"),