|
1 |
| -version: 2 |
2 |
| - |
3 |
| -_defaults: |
4 |
| - |
5 |
| - - &auxiliary_setup |
6 |
| - run: |
7 |
| - name: Auxiliary setup |
8 |
| - command: | |
9 |
| - gem install xcpretty --user-install |
10 |
| - HOMEBREW_NO_AUTO_UPDATE=1 brew install gnu-sed # for ci_test script |
11 |
| - mkdir logs test_results |
12 |
| -
|
13 |
| - - &restore_pods_cache |
14 |
| - restore_cache: |
15 |
| - name: Restore Pods cache |
16 |
| - keys: |
17 |
| - - v3-pods-{{ checksum "Podfile.lock" }} |
18 |
| - |
19 |
| - - &install_pods |
20 |
| - run: |
21 |
| - name: Install Pods |
22 |
| - command: ./scripts/ci_pod_install |
23 |
| - |
24 |
| - - &save_pods_cache |
25 |
| - save_cache: |
26 |
| - name: Saving Pods cache |
27 |
| - key: v3-pods-{{ checksum "Podfile.lock" }} |
28 |
| - paths: |
29 |
| - - Pods |
30 |
| - - TreasureData.xcworkspace |
31 |
| - |
32 |
| - - &store_artifacts |
33 |
| - store_artifacts: |
34 |
| - path: ./logs |
35 |
| - destination: logs |
36 |
| - |
37 |
| - - &store_test_results |
38 |
| - store_test_results: |
39 |
| - path: ./test_results |
40 |
| - |
41 |
| - - &ios9_install_and_workaround |
42 |
| - run: |
43 |
| - name: iOS 9 Install and Workaround |
44 |
| - command: | |
45 |
| - xcversion simulators --install='iOS 9.3' --no-progress |
46 |
| - sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.3.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift' |
47 |
| -
|
48 |
| - - &ios8_install_and_workaround |
49 |
| - run: |
50 |
| - name: iOS 8 Install and Workaround |
51 |
| - command: | |
52 |
| - xcversion simulators --install='iOS 8.4' --no-progress |
53 |
| - sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift' |
| 1 | +version: 2.1 |
| 2 | + |
| 3 | + |
| 4 | +commands: |
| 5 | + auxiliary_setup: |
| 6 | + description: "Various setup before running tests" |
| 7 | + steps: |
| 8 | + - run: |
| 9 | + name: Auxiliary setup |
| 10 | + command: | |
| 11 | + gem install xcpretty --user-install |
| 12 | + HOMEBREW_NO_AUTO_UPDATE=1 brew install gnu-sed # for ci_test script |
| 13 | + mkdir logs test_results |
| 14 | +
|
| 15 | + install_cocoapods: |
| 16 | + description: "Command to install and cache Cocoapods" |
| 17 | + steps: |
| 18 | + - restore_cache: |
| 19 | + key: 1-gems-{{ checksum "Gemfile.lock" }} |
| 20 | + - run: bundle check || bundle install --path vendor/bundle --clean |
| 21 | + - save_cache: |
| 22 | + key: 1-gems-{{ checksum "Gemfile.lock" }} |
| 23 | + paths: |
| 24 | + - vendor/bundle |
| 25 | + |
| 26 | + install_pods: |
| 27 | + description: "Command to install and cache pods" |
| 28 | + steps: |
| 29 | + - restore_cache: |
| 30 | + name: Restore Pods cache |
| 31 | + keys: |
| 32 | + - v3-pods-{{ checksum "Podfile.lock" }} |
| 33 | + - run: |
| 34 | + name: Install Pods |
| 35 | + command: ./scripts/ci_pod_install |
| 36 | + - save_cache: |
| 37 | + name: Saving Pods cache |
| 38 | + key: v3-pods-{{ checksum "Podfile.lock" }} |
| 39 | + paths: |
| 40 | + - Pods |
| 41 | + - TreasureData.xcworkspace |
| 42 | + |
| 43 | + run_tests: |
| 44 | + description: "" |
| 45 | + parameters: |
| 46 | + version_name: |
| 47 | + type: "string" |
| 48 | + os: |
| 49 | + type: "string" |
| 50 | + simulator: |
| 51 | + type: "string" |
| 52 | + default: "iphone 11" |
| 53 | + no_output_timeout: |
| 54 | + type: integer |
| 55 | + default: 1800 |
| 56 | + steps: |
| 57 | + - run: |
| 58 | + name: Test on iOS <<parameters.version_name>> |
| 59 | + no_output_timeout: <<parameters.no_output_timeout>> |
| 60 | + command: ./scripts/ci_test 'platform=iOS Simulator,name=<<parameters.simulator>>,OS=<<parameters.os>>' logs/xcbuild_ios_<<parameters.version_name>>.log test_results/ios_<<parameters.version_name>>.xml |
| 61 | + |
| 62 | + store_results: |
| 63 | + description: "Command to store artifacts and test results" |
| 64 | + steps: |
| 65 | + - store_artifacts: |
| 66 | + path: ./logs |
| 67 | + destination: logs |
| 68 | + - store_test_results: |
| 69 | + path: ./test_results |
| 70 | + |
| 71 | + ios9_install_and_workaround: |
| 72 | + description: "Command for iOS 9 workaround" |
| 73 | + steps: |
| 74 | + - run: |
| 75 | + name: iOS 9 Install and Workaround |
| 76 | + command: | |
| 77 | + xcversion simulators --install='iOS 9.3' --no-progress |
| 78 | + sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.3.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift' |
| 79 | +
|
| 80 | + ios8_install_and_workaround: |
| 81 | + description: "Command for iOS 8 workaround" |
| 82 | + steps: |
| 83 | + - run: |
| 84 | + name: iOS 8 Install and Workaround |
| 85 | + command: | |
| 86 | + xcversion simulators --install='iOS 8.4' --no-progress |
| 87 | + sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift' |
| 88 | +
|
| 89 | + run_tests_flow: |
| 90 | + description: "Single flow for running tests targetting specified iOS" |
| 91 | + parameters: |
| 92 | + version_name: |
| 93 | + type: "string" |
| 94 | + os: |
| 95 | + type: "string" |
| 96 | + simulator: |
| 97 | + type: "string" |
| 98 | + default: "iphone 11" |
| 99 | + no_output_timeout: |
| 100 | + type: integer |
| 101 | + default: 1800 |
| 102 | + steps: |
| 103 | + - checkout |
| 104 | + - auxiliary_setup |
| 105 | + - install_cocoapods |
| 106 | + - install_pods |
| 107 | + - run_tests: |
| 108 | + version_name: <<parameters.version_name>> |
| 109 | + os: <<parameters.os>> |
| 110 | + simulator: <<parameters.simulator>> |
| 111 | + - store_results |
| 112 | + |
54 | 113 |
|
55 | 114 | jobs:
|
56 | 115 | test_ios14:
|
57 | 116 | macos:
|
58 | 117 | xcode: "12.0.0"
|
59 | 118 | steps:
|
60 |
| - - checkout |
61 |
| - - *auxiliary_setup |
62 |
| - - *restore_pods_cache |
63 |
| - - *install_pods |
64 |
| - - *save_pods_cache |
65 |
| - - run: |
66 |
| - name: Test on iOS 14 |
67 |
| - no_output_timeout: 1800 |
68 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 11,OS=14.0' logs/xcbuild_ios_14.log test_results/ios_14.xml |
69 |
| - - *store_artifacts |
70 |
| - - *store_test_results |
71 |
| - |
| 119 | + - run_tests_flow: |
| 120 | + version_name: "14" |
| 121 | + os: "14.0" |
| 122 | + simulator: "iPhone 11" |
72 | 123 |
|
73 | 124 | test_ios13:
|
74 | 125 | macos:
|
75 | 126 | xcode: "11.6.0"
|
76 | 127 | steps:
|
77 |
| - - checkout |
78 |
| - - *auxiliary_setup |
79 |
| - - *restore_pods_cache |
80 |
| - - *install_pods |
81 |
| - - *save_pods_cache |
82 |
| - - run: |
83 |
| - name: Test on iOS 13 |
84 |
| - no_output_timeout: 1800 |
85 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 11,OS=13.6' logs/xcbuild_ios_13.log test_results/ios_13.xml |
86 |
| - - *store_artifacts |
87 |
| - - *store_test_results |
| 128 | + - run_tests_flow: |
| 129 | + version_name: "13" |
| 130 | + os: "13.6" |
| 131 | + simulator: "iPhone 11" |
88 | 132 |
|
89 | 133 | test_ios12:
|
90 | 134 | macos:
|
91 | 135 | xcode: "10.2.1"
|
92 | 136 | steps:
|
93 |
| - - checkout |
94 |
| - - *auxiliary_setup |
95 |
| - - *restore_pods_cache |
96 |
| - - *install_pods |
97 |
| - - *save_pods_cache |
98 |
| - - run: |
99 |
| - name: Test on iOS 12 |
100 |
| - no_output_timeout: 1800 |
101 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 7,OS=12.2' logs/xcbuild_ios_12.log test_results/ios_12.xml |
102 |
| - - *store_artifacts |
103 |
| - - *store_test_results |
| 137 | + - run_tests_flow: |
| 138 | + version_name: "12" |
| 139 | + os: "12.2" |
| 140 | + simulator: "iPhone 7" |
104 | 141 |
|
105 | 142 | test_ios11:
|
106 | 143 | macos:
|
107 | 144 | xcode: "10.2.1"
|
108 | 145 | steps:
|
109 |
| - - checkout |
110 |
| - - *auxiliary_setup |
111 |
| - - *restore_pods_cache |
112 |
| - - *install_pods |
113 |
| - - *save_pods_cache |
114 |
| - - run: |
115 |
| - name: Test on iOS 11 |
116 |
| - no_output_timeout: 1800 |
117 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 7,OS=11.4' logs/xcbuild_ios_10.log test_results/ios_10.xml |
118 |
| - - *store_artifacts |
119 |
| - - *store_test_results |
| 146 | + - run_tests_flow: |
| 147 | + version_name: "11" |
| 148 | + os: "11.4" |
| 149 | + simulator: "iPhone 7" |
120 | 150 |
|
121 | 151 | test_ios10:
|
122 | 152 | macos:
|
123 | 153 | xcode: "10.2.1"
|
124 | 154 |
|
125 | 155 | steps:
|
126 |
| - - checkout |
127 |
| - - *auxiliary_setup |
128 |
| - - *restore_pods_cache |
129 |
| - - *install_pods |
130 |
| - - *save_pods_cache |
131 |
| - - run: |
132 |
| - name: Test on iOS 10 |
133 |
| - no_output_timeout: 1800 |
134 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 7,OS=10.3.1' logs/xcbuild_ios_10.log test_results/ios_10.xml |
135 |
| - - *store_artifacts |
136 |
| - - *store_test_results |
| 156 | + - run_tests_flow: |
| 157 | + version_name: "10" |
| 158 | + os: "10.3.1" |
| 159 | + simulator: "iPhone 7" |
137 | 160 |
|
138 | 161 | test_ios9:
|
139 | 162 | macos:
|
140 | 163 | xcode: "10.2.1"
|
141 | 164 | steps:
|
142 |
| - - checkout |
143 |
| - - *ios9_install_and_workaround |
144 |
| - - *auxiliary_setup |
145 |
| - - *restore_pods_cache |
146 |
| - - *install_pods |
147 |
| - - *save_pods_cache |
148 |
| - - run: |
149 |
| - name: Test on iOS 9 |
150 |
| - no_output_timeout: 1800 |
151 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 6s,OS=9.3' logs/xcbuild_ios_9.log test_results/ios_9.xml |
152 |
| - - *store_artifacts |
153 |
| - - *store_test_results |
| 165 | + - ios9_install_and_workaround |
| 166 | + - run_tests_flow: |
| 167 | + version_name: "9" |
| 168 | + os: "9.3" |
| 169 | + simulator: "iPhone 6s" |
154 | 170 |
|
155 | 171 | test_ios8:
|
156 | 172 | macos:
|
157 | 173 | xcode: "10.2.1"
|
158 | 174 | steps:
|
159 |
| - - checkout |
160 |
| - - *ios8_install_and_workaround |
161 |
| - - *auxiliary_setup |
162 |
| - - *restore_pods_cache |
163 |
| - - *install_pods |
164 |
| - - *save_pods_cache |
165 |
| - - run: |
166 |
| - name: Test on iOS 8 |
167 |
| - no_output_timeout: 1800 |
168 |
| - command: ./scripts/ci_test 'platform=iOS Simulator,name=iPhone 6,OS=8.4' logs/xcbuild_ios_8.log test_results/ios_8.xml |
169 |
| - - *store_artifacts |
170 |
| - - *store_test_results |
| 175 | + - ios8_install_and_workaround |
| 176 | + - run_tests_flow: |
| 177 | + version_name: "8" |
| 178 | + os: "8.4" |
| 179 | + simulator: "iPhone 6" |
171 | 180 |
|
172 | 181 |
|
173 | 182 | workflows:
|
|
0 commit comments