diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e9cf89..aa97169 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,15 @@ jobs: if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update + - name: Cache vcpkg + uses: actions/cache@v4 + with: + key: ${{ runner.os }}-sbt-vcpkg + path: | + ~/Library/Caches/sbt-vcpkg/vcpkg-install + ~/.cache/sbt-vcpkg/vcpkg-install + ~/.cache/sbt-vcpkg/vcpkg + - name: Check that workflows are up to date run: sbt githubWorkflowCheck diff --git a/build.sbt b/build.sbt index 7e3b668..d017be2 100644 --- a/build.sbt +++ b/build.sbt @@ -20,6 +20,24 @@ ThisBuild / scalacOptions ++= Seq( "-language:implicitConversions" ) +ThisBuild / githubWorkflowBuildPreamble += { + import org.typelevel.sbt.gha.* + import WorkflowStep.* + + val paths = + List( + "~/Library/Caches/sbt-vcpkg/vcpkg-install", + "~/.cache/sbt-vcpkg/vcpkg-install", + "~/.cache/sbt-vcpkg/vcpkg" + ) + + Use( + UseRef.Public("actions", "cache", "v4"), + name = Some("Cache vcpkg"), + params = Map("key" -> "${{ runner.os }}-sbt-vcpkg", "path" -> paths.mkString("\n")) + ) +} + val Scala3 = "3.4.1" ThisBuild / scalaVersion := Scala3 // the default Scala