File tree 7 files changed +96
-2
lines changed
7 files changed +96
-2
lines changed Original file line number Diff line number Diff line change 27
27
OPENSWIFTUI_SWIFT_LOG : 0
28
28
OPENSWIFTUI_SWIFT_CRYPTO : 0
29
29
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 }}
30
34
steps :
31
35
- uses : actions/checkout@v4
32
36
- name : Setup Xcode
35
39
xcode-version : ${{ matrix.xcode-version }}
36
40
- name : Swift version
37
41
run : swift --version
42
+ - name : Set up build environment
43
+ run : Scripts/CI/macOS_setup_build.sh
44
+ shell : bash
38
45
- name : Build test target in debug mode
39
46
run : |
40
47
xcodebuild build \
Original file line number Diff line number Diff line change 23
23
OPENSWIFTUI_SWIFT_LOG : 0
24
24
OPENSWIFTUI_SWIFT_CRYPTO : 0
25
25
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 }}
26
30
steps :
27
31
- uses : actions/checkout@v4
28
32
- name : Setup Xcode
31
35
xcode-version : ${{ matrix.xcode-version }}
32
36
- name : Swift version
33
37
run : swift --version
38
+ - name : Set up build environment
39
+ run : Scripts/CI/macOS_setup_build.sh
40
+ shell : bash
34
41
- name : Build and run tests in debug mode with coverage
35
42
run : |
36
43
swift test \
Original file line number Diff line number Diff line change 7
7
"location" : " https://github.com/OpenSwiftUIProject/OpenGraph" ,
8
8
"state" : {
9
9
"branch" : " main" ,
10
- "revision" : " f2b16a1145acadd47c708d528f7eb1047d412f78 "
10
+ "revision" : " 074491f9950c7692142630b08b7c87b8cb682e28 "
11
11
}
12
12
},
13
13
{
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
+ gh repo clone OpenSwiftUIProject/OpenGraph ../OpenGraph
14
+ cd ../OpenGraph
15
+ git checkout --quiet $revision
16
+ }
17
+
18
+ update_og () {
19
+ cd $REPO_ROOT /../OpenGraph
20
+ ./AG/update.sh
21
+ }
22
+
23
+ clone_checkout_og
24
+ update_og
25
+
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ filepath() {
5
5
[[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
6
6
}
7
7
8
- OG_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
8
+ REPO_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
9
+ cd $REPO_ROOT
9
10
10
11
# Get the language and input file path from the arguments
11
12
language=${1:- " swift" }
You can’t perform that action at this time.
0 commit comments