Skip to content

Commit 076e070

Browse files
author
Bahadir Oncel
committed
Build sample app as part of CI
1 parent afbffcc commit 076e070

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,46 @@ jobs:
182182
xcrun simctl list devices 12.4
183183
- name: Run v3 Tests (Debug - iOS 12.4)
184184
run: bundle exec fastlane test_v3 device:"iPhone 7 (12.4)"
185+
186+
build-sample-v3:
187+
name: Build v3 Sample
188+
runs-on: macos-latest
189+
steps:
190+
- uses: actions/checkout@v1
191+
- name: Cache RubyGems
192+
uses: actions/cache@v2
193+
id: rubygem-cache
194+
with:
195+
path: vendor/bundle
196+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
197+
restore-keys: ${{ runner.os }}-gem-
198+
- name: Install RubyGems
199+
if: steps.rubygem-cache.outputs.cache-hit != 'true'
200+
run: bundle install
201+
- name: Build v3 Sample
202+
run: bundle exec fastlane build_sample_v3
203+
204+
build-sample-v3-ios12:
205+
name: Build v3 Sample (iOS12.4)
206+
runs-on: macos-latest
207+
steps:
208+
- uses: actions/checkout@v1
209+
- name: Cache RubyGems
210+
uses: actions/cache@v2
211+
id: rubygem-cache
212+
with:
213+
path: vendor/bundle
214+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
215+
restore-keys: ${{ runner.os }}-gem-
216+
- name: Install RubyGems
217+
if: steps.rubygem-cache.outputs.cache-hit != 'true'
218+
run: bundle install
219+
- name: Prepare iOS 12 simulator
220+
run: |
221+
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
222+
sudo ln -s /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime
223+
xcrun simctl list runtimes
224+
xcrun simctl create custom-test-device "iPhone 7" "com.apple.CoreSimulator.SimRuntime.iOS-12-4"
225+
xcrun simctl list devices 12.4
226+
- name: Build v3 Sample
227+
run: bundle exec fastlane build_sample_v3 device:"iPhone 7 (12.4)"

fastlane/Fastfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,14 @@ lane :stress_test_v3_release do
339339
)
340340
}
341341
end
342+
343+
desc "Builds v3 Sample app"
344+
lane :build_sample_v3 do |options|
345+
scan(
346+
project: "StreamChat_v3.xcodeproj",
347+
scheme: "Sample",
348+
clean: true,
349+
build_for_testing: true,
350+
devices: options[:device],
351+
)
352+
end

fastlane/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ Runs stress tests for v3
9595
fastlane stress_test_v3_release
9696
```
9797
Runs stress tests for v3 in Release config
98+
### build_sample_v3
99+
```
100+
fastlane build_sample_v3
101+
```
102+
Builds v3 Sample app
98103

99104
----
100105

0 commit comments

Comments
 (0)