From 218745fb70b2a2af63f7e1ebdc3e5ebda2158be6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 17:19:58 +0000 Subject: [PATCH 1/6] Add macOS to CI matrix --- .github/workflows/ci.yml | 14 +++++++++----- build.sbt | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d7d2b057c..3c2dd6890c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: name: Build and Test strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-latest, macos-latest] scala: [3.2.2, 2.12.17, 2.13.10] java: [temurin@17] project: [rootJS, rootJVM, rootNative] @@ -70,11 +70,15 @@ jobs: if: (matrix.project == 'rootNative') && startsWith(matrix.os, 'ubuntu') run: /home/linuxbrew/.linuxbrew/bin/brew install openssl s2n + - name: Install brew formulae (macOS) + if: (matrix.project == 'rootNative') && startsWith(matrix.os, 'macos') + run: brew install openssl s2n + - name: Check that workflows are up to date run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: scalaJSLink @@ -89,11 +93,11 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Scalafix tests @@ -123,7 +127,7 @@ jobs: if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/2.5.x') strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-latest] scala: [2.13.10] java: [temurin@17] runs-on: ${{ matrix.os }} diff --git a/build.sbt b/build.sbt index f82bf704ce..9dffe654ab 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ val NewScala = "2.13.10" ThisBuild / crossScalaVersions := Seq("3.2.2", "2.12.17", NewScala) ThisBuild / tlVersionIntroduced := Map("3" -> "3.0.3") -ThisBuild / githubWorkflowOSes := Seq("ubuntu-22.04") +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest") ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17")) ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value ThisBuild / nativeBrewInstallCond := Some("matrix.project == 'rootNative'") From 03289050af51546ad39ec4209dbf11bab8b0971f Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 17:32:26 +0000 Subject: [PATCH 2/6] macOS only for primary Scala --- .github/workflows/ci.yml | 5 +++++ build.sbt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c2dd6890c..19550247fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,11 @@ jobs: scala: [3.2.2, 2.12.17, 2.13.10] java: [temurin@17] project: [rootJS, rootJVM, rootNative] + exclude: + - scala: 3.2.2 + os: macos-latest + - scala: 2.12.17 + os: macos-latest runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) diff --git a/build.sbt b/build.sbt index 9dffe654ab..da78f63436 100644 --- a/build.sbt +++ b/build.sbt @@ -28,6 +28,11 @@ ThisBuild / githubWorkflowBuild ++= Seq( ) ) +ThisBuild / githubWorkflowBuildMatrixExclusions ++= + crossScalaVersions.value.filterNot(Set(scalaVersion.value)).map { scala => + MatrixExclude(Map("scala" -> scala, "os" -> "macos-latest")) + } + ThisBuild / licenses := List(("MIT", url("http://opensource.org/licenses/MIT"))) ThisBuild / doctestTestFramework := DoctestTestFramework.ScalaCheck From bf9bbb7a5d4d31e22a3d51f5364b127e2b0bca9c Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 17:52:17 +0000 Subject: [PATCH 3/6] Increase timeout --- core/shared/src/test/scala/fs2/StreamZipSuite.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/shared/src/test/scala/fs2/StreamZipSuite.scala b/core/shared/src/test/scala/fs2/StreamZipSuite.scala index 65ebf44d29..8a478bfaf8 100644 --- a/core/shared/src/test/scala/fs2/StreamZipSuite.scala +++ b/core/shared/src/test/scala/fs2/StreamZipSuite.scala @@ -32,6 +32,8 @@ import org.scalacheck.effect.PropF.forAllF class StreamZipSuite extends Fs2Suite { + override def munitIOTimeout = 1.minute + group("zip") { test("propagate error from closing the root scope") { val s1 = Stream.bracket(SyncIO(1))(_ => SyncIO.unit) From 873a530a20847daaab4befbc7317930a40ef02d8 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 18:36:44 +0000 Subject: [PATCH 4/6] Increase timeout --- .../test/scala/fs2/compression/JvmNativeCompressionSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jvm-native/src/test/scala/fs2/compression/JvmNativeCompressionSuite.scala b/core/jvm-native/src/test/scala/fs2/compression/JvmNativeCompressionSuite.scala index 7ea0eb6fa3..c04b1157a4 100644 --- a/core/jvm-native/src/test/scala/fs2/compression/JvmNativeCompressionSuite.scala +++ b/core/jvm-native/src/test/scala/fs2/compression/JvmNativeCompressionSuite.scala @@ -36,7 +36,7 @@ import scodec.bits.ByteVector class JvmNativeCompressionSuite extends CompressionSuite { - override def munitIOTimeout = 1.minute + override def munitIOTimeout = 2.minutes def deflateStream(b: Array[Byte], level: Int, strategy: Int, nowrap: Boolean): Array[Byte] = { val byteArrayStream = new ByteArrayOutputStream() From d66528ae721f5e28d6cafab17eb0a3f5f3f3365d Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 19:26:55 +0000 Subject: [PATCH 5/6] Increase timeout --- io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala b/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala index 04abea6825..5e060b725b 100644 --- a/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala +++ b/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala @@ -29,8 +29,11 @@ import cats.effect.IO import cats.syntax.all._ import java.nio.file.WatchEvent +import scala.concurrent.duration._ class WatcherSuite extends Fs2Suite with BaseFileSuite { + override def munitIOTimeout = 1.minute + group("supports watching a file") { test("for modifications") { Stream From 46b90d0c39f0d9b0f1a877ac6e9b1d1a7b981af6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 19:35:23 +0000 Subject: [PATCH 6/6] Duplicate import --- io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala b/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala index 5e060b725b..2c6f22cbf1 100644 --- a/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala +++ b/io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala @@ -29,7 +29,6 @@ import cats.effect.IO import cats.syntax.all._ import java.nio.file.WatchEvent -import scala.concurrent.duration._ class WatcherSuite extends Fs2Suite with BaseFileSuite { override def munitIOTimeout = 1.minute