Skip to content

Commit b27f693

Browse files
authored
Merge pull request #53 from eed3si9n/wip/actions
ci: Update GitHub Actions
2 parents 25c4ec1 + 78b6d55 commit b27f693

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

.github/workflows/ci.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,22 @@ name: CI
22
on:
33
pull_request:
44
push:
5-
schedule:
6-
# 2am EST every Saturday
7-
- cron: '0 7 * * 6'
85
jobs:
96
build_scala2_12:
107
runs-on: ubuntu-latest
118
env:
9+
# define Java options for both official sbt and sbt-extras
1210
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
11+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1312
steps:
1413
- name: Checkout
15-
uses: actions/checkout@v2
16-
- name: Setup Scala
17-
uses: olafurpg/setup-scala@v13
14+
uses: actions/checkout@v4
15+
- name: Setup JDK
16+
uses: actions/setup-java@v4
1817
with:
19-
java-version: "[email protected]"
20-
- name: Coursier cache
21-
uses: coursier/cache-action@v6
18+
distribution: "zulu"
19+
java-version: 8
20+
cache: sbt
21+
- uses: sbt/setup-sbt@v1
2222
- name: Build and test
23-
run: |
24-
sbt -v clean +test +scripted
25-
rm -rf "$HOME/.ivy2/local" || true
26-
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
27-
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
28-
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
29-
find $HOME/.sbt -name "ivydata-*.properties" -delete || true
30-
shell: bash
23+
run: sbt -v clean +test +scripted

.github/workflows/release.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v2
11-
- name: Setup Scala
12-
uses: olafurpg/setup-scala@v13
10+
uses: actions/checkout@v4
11+
- name: Setup JDK
12+
uses: actions/setup-java@v4
1313
with:
14-
java-version: "[email protected]"
14+
distribution: "zulu"
15+
java-version: 8
16+
cache: sbt
17+
- uses: sbt/setup-sbt@v1
1518
- name: Release
1619
run: sbt ci-release
1720
env:

build.sbt

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ThisBuild / version := {
22
if ((ThisBuild / isSnapshot).value) "0.5.0" + "-SNAPSHOT"
33
else (ThisBuild / version).value
44
}
5-
ThisBuild / scalaVersion := "2.12.15"
5+
ThisBuild / scalaVersion := "2.12.20"
66

77
lazy val root = (project in file("."))
88
.enablePlugins(SbtPlugin)
@@ -21,9 +21,16 @@ lazy val root = (project in file("."))
2121
scriptedLaunchOpts ++= Seq("-Xms512m", "-Xmx512m", s"-Dproject.version=${version.value}")
2222
// scriptedBufferLog := false
2323

24-
pluginCrossBuild / sbtVersion := {
24+
(pluginCrossBuild / sbtVersion) := {
2525
scalaBinaryVersion.value match {
26-
case "2.12" => "1.1.6" // minimum sbt version
26+
case "2.12" => "1.2.8"
27+
case _ => "2.0.0-M3"
28+
}
29+
}
30+
scriptedSbt := {
31+
scalaBinaryVersion.value match {
32+
case "2.12" => "1.10.7"
33+
case _ => "2.0.0-M3"
2734
}
2835
}
2936
})

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.5
1+
sbt.version=1.10.7

project/plugins.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
2-
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.0")
1+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2")
2+
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.2")

src/sbt-test/proguard/scala3/test.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import java.nio.file.{Files, FileSystems}
2-
import scala.jdk.CollectionConverters.*
2+
import collection.JavaConverters._
33
import scala.sys.process.Process
44

55
// for sbt scripted test:

0 commit comments

Comments
 (0)