@@ -14,18 +14,24 @@ permissions:
14
14
jobs :
15
15
Pods :
16
16
name : Cocoapods Lint
17
- runs-on : macos-13
17
+ runs-on : macos-14
18
18
env :
19
- DEVELOPER_DIR : /Applications/Xcode_14.1 .app
19
+ DEVELOPER_DIR : /Applications/Xcode_15.2 .app
20
20
steps :
21
21
- name : Checkout
22
- uses : actions/checkout@v2
22
+ uses : actions/checkout@v3
23
23
24
24
- name : Install Cocoapods
25
25
run : gem install cocoapods --no-document --quiet
26
26
27
27
- name : Install Xcpretty
28
28
run : gem install xcpretty --no-document --quiet
29
+
30
+ - name : Pod Update
31
+ run : pod repo update --silent
32
+
33
+ - name : Pod Install
34
+ run : pod install
29
35
30
36
- name : Run SDWebImageSwiftUI podspec lint
31
37
run : |
@@ -34,24 +40,23 @@ jobs:
34
40
35
41
Demo :
36
42
name : Run Demo
37
- runs-on : macos-13
43
+ runs-on : macos-14
38
44
env :
39
- DEVELOPER_DIR : /Applications/Xcode_14.1 .app
45
+ DEVELOPER_DIR : /Applications/Xcode_15.2 .app
40
46
WORKSPACE_NAME : SDWebImageSwiftUI.xcworkspace
41
47
OSXSCHEME : SDWebImageSwiftUIDemo-macOS
42
48
iOSSCHEME : SDWebImageSwiftUIDemo
43
49
TVSCHEME : SDWebImageSwiftUIDemo-tvOS
44
50
WATCHSCHEME : SDWebImageSwiftUIDemo-watchOS WatchKit App
45
- strategy :
46
- matrix :
47
- iosDestination : ["platform=iOS Simulator,name=iPhone 14 Pro"]
48
- tvOSDestination : ["platform=tvOS Simulator,name=Apple TV"]
49
- watchOSDestination : ["platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)"]
50
- macOSDestination : ["platform=macOS"]
51
- macCatalystDestination : ["platform=macOS,variant=Mac Catalyst"]
51
+ iosDestination : platform=iOS Simulator,name=iPhone 15 Pro
52
+ macOSDestination : platform=macOS,arch=x86_64
53
+ macCatalystDestination : platform=macOS,arch=x86_64,variant=Mac Catalyst
54
+ tvOSDestination : platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
55
+ watchOSDestination : platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)
56
+ visionOSDestination : platform=visionOS Simulator,name=Apple Vision Pro
52
57
steps :
53
58
- name : Checkout
54
- uses : actions/checkout@v2
59
+ uses : actions/checkout@v3
55
60
56
61
- name : Clean DerivedData
57
62
run : |
@@ -73,46 +78,58 @@ jobs:
73
78
- name : Run demo for OSX
74
79
run : |
75
80
set -o pipefail
76
- xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ matrix .macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
81
+ xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ env .macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
77
82
78
83
- name : Run demo for iOS
79
84
run : |
80
85
set -o pipefail
81
- xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ matrix .iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
86
+ xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ env .iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
82
87
83
88
- name : Run demo for TV
84
89
run : |
85
90
set -o pipefail
86
- xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ matrix .tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
91
+ xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ env .tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
87
92
88
93
- name : Run demo for Watch
89
94
run : |
90
95
set -o pipefail
91
- xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -destination "${{ matrix .watchOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
96
+ xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -destination "${{ env .watchOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
92
97
93
98
Test :
94
99
name : Unit Test
95
- runs-on : macos-13
100
+ runs-on : macos-14
96
101
env :
97
- DEVELOPER_DIR : /Applications/Xcode_14.1 .app
102
+ DEVELOPER_DIR : /Applications/Xcode_15.2 .app
98
103
WORKSPACE_NAME : SDWebImageSwiftUI.xcworkspace
99
- OSXSCHEME : SDWebImageSwiftUITests macOS
100
- iOSSCHEME : SDWebImageSwiftUITests
101
- TVSCHEME : SDWebImageSwiftUITests tvOS
104
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
105
+ # use matrix to generate jobs for each platform
102
106
strategy :
107
+ fail-fast : false
103
108
matrix :
104
- iosDestination : ["platform=iOS Simulator,name=iPhone 14 Pro"]
105
- macOSDestination : ["platform=macOS"]
106
- tvOSDestination : ["platform=tvOS Simulator,name=Apple TV"]
109
+ platform : [iOS, macOS, tvOS]
110
+ include :
111
+ - platform : iOS
112
+ destination : platform=iOS Simulator,name=iPhone 15 Pro
113
+ scheme : SDWebImageSwiftUITests
114
+ flag : ios
115
+ - platform : macOS
116
+ destination : platform=macOS,arch=x86_64
117
+ scheme : SDWebImageSwiftUITests macOS
118
+ flag : macos
119
+ - platform : tvOS
120
+ destination : platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
121
+ scheme : SDWebImageSwiftUITests tvOS
122
+ flag : tvos
123
+ # - platform: visionOS
124
+ # destination: platform=visionOS Simulator,name=Apple Vision Pro
125
+ # scheme: Vision
126
+ # flag: visionos
107
127
steps :
108
128
- name : Checkout
109
- uses : actions/checkout@v2
129
+ uses : actions/checkout@v3
130
+ with :
131
+ fetch-depth : 0
110
132
111
- - name : Clean DerivedData
112
- run : |
113
- rm -rf ~/Library/Developer/Xcode/DerivedData/
114
- mkdir DerivedData
115
-
116
133
- name : Install Cocoapods
117
134
run : gem install cocoapods --no-document --quiet
118
135
@@ -124,47 +141,39 @@ jobs:
124
141
125
142
- name : Pod Install
126
143
run : pod install
127
-
128
- - name : Test - ${{ matrix.iosDestination }}
129
- run : |
130
- set -o pipefail
131
- xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
132
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
133
-
134
- - name : Test - ${{ matrix.macOSDestination }}
144
+
145
+ - name : Clean DerivedData
135
146
run : |
136
- set -o pipefail
137
- xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
138
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
139
-
140
- - name : Test - ${{ matrix.tvOSDestination }}
147
+ rm -rf ~/Library/Developer/Xcode/DerivedData/
148
+ mkdir DerivedData
149
+
150
+ - name : Run test
141
151
run : |
142
152
set -o pipefail
143
- xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ matrix.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
144
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
153
+ xcodebuild build-for-testing -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
154
+ xcodebuild test-without-building -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
155
+ mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/${{ matrix.platform }}"
145
156
146
157
- name : Code Coverage
147
158
run : |
148
159
set -o pipefail
149
160
export PATH="/usr/local/opt/curl/bin:$PATH"
150
161
curl --version
151
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F macos
152
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F ios
153
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/tvOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F tvos
162
+ bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/${{ matrix.platform }}" -J '^SDWebImageSwiftUI$' -c -X gcov -F "${{ matrix.flag }}"
154
163
155
164
Build :
156
165
name : Build Library
157
- runs-on : macos-13
166
+ runs-on : macos-14
158
167
env :
159
- DEVELOPER_DIR : /Applications/Xcode_14.1 .app
168
+ DEVELOPER_DIR : /Applications/Xcode_15.2 .app
160
169
PROJECT_NAME : SDWebImageSwiftUI.xcodeproj
161
170
OSXSCHEME : SDWebImageSwiftUI macOS
162
171
iOSSCHEME : SDWebImageSwiftUI
163
172
TVSCHEME : SDWebImageSwiftUI tvOS
164
173
WATCHSCHEME : SDWebImageSwiftUI watchOS
165
174
steps :
166
175
- name : Checkout
167
- uses : actions/checkout@v2
176
+ uses : actions/checkout@v3
168
177
169
178
- name : Build the SwiftPM
170
179
run : |
0 commit comments