-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: split benchmarking into separate target/action/sauce-config
- Loading branch information
1 parent
ed975db
commit 8af6508
Showing
9 changed files
with
459 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Benchmarking | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # every night at midnight UTC | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
paths: | ||
- 'Samples/iOS-Swift/iOS-Swift/**' | ||
- 'Samples/iOS-Swift/PerformanceBenchmarks/**' | ||
- '.github/workflows/benchmarking.yml' | ||
- '.sauce/benchmarking-config.yml' | ||
- 'fastlane/**' | ||
|
||
jobs: | ||
build-benchmark-test-target: | ||
name: Build UITests with Xcode ${{matrix.xcode}} | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: ./scripts/ci-select-xcode.sh | ||
- run: git apply ./scripts/set-device-tests-environment.patch | ||
- run: fastlane build_ios_benchmark_test | ||
env: | ||
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
- name: Archiving DerivedData | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: DerivedData-Xcode-${{matrix.xcode}} | ||
path: | | ||
**/Debug-iphoneos/iOS-Swift.app | ||
**/Debug-iphoneos/PerformanceBenchmarking-Runner.app | ||
run-ui-tests-with-sauce: | ||
name: Run Benchmarks on ${{ matrix.suite }} in Sauce Labs | ||
runs-on: ubuntu-latest | ||
needs: build-benchmark-test-target | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- xcode: "13.2" | ||
suite: "High-end device" | ||
- xcode: "13.2" | ||
suite: "Mid-tier device" | ||
- xcode: "13.2" | ||
suite: "Low-end device" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: DerivedData-Xcode-${{matrix.xcode}} | ||
- run: npm install -g [email protected] | ||
- name: Run Benchmarks in SauceLab | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
# As Sauce Labs is a bit flaky we retry 5 times | ||
run: for i in {1..5}; do saucectl run --select-suite ${{ matrix.suite }} && break ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: v1alpha | ||
kind: xcuitest | ||
sauce: | ||
region: us-west-1 | ||
concurrency: 2 | ||
|
||
defaults: | ||
timeout: 20m | ||
|
||
xcuitest: | ||
app: ./DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app | ||
testApp: ./DerivedData/Build/Products/Debug-iphoneos/PerformanceBenchmarking-Runner.app | ||
|
||
suites: | ||
- name: "High-end device" | ||
devices: | ||
- name: "iPad Pro 12.9 2021" | ||
platformVersion: "14.7" | ||
|
||
- name: "Mid-tier device" | ||
devices: | ||
- name: "iPhone 7 Plus" | ||
platformVersion: "14.8" | ||
|
||
- name: "Low-end device" | ||
devices: | ||
- name: "iPhone 6S" | ||
platformVersion: "13.5" |
22 changes: 22 additions & 0 deletions
22
Samples/iOS-Swift/PerformanceBenchmarks/PerformanceBenchmarks-Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.