Skip to content

Commit eff2655

Browse files
authored
Fix CI issue (#159)
1 parent b80e86b commit eff2655

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-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

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,27 @@ struct InterfaceIdiomTests {
1212
#if os(iOS) || os(tvOS)
1313
@Test
1414
func interfaceIdiom() throws {
15+
#if OPENSWIFTUI_RELEASE_2021
16+
#expect(UIUserInterfaceIdiom.unspecified.idiom == nil)
17+
#expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiomType.phone)
18+
#expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiomType.pad)
19+
#expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiomType.tv)
20+
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiomType.carplay)
21+
#expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiomType.watch)
22+
#expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiomType.mac)
23+
if #available(iOS 17, tvOS 17, *) {
24+
#expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiomType.vision)
25+
}
26+
#elseif OPENSWIFTUI_RELEASE_2024
1527
#expect(UIUserInterfaceIdiom.unspecified.idiom == nil)
1628
#expect(UIUserInterfaceIdiom.phone.idiom == AnyInterfaceIdiom(.phone))
1729
#expect(UIUserInterfaceIdiom.pad.idiom == AnyInterfaceIdiom(.pad))
1830
#expect(UIUserInterfaceIdiom.tv.idiom == AnyInterfaceIdiom(.tv))
1931
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay))
2032
#expect(UIUserInterfaceIdiom(rawValue: 4)?.idiom == AnyInterfaceIdiom(.watch))
21-
#expect(UIUserInterfaceIdiom.carPlay.idiom == AnyInterfaceIdiom(.carPlay))
33+
#expect(UIUserInterfaceIdiom.mac.idiom == AnyInterfaceIdiom(.mac))
2234
#expect(UIUserInterfaceIdiom.vision.idiom == AnyInterfaceIdiom(.vision))
35+
#endif
2336
}
2437
#endif
2538
}

0 commit comments

Comments
 (0)