diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33d104a..3674b26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,13 +23,13 @@ jobs: name: Build runs-on: ubuntu-latest continue-on-error: true + env: + CI_RELEASE_MODE: '1' steps: - name: Git Checkout uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: @@ -39,15 +39,13 @@ jobs: - name: Cache Dependencies uses: coursier/cache-action@v6 - name: Check all code compiles - run: sbt +Test/compile + run: sbt --client +Test/compile - name: Check artifacts build process - run: sbt +publishLocal + run: sbt --client +publishLocal - name: Check binary compatibility - run: sbt "+zioQueryJVM/mimaReportBinaryIssues; +zioQueryJS/mimaReportBinaryIssues" - env: - CI_RELEASE_MODE: '1' + run: sbt --client "+zioQueryJVM/mimaReportBinaryIssues; +zioQueryJS/mimaReportBinaryIssues" - name: Check website build process - run: sbt docs/clean; sbt docs/buildWebsite + run: sbt --client "docs/buildWebsite" lint: name: Lint runs-on: ubuntu-latest @@ -57,8 +55,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: @@ -67,8 +63,6 @@ jobs: check-latest: true - name: Cache Dependencies uses: coursier/cache-action@v6 - - name: Check if the site workflow is up to date - run: sbt ciCheckGithubWorkflow - name: Lint run: sbt lint test: @@ -90,8 +84,6 @@ jobs: - ++2.13 zioQueryNative - ++3.3 zioQueryNative steps: - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: @@ -116,8 +108,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: @@ -190,8 +180,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: @@ -220,8 +208,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install libuv - run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala uses: actions/setup-java@v4 with: diff --git a/build.sbt b/build.sbt index 4a59133..599d934 100644 --- a/build.sbt +++ b/build.sbt @@ -1,11 +1,10 @@ import com.typesafe.tools.mima.core.* import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue import sbtcrossproject.CrossPlugin.autoImport.crossProject -import zio.sbt.githubactions.* -import scala.collection.immutable.TreeMap +import scala.scalanative.build.Mode -enablePlugins(ZioSbtEcosystemPlugin, ZioSbtCiPlugin) +enablePlugins(ZioSbtEcosystemPlugin) crossScalaVersions := Seq.empty @@ -19,7 +18,7 @@ lazy val allScalas = List("2.12", "2.13", "3.3") inThisBuild( List( name := "ZIO Query", - zioVersion := "2.1.7", + zioVersion := "2.1.8", scalaVersion := scalaV, developers := List( Developer( @@ -29,26 +28,6 @@ inThisBuild( url("https://github.com/kyri-petrou") ) ), - ciEnabledBranches := Seq("series/2.x"), - ciTargetJavaVersions := List("11", "21"), - ciTargetScalaVersions := - Map( - (zioQueryJVM / thisProject).value.id -> allScalas, - (zioQueryJS / thisProject).value.id -> List("2.13", "3.3"), - (zioQueryNative / thisProject).value.id -> List("2.13", "3.3") - ), - ciReleaseJobs := - ciReleaseJobs.value.map { job => - def mapStep(step: Step): Step = step match { - case Step.StepSequence(steps) => Step.StepSequence(steps.map(mapStep)) - case s: Step.SingleStep if s.name.equalsIgnoreCase("Release") => - val newMap = TreeMap.empty[String, String] ++ s.env.updated(ciReleaseModeKey, "1") - s.copy(env = newMap) - case s => s - } - val steps = job.steps.map(mapStep) - job.copy(steps = steps) - }, versionScheme := Some("early-semver") ) ) @@ -114,7 +93,12 @@ lazy val zioQueryJS = zioQuery.js lazy val zioQueryNative = zioQuery.native .settings( scala3Settings, - nativeConfig ~= { _.withMultithreading(false) } + nativeConfig ~= { cfg => + val os = System.getProperty("os.name").toLowerCase + // See https://github.com/zio/zio/releases/tag/v2.1.8 + if (os.contains("mac")) cfg.withMode(Mode.releaseFast) + else cfg + } ) lazy val zioQueryJVM = zioQuery.jvm.settings(enableMimaSettingsJVM) @@ -161,13 +145,6 @@ lazy val enableMimaSettingsJS = mimaBinaryIssueFilters ++= Seq() ) -ThisBuild / ciCheckArtifactsBuildSteps += - Step.SingleStep( - "Check binary compatibility", - env = Map(ciReleaseModeKey -> "1"), - run = Some("sbt \"+zioQueryJVM/mimaReportBinaryIssues; +zioQueryJS/mimaReportBinaryIssues\"") - ) - lazy val ciReleaseModeKey = "CI_RELEASE_MODE" lazy val isRelease = { diff --git a/project/plugins.sbt b/project/plugins.sbt index 27cce52..e999304 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,11 +2,10 @@ val zioSbtVersion = "0.4.0-alpha.28" addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion) addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion) -addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion) addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.5") resolvers ++= Resolver.sonatypeOssRepos("public") diff --git a/zio-query/shared/src/test/scala/zio/query/ZIOBaseSpec.scala b/zio-query/shared/src/test/scala/zio/query/ZIOBaseSpec.scala index 1481c60..a1b2e3a 100644 --- a/zio-query/shared/src/test/scala/zio/query/ZIOBaseSpec.scala +++ b/zio-query/shared/src/test/scala/zio/query/ZIOBaseSpec.scala @@ -5,6 +5,6 @@ import zio.test._ trait ZIOBaseSpec extends ZIOSpecDefault { override def aspects: Chunk[TestAspectPoly] = - if (TestPlatform.isJVM) Chunk(TestAspect.timeout(60.seconds), TestAspect.timed) + if (TestPlatform.isJVM || TestPlatform.isNative) Chunk(TestAspect.timeout(60.seconds), TestAspect.timed) else Chunk(TestAspect.timeout(60.seconds), TestAspect.sequential, TestAspect.timed) }