Skip to content

Commit

Permalink
Merge pull request #3180 from armanbilge/topic/macos-ci
Browse files Browse the repository at this point in the history
Add macOS to CI matrix
  • Loading branch information
mpilquist authored Mar 23, 2023
2 parents b27e42e + 46b90d0 commit 9384023
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ 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]
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)
Expand Down Expand Up @@ -70,11 +75,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
Expand All @@ -89,11 +98,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
Expand Down Expand Up @@ -123,7 +132,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 }}
Expand Down
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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'")
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions core/shared/src/test/scala/fs2/StreamZipSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions io/jvm/src/test/scala/fs2/io/file/WatcherSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import cats.syntax.all._
import java.nio.file.WatchEvent

class WatcherSuite extends Fs2Suite with BaseFileSuite {
override def munitIOTimeout = 1.minute

group("supports watching a file") {
test("for modifications") {
Stream
Expand Down

0 comments on commit 9384023

Please sign in to comment.