diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e33811f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 4a15fc8..4447d35 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -13,22 +13,29 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + java: ['8', '17'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: 8 + distribution: 'temurin' + java-version: ${{ matrix.java }} - name: Run tests run: ./mill -i all __.publishArtifacts __.test + check-binary-compatibility: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: 8 + - name: Check Binary Compatibility run: ./mill -i __.mimaReportBinaryIssues @@ -45,9 +52,10 @@ jobs: LC_MESSAGES: "en_US.UTF-8" LC_ALL: "en_US.UTF-8" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: 8 - name: Publish to Maven Central run: | @@ -72,5 +80,4 @@ jobs: with: tag_name: ${{ github.ref }} release_name: ${{ github.ref }} - body: draft: false diff --git a/.mill-version b/.mill-version new file mode 100644 index 0000000..9028ec6 --- /dev/null +++ b/.mill-version @@ -0,0 +1 @@ +0.10.5 diff --git a/build.sc b/build.sc index 27385fe..ff65152 100644 --- a/build.sc +++ b/build.sc @@ -1,41 +1,42 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._ import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4` import de.tobiasroeser.mill.vcs.version.VcsVersion -import $ivy.`com.github.lolgab::mill-mima::0.0.9` +import $ivy.`com.github.lolgab::mill-mima::0.0.10` import com.github.lolgab.mill.mima._ +import mill.scalalib.api.Util.isScala3 -val dottyCustomVersion = sys.props.get("dottyVersion") +val communityBuildDottyVersion = sys.props.get("dottyVersion").toList val scala211 = "2.11.12" -val scala212 = "2.12.13" -val scala213 = "2.13.4" -val scala30 = "3.0.0" -val scala31 = "3.1.1" +val scala212 = "2.12.16" +val scala213 = "2.13.8" +val scala3 = "3.1.3" -val scala2VersionsAndDotty = scala213 :: scala212 :: scala211 :: dottyCustomVersion.toList +val scalaVersions = scala3 :: scala213 :: scala212 :: scala211 :: communityBuildDottyVersion -val scalaJSVersions = for { - scalaV <- scala30 :: scala2VersionsAndDotty - scalaJSV <- Seq("0.6.33", "1.5.1") - if scalaV.startsWith("2.") || scalaJSV.startsWith("1.") -} yield (scalaV, scalaJSV) +val scalaJSVersions = scalaVersions.map((_, "1.10.1")) +val scalaNativeVersions = scalaVersions.map((_, "0.4.5")) -val scalaNativeVersions = for { - scalaV <- scala31 :: scala2VersionsAndDotty - scalaNativeV <- Seq("0.4.3") -} yield (scalaV, scalaNativeV) +trait MimaCheck extends Mima { + def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq +} -trait GenyPublishModule extends PublishModule with Mima { +trait GenyPublishModule extends PublishModule with MimaCheck { def artifactName = "geny" def publishVersion = VcsVersion.vcsState().format() - def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq + def crossScalaVersion: String + + // Temporary until the next version of Mima gets released with + // https://github.com/lightbend/mima/issues/693 included in the release. + def mimaPreviousArtifacts = + if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts() def pomSettings = PomSettings( description = artifactName(), organization = "com.lihaoyi", - url = "https://github.com/lihaoyi/geny", + url = "https://github.com/com-lihaoyi/geny", licenses = Seq(License.MIT), versionControl = VersionControl.github(owner = "com-lihaoyi", repo = "geny"), developers = Seq( @@ -54,7 +55,7 @@ trait CommonTestModule extends ScalaModule with TestModule.Utest { } object geny extends Module { - object jvm extends Cross[JvmGenyModule](scala30 :: scala2VersionsAndDotty: _*) + object jvm extends Cross[JvmGenyModule](scalaVersions: _*) class JvmGenyModule(val crossScalaVersion: String) extends Common with ScalaModule with GenyPublishModule { diff --git a/mill b/mill index 8edc814..e616548 100755 --- a/mill +++ b/mill @@ -3,7 +3,7 @@ # This is a wrapper script, that automatically download mill from GitHub release pages # You can give the required mill version with MILL_VERSION env variable # If no version is given, it falls back to the value of DEFAULT_MILL_VERSION -DEFAULT_MILL_VERSION=0.10.0 +DEFAULT_MILL_VERSION=0.10.5 set -e