Skip to content

Commit 4dfdf69

Browse files
GedochaoMaciejG604
andauthored
Bump MacOS CI to macOS-13 (#2579)
* Pin MacOS CI to `macOS-13` * Add flaky label to test * Limit flaky test tagging to non-M1 Macs --------- Co-authored-by: Maciej Gajek <[email protected]>
1 parent 9957180 commit 4dfdf69

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ jobs:
279279

280280
generate-macos-launcher:
281281
timeout-minutes: 120
282-
runs-on: "macos-12"
282+
runs-on: "macOS-13"
283283
steps:
284284
- uses: actions/checkout@v4
285285
with:
@@ -306,7 +306,7 @@ jobs:
306306
native-macos-tests-1:
307307
needs: generate-macos-launcher
308308
timeout-minutes: 120
309-
runs-on: "macos-12"
309+
runs-on: "macOS-13"
310310
steps:
311311
- uses: actions/checkout@v4
312312
with:
@@ -339,7 +339,7 @@ jobs:
339339
native-macos-tests-2:
340340
needs: generate-macos-launcher
341341
timeout-minutes: 120
342-
runs-on: "macos-12"
342+
runs-on: "macOS-13"
343343
steps:
344344
- uses: actions/checkout@v4
345345
with:
@@ -372,7 +372,7 @@ jobs:
372372
native-macos-tests-3:
373373
needs: generate-macos-launcher
374374
timeout-minutes: 120
375-
runs-on: "macos-12"
375+
runs-on: "macOS-13"
376376
steps:
377377
- uses: actions/checkout@v4
378378
with:

modules/integration/src/test/scala/scala/cli/integration/NativePackagerTests.scala

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ class NativePackagerTests extends ScalaCliSuite {
6363
}
6464
}
6565
}
66-
67-
test("building dmg package") {
68-
66+
def testBuildingDmgPackage(): Unit =
6967
testInputs.fromRoot { root =>
7068

7169
val appName = helloWorldFileName.stripSuffix(".scala").toLowerCase()
@@ -107,6 +105,15 @@ class NativePackagerTests extends ScalaCliSuite {
107105
)
108106
}
109107
}
108+
109+
// FIXME: building dmg package sometimes fails with:
110+
// 'hdiutil: couldn't eject "disk2" - Resource busy'
111+
if (TestUtil.isM1 || !TestUtil.isCI)
112+
test("building dmg package") {
113+
testBuildingDmgPackage()
114+
}
115+
else test("building dmg package".flaky) {
116+
testBuildingDmgPackage()
110117
}
111118
}
112119

modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ object TestUtil {
1818
val isNativeCli: Boolean = cliKind.startsWith("native")
1919
val isJvmCli: Boolean = cliKind.startsWith("jvm")
2020
val isCI: Boolean = System.getenv("CI") != null
21+
val isM1: Boolean = sys.props.get("os.arch").contains("aarch64")
2122
val cliPath: String = sys.props("test.scala-cli.path")
2223
val debugPortOpt: Option[String] = sys.props.get("test.scala-cli.debug.port")
2324
val detectCliPath = if (TestUtil.isNativeCli) TestUtil.cliPath else "scala-cli"

0 commit comments

Comments
 (0)