File tree Expand file tree Collapse file tree 9 files changed +100
-2
lines changed
Sources/OpenSwiftUICore/View/InterfaceIdiom
Tests/OpenSwiftUICoreTests/View/InterfaceIdiom Expand file tree Collapse file tree 9 files changed +100
-2
lines changed Original file line number Diff line number Diff line change 2727 OPENSWIFTUI_SWIFT_LOG : 0
2828 OPENSWIFTUI_SWIFT_CRYPTO : 0
2929 OPENSWIFTUI_TARGET_RELEASE : ${{ matrix.release }}
30+ OPENSWIFTUI_USE_LOCAL_DEPS : 1
31+ OPENGRAPH_TARGET_RELEASE : ${{ matrix.release }}
32+ OPENGRAPH_ATTRIBUTEGRAPH_VERSION : RELEASE-${{ matrix.release }}
33+ GH_TOKEN : ${{ github.token }}
3034 steps :
3135 - uses : actions/checkout@v4
3236 - name : Setup Xcode
3539 xcode-version : ${{ matrix.xcode-version }}
3640 - name : Swift version
3741 run : swift --version
42+ - name : Set up build environment
43+ run : Scripts/CI/macOS_setup_build.sh
44+ shell : bash
3845 - name : Build test target in debug mode
3946 run : |
4047 xcodebuild build \
Original file line number Diff line number Diff line change 2323 OPENSWIFTUI_SWIFT_LOG : 0
2424 OPENSWIFTUI_SWIFT_CRYPTO : 0
2525 OPENSWIFTUI_TARGET_RELEASE : ${{ matrix.release }}
26+ OPENSWIFTUI_USE_LOCAL_DEPS : 1
27+ OPENGRAPH_TARGET_RELEASE : ${{ matrix.release }}
28+ OPENGRAPH_ATTRIBUTEGRAPH_VERSION : RELEASE-${{ matrix.release }}
29+ GH_TOKEN : ${{ github.token }}
2630 steps :
2731 - uses : actions/checkout@v4
2832 - name : Setup Xcode
3135 xcode-version : ${{ matrix.xcode-version }}
3236 - name : Swift version
3337 run : swift --version
38+ - name : Set up build environment
39+ run : Scripts/CI/macOS_setup_build.sh
40+ shell : bash
3441 - name : Build and run tests in debug mode with coverage
3542 run : |
3643 swift test \
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script extracts the revision of a specific dependency from the Package.resolved file (Only support v3).
4+ # Usage: ./get_revision.sh <dependency_name>
5+ # Output: revision of the dependency
6+
7+ # A `realpath` alternative using the default C implementation.
8+ filepath () {
9+ [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
10+ }
11+
12+ REPO_ROOT=" $( dirname $( dirname $( dirname $( filepath $0 ) ) ) ) "
13+ cd $REPO_ROOT
14+
15+ # Ensure a dependency name is provided as an argument
16+ if [[ $# -lt 1 ]]; then
17+ echo " Usage: $0 <dependency_name>"
18+ exit 1
19+ fi
20+
21+ DEPENDENCY_NAME=" $1 "
22+ PACKAGE_RESOLVED_PATH=" Package.resolved"
23+
24+ # Check if the Package.resolved file exists
25+ if [[ ! -f " $PACKAGE_RESOLVED_PATH " ]]; then
26+ echo " Error: $PACKAGE_RESOLVED_PATH file not found!"
27+ exit 1
28+ fi
29+
30+ # Extract the revision using jq
31+ REVISION=$( jq -r --arg name " $DEPENDENCY_NAME " '
32+ .pins[]?
33+ | select(.identity == $name)
34+ | .state.revision
35+ ' " $PACKAGE_RESOLVED_PATH " )
36+
37+ # Check if a revision was found
38+ if [[ -z " $REVISION " ]]; then
39+ echo " No revision found for dependency: $DEPENDENCY_NAME "
40+ exit 1
41+ else
42+ echo " $REVISION "
43+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # A `realpath` alternative using the default C implementation.
4+ filepath () {
5+ [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
6+ }
7+
8+ REPO_ROOT=" $( dirname $( dirname $( dirname $( filepath $0 ) ) ) ) "
9+ cd $REPO_ROOT
10+
11+ Scripts/CI/og_setup.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # A `realpath` alternative using the default C implementation.
4+ filepath () {
5+ [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
6+ }
7+
8+ REPO_ROOT=" $( dirname $( dirname $( dirname $( filepath $0 ) ) ) ) "
9+
10+ clone_checkout_og () {
11+ cd $REPO_ROOT
12+ revision=$( Scripts/CI/get_revision.sh opengraph)
13+ cd ..
14+ gh repo clone OpenSwiftUIProject/OpenGraph
15+ cd OpenGraph
16+ git checkout --quiet $revision
17+ }
18+
19+ update_og () {
20+ cd $REPO_ROOT /../OpenGraph
21+ ./AG/update.sh
22+ }
23+
24+ clone_checkout_og
25+ update_og
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ filepath() {
55 [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
66}
77
8- OG_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
8+ REPO_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
9+ cd $REPO_ROOT
910
1011# Get the language and input file path from the arguments
1112language=${1:- " swift" }
Original file line number Diff line number Diff line change 55// Audited for iOS 18.0
66// Status: Complete
77
8+ #if OPENSWIFTUI_RELEASE_2024
89package struct InterfaceIdiomPredicate < Idiom> : ViewInputPredicate where Idiom: InterfaceIdiom {
910 package init ( ) { }
1011
@@ -42,3 +43,4 @@ extension AnyInterfaceIdiom {
4243 value == AnyInterfaceIdiom ( pattern)
4344 }
4445}
46+ #endif
Original file line number Diff line number Diff line change 55@testable import OpenSwiftUICore
66import Testing
77
8+ #if OPENSWIFTUI_RELEASE_2024
89struct InterfaceIdiomTests {
910 @Test
1011 func idiomEqual( ) {
@@ -35,3 +36,4 @@ struct InterfaceIdiomTests {
3536 #expect( ( WidgetInterfaceIdiom ( ) ~= AnyInterfaceIdiom ( . complication) ) == false )
3637 }
3738}
39+ #endif
You can’t perform that action at this time.
0 commit comments