Skip to content

Commit

Permalink
Use GHA instead of Cirrus for macOS I/O tests
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Sep 16, 2023
1 parent 03d071f commit a15a7a3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 8 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

publish:
name: Publish Artifacts
needs: [build]
needs: [build, macos]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
strategy:
matrix:
Expand Down Expand Up @@ -238,9 +238,6 @@ jobs:
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
- name: Wait for Cirrus CI
uses: typelevel/await-cirrus@main

- name: Publish
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down Expand Up @@ -281,6 +278,36 @@ jobs:
modules-ignore: integration_2.12 integration_2.13 integration_3 rootjs_2.12 rootjs_2.13 rootjs_3 microsite_2.12 microsite_2.13 microsite_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 fs2-benchmark_2.12 fs2-benchmark_2.13 fs2-benchmark_3
configs-ignore: test scala-tool scala-doc-tool test-internal

macos:
name: Test I/O on macOS
strategy:
matrix:
os: [macos-latest]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- run: brew install s2n

- run: sbt ioJVM/test ioJS/test ioNative/test

site:
name: Generate Site
strategy:
Expand Down
18 changes: 14 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,22 @@ ThisBuild / githubWorkflowBuild ++= Seq(
)
)

ThisBuild / githubWorkflowPublishPreamble +=
WorkflowStep.Use(
UseRef.Public("typelevel", "await-cirrus", "main"),
name = Some("Wait for Cirrus CI")
ThisBuild / githubWorkflowAddedJobs +=
WorkflowJob(
"macos",
"Test I/O on macOS",
scalas = Nil,
sbtStepPreamble = Nil,
javas = List(githubWorkflowJavaVersions.value.head),
oses = List("macos-latest"),
steps = githubWorkflowJobSetup.value.toList ++ List(
WorkflowStep.Run(List("brew install s2n")),
WorkflowStep.Sbt(List("ioJVM/test", "ioJS/test", "ioNative/test"))
)
)

ThisBuild / githubWorkflowPublishNeeds += "macos"

ThisBuild / licenses := List(("MIT", url("http://opensource.org/licenses/MIT")))

ThisBuild / doctestTestFramework := DoctestTestFramework.ScalaCheck
Expand Down

0 comments on commit a15a7a3

Please sign in to comment.