Skip to content

Commit

Permalink
Merge pull request #463 from mdedetrich/use-githubWorkflowWindowsPage…
Browse files Browse the repository at this point in the history
…fileFix

Use githubWorkflowWindowsPagefileFix from newest sbt-github-actions
  • Loading branch information
sirthias authored Jun 7, 2023
2 parents e19281a + 8532a28 commit e70caf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
if: contains(runner.os, 'windows')
uses: al-cheb/[email protected]
with:
minimum-size: 2GB
maximum-size: 8GB
minimum-size: 4GB
maximum-size: 16GB

- name: Checkout current branch (full)
uses: actions/checkout@v3
Expand Down Expand Up @@ -68,13 +68,6 @@ jobs:
java-version: 17
cache: sbt

- name: Configure pagefile for Windows
if: contains(runner.os, 'windows')
uses: al-cheb/[email protected]
with:
minimum-size: 4GB
maximum-size: 16GB

- name: Check that workflows are up to date
shell: bash
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
Expand Down Expand Up @@ -117,8 +110,8 @@ jobs:
if: contains(runner.os, 'windows')
uses: al-cheb/[email protected]
with:
minimum-size: 2GB
maximum-size: 8GB
minimum-size: 4GB
maximum-size: 16GB

- name: Checkout current branch (full)
uses: actions/checkout@v3
Expand Down
15 changes: 3 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sbtcrossproject.CrossPlugin.autoImport._
import sbtghactions.windows

val Scala2_12 = "2.12.18"
val Scala2_13 = "2.13.11"
Expand Down Expand Up @@ -261,18 +262,8 @@ ThisBuild / githubWorkflowPublish := Seq(
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11"), JavaSpec.temurin("17"))
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "windows-latest")

// Workaround that is necessary for Windows,
// see https://github.com/scala-native/scala-native/blob/9a185986f10a5e69c32339d5701c1196e9885e17/.github/actions/windows-setup-env/action.yml#L21-L33
ThisBuild / githubWorkflowBuildPreamble := Seq(
WorkflowStep.Use(
name = Some("Configure pagefile for Windows"),
ref = UseRef.Public("al-cheb", "configure-pagefile-action", "v1.3"),
params = Map(
"minimum-size" -> "4GB",
"maximum-size" -> "16GB"
),
cond = Some("contains(runner.os, 'windows')")
)
ThisBuild / githubWorkflowWindowsPagefileFix := Some(
windows.PagefileFix("4GB", "16GB")
)

ThisBuild / githubWorkflowBuild := Seq(
Expand Down

0 comments on commit e70caf9

Please sign in to comment.