|
| 1 | +--- |
1 | 2 | name: ci
|
2 | 3 | on:
|
3 | 4 | push:
|
4 |
| - branches: [ master ] |
| 5 | + branches: |
| 6 | + - master |
5 | 7 | pull_request:
|
6 |
| - branches: [ '**' ] |
| 8 | + branches: |
| 9 | + - "**" |
7 | 10 | env:
|
8 |
| - CI_XCODE_11: '/Applications/Xcode_11.7.app/Contents/Developer' |
9 |
| - CI_XCODE_13: '/Applications/Xcode_13.4.1.app/Contents/Developer' |
10 |
| - |
| 11 | + CI_XCODE_11: /Applications/Xcode_11.7.app/Contents/Developer |
| 12 | + CI_XCODE_14: /Applications/Xcode_14.2.app/Contents/Developer |
11 | 13 | jobs:
|
12 |
| - ios: |
13 |
| - runs-on: macos-12 |
14 |
| - steps: |
15 |
| - - uses: actions/checkout@v2 |
16 |
| - - name: Setup Ruby |
17 |
| - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 |
18 |
| - - name: Cache Gems |
19 |
| - id: cache-gems |
20 |
| - uses: actions/cache@v2 |
21 |
| - with: |
22 |
| - path: vendor/bundle |
23 |
| - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
24 |
| - restore-keys: | |
25 |
| - ${{ runner.os }}-gem- |
26 |
| - - name: Submodules and Bundle Install |
27 |
| - run: | |
28 |
| - git submodule update --init --recursive |
29 |
| - sudo gem install bundler |
30 |
| - bundle config set path 'vendor/bundle' |
31 |
| - bundle install |
32 |
| - - name: Build-Test |
33 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:ios |
34 |
| - env: |
35 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
36 |
| - - name: Send codecov |
37 |
| - run: bash <(curl https://codecov.io/bash) |
38 |
| - |
39 |
| - macos: |
40 |
| - runs-on: macos-latest |
41 |
| - steps: |
42 |
| - - uses: actions/checkout@v2 |
43 |
| - - name: Setup Ruby |
44 |
| - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 |
45 |
| - - name: Cache Gems |
46 |
| - id: cache-gems |
47 |
| - uses: actions/cache@v2 |
48 |
| - with: |
49 |
| - path: vendor/bundle |
50 |
| - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
51 |
| - restore-keys: | |
52 |
| - ${{ runner.os }}-gem- |
53 |
| - - name: Submodules and Bundle Install |
54 |
| - run: | |
55 |
| - git submodule update --init --recursive |
56 |
| - sudo gem install bundler |
57 |
| - bundle config set path 'vendor/bundle' |
58 |
| - bundle install |
59 |
| - - name: Create and set the default keychain |
60 |
| - run: | |
61 |
| - security create-keychain -p "" temporary |
62 |
| - security default-keychain -s temporary |
63 |
| - security unlock-keychain -p "" temporary |
64 |
| - security set-keychain-settings -lut 7200 temporary |
65 |
| - - name: Build-Test |
66 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:macos |
67 |
| - env: |
68 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
69 |
| - - name: Send codecov |
70 |
| - run: bash <(curl https://codecov.io/bash) |
71 |
| - |
72 |
| - facebook_utils: |
73 |
| - needs: parseui |
74 |
| - runs-on: macos-latest |
75 |
| - env: |
76 |
| - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
77 |
| - steps: |
78 |
| - - uses: actions/checkout@v2 |
79 |
| - - name: Setup Ruby |
80 |
| - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 |
81 |
| - - name: Cache Gems |
82 |
| - id: cache-gems |
83 |
| - uses: actions/cache@v2 |
84 |
| - with: |
85 |
| - path: vendor/bundle |
86 |
| - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
87 |
| - restore-keys: | |
88 |
| - ${{ runner.os }}-gem- |
89 |
| - - name: Submodules and Bundle Install |
90 |
| - run: | |
91 |
| - git submodule update --init --recursive |
92 |
| - sudo gem install bundler |
93 |
| - bundle config set path 'vendor/bundle' |
94 |
| - bundle install |
95 |
| - carthage bootstrap --use-xcframeworks |
96 |
| - - name: Build-Test |
97 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:facebook_utils:ios |
98 |
| - env: |
99 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
100 |
| - - name: Send codecov |
101 |
| - run: bash <(curl https://codecov.io/bash) |
102 |
| - |
103 |
| - twitter_utils: |
104 |
| - needs: parseui |
105 |
| - runs-on: macos-latest |
106 |
| - steps: |
107 |
| - - uses: actions/checkout@v2 |
108 |
| - - name: Setup Ruby |
109 |
| - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 |
110 |
| - - name: Cache Gems |
111 |
| - id: cache-gems |
112 |
| - uses: actions/cache@v2 |
113 |
| - with: |
114 |
| - path: vendor/bundle |
115 |
| - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
116 |
| - restore-keys: | |
117 |
| - ${{ runner.os }}-gem- |
118 |
| - - name: Submodules and Bundle Install |
119 |
| - run: | |
120 |
| - git submodule update --init --recursive |
121 |
| - sudo gem install bundler |
122 |
| - bundle config set path 'vendor/bundle' |
123 |
| - bundle install |
124 |
| - - name: Build-Test |
125 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:twitter_utils:ios |
126 |
| - env: |
127 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
128 |
| - - name: Send codecov |
129 |
| - run: bash <(curl https://codecov.io/bash) |
130 |
| - |
131 |
| - parseui: |
132 |
| - runs-on: macos-latest |
133 |
| - env: |
134 |
| - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
135 |
| - steps: |
136 |
| - - uses: actions/checkout@v2 |
137 |
| - - name: Setup Ruby |
138 |
| - uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 |
139 |
| - - name: Cache Gems |
140 |
| - id: cache-gems |
141 |
| - uses: actions/cache@v2 |
142 |
| - with: |
143 |
| - path: vendor/bundle |
144 |
| - key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
145 |
| - restore-keys: | |
146 |
| - ${{ runner.os }}-gem- |
147 |
| - - name: Submodules and Bundle Install |
148 |
| - run: | |
149 |
| - git submodule update --init --recursive |
150 |
| - sudo gem install bundler |
151 |
| - bundle config set path 'vendor/bundle' |
152 |
| - bundle install |
153 |
| - carthage bootstrap --use-xcframeworks |
154 |
| - - name: Build-Test |
155 |
| - env: |
156 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
157 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake test:parseui:all |
158 |
| - - name: Send codecov |
159 |
| - run: bash <(curl https://codecov.io/bash) |
160 |
| - |
161 |
| - assets: |
162 |
| - runs-on: macos-11 |
| 14 | + tests: |
163 | 15 | env:
|
164 | 16 | GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 17 | + timeout-minutes: 60 |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + script: |
| 21 | + - test:ios |
| 22 | + - test:macos |
| 23 | + - test:facebook_utils:ios |
| 24 | + - test:twitter_utils:ios |
| 25 | + - test:parseui:all |
| 26 | + - package:release |
| 27 | + fail-fast: false |
| 28 | + runs-on: ${{ (matrix.script == 'package:release' && 'macos-11') || 'macos-12' }} |
165 | 29 | steps:
|
166 |
| - - uses: actions/checkout@v2 |
| 30 | + - uses: actions/checkout@v3 |
167 | 31 | - name: Setup Ruby
|
168 | 32 | uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
169 | 33 | - name: Cache Gems
|
170 | 34 | id: cache-gems
|
171 |
| - uses: actions/cache@v2 |
| 35 | + uses: actions/cache@v3 |
172 | 36 | with:
|
173 | 37 | path: vendor/bundle
|
174 | 38 | key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
175 | 39 | restore-keys: |
|
176 | 40 | ${{ runner.os }}-gem-
|
177 |
| - - name: Submodules and Bundle Install |
| 41 | + - name: Create and set the default keychain |
| 42 | + run: | |
| 43 | + security create-keychain -p "" temporary |
| 44 | + security default-keychain -s temporary |
| 45 | + security unlock-keychain -p "" temporary |
| 46 | + security set-keychain-settings -lut 7200 temporary |
| 47 | + - name: Submodules |
178 | 48 | run: |
|
179 | 49 | git submodule update --init --recursive
|
180 | 50 | sudo gem install bundler
|
181 | 51 | bundle config set path 'vendor/bundle'
|
182 |
| - bundle install |
| 52 | + - name: Bundle Install |
| 53 | + if: steps.cache-gems.outputs.cache-hit != 'true' |
| 54 | + run: bundle install |
| 55 | + - name: Cache Carthage |
| 56 | + uses: actions/cache@v3 |
| 57 | + id: carthage-cache |
| 58 | + with: |
| 59 | + path: Carthage |
| 60 | + key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} |
| 61 | + restore-keys: | |
| 62 | + ${{ runner.os }}-carthage- |
| 63 | + - name: Carthage |
| 64 | + if: ${{ steps.carthage-cache.outputs.cache-hit != 'true' }} |
| 65 | + run: | |
183 | 66 | carthage bootstrap --use-xcframeworks
|
184 |
| - - name: Build Release |
185 |
| - run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake package:release |
| 67 | + - name: Build-Test |
| 68 | + run: set -o pipefail && env NSUnbufferedIO=YES bundle exec rake ${{ matrix.script }} |
186 | 69 | env:
|
187 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_11 }} |
188 |
| - |
| 70 | + DEVELOPER_DIR: ${{ (matrix.script == 'package:release' && env.CI_XCODE_11) || env.CI_XCODE_14 }} |
| 71 | + - name: Get Artifact Name |
| 72 | + if: ${{ always() }} |
| 73 | + env: |
| 74 | + ARTIFACT_NAME: ${{ matrix.script }}-logs |
| 75 | + run: | |
| 76 | + ARTIFACT_NAME=${{ env.ARTIFACT_NAME }} |
| 77 | + echo ARTIFACT_NAME=${ARTIFACT_NAME//:/-} >> $GITHUB_ENV # replace colon with dashes |
| 78 | + - name: Upload Artifact Logs |
| 79 | + if: ${{ always() }} |
| 80 | + uses: actions/upload-artifact@v3 |
| 81 | + with: |
| 82 | + name: ${{ env.ARTIFACT_NAME }} |
| 83 | + path: | |
| 84 | + ~/Library/Logs/DiagnosticReports |
| 85 | + ~/Library/Developer/Xcode/DerivedData/Parse-*/Logs/Test |
| 86 | + - name: Send Codecov |
| 87 | + run: bash <(curl https://codecov.io/bash) |
189 | 88 | docs:
|
190 |
| - runs-on: macos-latest |
| 89 | + runs-on: macos-12 |
191 | 90 | steps:
|
192 |
| - - uses: actions/checkout@v2 |
| 91 | + - uses: actions/checkout@v3 |
193 | 92 | - name: Setup Ruby
|
194 | 93 | uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
195 | 94 | - name: Cache Gems
|
196 | 95 | id: cache-gems
|
197 |
| - uses: actions/cache@v2 |
| 96 | + uses: actions/cache@v3 |
198 | 97 | with:
|
199 | 98 | path: vendor/bundle
|
200 | 99 | key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
201 | 100 | restore-keys: |
|
202 | 101 | ${{ runner.os }}-gem-
|
203 |
| - - name: Submodules and Bundle Instal |
| 102 | + - name: Submodules |
204 | 103 | run: |
|
205 | 104 | git submodule update --init --recursive
|
206 | 105 | sudo gem install bundler
|
207 | 106 | bundle config path vendor/bundle
|
208 |
| - bundle install |
| 107 | + - name: Bundle Install |
| 108 | + if: steps.cache-gems.outputs.cache-hit != 'true' |
| 109 | + run: bundle install |
209 | 110 | - name: Create Jazzy Docs
|
210 | 111 | run: |
|
211 | 112 | ./Scripts/jazzy.sh
|
212 | 113 | env:
|
213 |
| - DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} |
| 114 | + DEVELOPER_DIR: ${{ env.CI_XCODE_14 }} |
0 commit comments