Skip to content

Commit 01bafa9

Browse files
committed
Fix CI issue
1 parent b80e86b commit 01bafa9

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

.github/workflows/ios.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
OPENSWIFTUI_TARGET_RELEASE: ${{ matrix.release }}
3030
OPENSWIFTUI_USE_LOCAL_DEPS: 1
3131
OPENGRAPH_TARGET_RELEASE: ${{ matrix.release }}
32-
OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE-${{ matrix.release }}
32+
OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE_${{ matrix.release }}
3333
GH_TOKEN: ${{ github.token }}
3434
steps:
3535
- uses: actions/checkout@v4

.github/workflows/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
OPENSWIFTUI_TARGET_RELEASE: ${{ matrix.release }}
2626
OPENSWIFTUI_USE_LOCAL_DEPS: 1
2727
OPENGRAPH_TARGET_RELEASE: ${{ matrix.release }}
28-
OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE-${{ matrix.release }}
28+
OPENGRAPH_ATTRIBUTEGRAPH_VERSION: RELEASE_${{ matrix.release }}
2929
GH_TOKEN: ${{ github.token }}
3030
steps:
3131
- uses: actions/checkout@v4

Sources/OpenSwiftUICore/View/Input/ViewInputPredicate.swift

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ package struct TypesMatch<Left, Right>: ViewInputPredicate {
114114
package init() {}
115115
}
116116

117+
#if OPENSWIFTUI_RELEASE_2024
118+
117119
package struct IsVisionEnabledPredicate: ViewInputPredicate {
118120
package static func evaluate(inputs: _GraphInputs) -> Bool {
119121
#if os(macOS)
@@ -136,3 +138,5 @@ extension _ViewListInputs {
136138
IsVisionEnabledPredicate.evaluate(inputs: base)
137139
}
138140
}
141+
142+
#endif

Tests/OpenSwiftUITests/View/InterfaceIdiom/InterfaceIdiomTests.swift

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// InterfaceIdiomTests.swift
33
// OpenSwiftUITests
44

5+
56
@testable import OpenSwiftUI
67
import Testing
78
#if canImport(UIKit)
@@ -12,14 +13,27 @@ struct InterfaceIdiomTests {
1213
#if os(iOS) || os(tvOS)
1314
@Test
1415
func interfaceIdiom() throws {
16+
#if OPENSWIFTUI_RELEASE_2021
17+
#expect(UIUserInterfaceIdiom.unspecified.idiom == nil)
18+
#expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiomType.phone)
19+
#expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiomType.pad)
20+
#expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiomType.tv)
21+
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiomType.carplay)
22+
#expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiomType.watch)
23+
#expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiomType.mac)
24+
if #available(iOS 17, tvOS 17, *) {
25+
#expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiomType.vision)
26+
}
27+
#elseif OPENSWIFTUI_RELEASE_2024
1528
#expect(UIUserInterfaceIdiom.unspecified.idiom == nil)
1629
#expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiom(.phone))
1730
#expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiom(.pad))
1831
#expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiom(.tv))
1932
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay))
2033
#expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiom(.watch))
21-
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay))
34+
#expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiom(.mac))
2235
#expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiom(.vision))
36+
#endif
2337
}
2438
#endif
2539
}

0 commit comments

Comments
 (0)