Skip to content

Commit e4eaad8

Browse files
authored
Remove bitcode from iOS and make available on SPM (#228)
1 parent e0648d7 commit e4eaad8

File tree

33 files changed

+448
-522
lines changed

33 files changed

+448
-522
lines changed

.github/workflows/android-appcenter.yml renamed to .github/workflows/android-browserstack.yml

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
name: Android AppCenter Tests
1+
name: Android BrowserStack Tests
22

33
on:
44
workflow_dispatch:
55
push:
66
branches: [ main ]
77
paths:
88
- 'binding/android/CobraTestApp/cobra-test-app/build.gradle'
9-
- '.github/workflows/android-appcenter.yml'
9+
- '.github/workflows/android-browserstack.yml'
1010

1111
pull_request:
1212
branches: [ main, 'v[0-9]+.[0-9]+' ]
1313
paths:
1414
- 'binding/android/CobraTestApp/cobra-test-app/build.gradle'
15-
- '.github/workflows/android-appcenter.yml'
15+
- '.github/workflows/android-browserstack.yml'
1616

1717
defaults:
1818
run:
1919
working-directory: binding/android/CobraTestApp
2020

2121
jobs:
2222
build:
23-
name: Run Android Tests on AppCenter
23+
name: Run Android Tests on BrowserStack
2424
runs-on: ubuntu-latest
2525

2626
steps:
2727
- uses: actions/checkout@v3
2828

29-
- name: Set up Node.js LTS
30-
uses: actions/setup-node@v3
29+
- name: Installing Python
30+
uses: actions/setup-python@v5
3131
with:
32-
node-version: lts/*
33-
34-
- name: Install AppCenter CLI
35-
run: npm install -g appcenter-cli
32+
python-version: '3.10'
33+
- run:
34+
pip3 install requests
3635

3736
- name: set up JDK 11
3837
uses: actions/setup-java@v3
@@ -62,30 +61,29 @@ jobs:
6261
- name: Build androidTest
6362
run: ./gradlew assembleAndroidTest
6463

65-
- name: Run tests on AppCenter
66-
run: appcenter test run espresso
67-
--token ${{secrets.APPCENTERAPITOKEN}}
68-
--app "Picovoice/Cobra-Android-Activity"
69-
--devices "Picovoice/android-min-max"
70-
--app-path cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk
71-
--test-series "cobra-android"
72-
--locale "en_US"
73-
--build-dir cobra-test-app/build/outputs/apk/androidTest/debug
64+
- name: Run tests on BrowserStack
65+
run: python3 ../../../script/automation/browserstack.py
66+
--type espresso
67+
--username "${{secrets.BROWSERSTACK_USERNAME}}"
68+
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
69+
--project_name "Cobra-Android"
70+
--devices "android-min-max"
71+
--app_path "cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk"
72+
--test_path "cobra-test-app/build/outputs/apk/androidTest/debug/cobra-test-app-debug-androidTest.apk"
7473

7574
build-integ:
76-
name: Run Android Integration Tests on AppCenter
75+
name: Run Android Integration Tests on BrowserStack
7776
runs-on: ubuntu-latest
7877

7978
steps:
8079
- uses: actions/checkout@v3
8180

82-
- name: Set up Node.js LTS
83-
uses: actions/setup-node@v3
81+
- name: Installing Python
82+
uses: actions/setup-python@v5
8483
with:
85-
node-version: lts/*
86-
87-
- name: Install AppCenter CLI
88-
run: npm install -g appcenter-cli
84+
python-version: '3.10'
85+
- run:
86+
pip3 install requests
8987

9088
- name: set up JDK 11
9189
uses: actions/setup-java@v3
@@ -118,12 +116,12 @@ jobs:
118116
- name: Build androidTest
119117
run: ./gradlew assembleReleaseAndroidTest -DtestBuildType=integ
120118

121-
- name: Run tests on AppCenter
122-
run: appcenter test run espresso
123-
--token ${{secrets.APPCENTERAPITOKEN}}
124-
--app "Picovoice/Cobra-Android-Activity"
125-
--devices "Picovoice/android-min-max"
126-
--app-path cobra-test-app/build/outputs/apk/release/cobra-test-app-release.apk
127-
--test-series "cobra-android"
128-
--locale "en_US"
129-
--build-dir cobra-test-app/build/outputs/apk/androidTest/release
119+
- name: Run tests on BrowserStack
120+
run: python3 ../../../script/automation/browserstack.py
121+
--type espresso
122+
--username "${{secrets.BROWSERSTACK_USERNAME}}"
123+
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
124+
--project_name "Cobra-Android-Integration"
125+
--devices "android-min-max"
126+
--app_path "cobra-test-app/build/outputs/apk/release/cobra-test-app-release.apk"
127+
--test_path "cobra-test-app/build/outputs/apk/androidTest/release/cobra-test-app-release-androidTest.apk"

.github/workflows/android-perf.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,25 @@ defaults:
1919

2020
jobs:
2121
build:
22-
name: Run Android Speed Tests on AppCenter
22+
name: Run Android Speed Tests on BrowserStack
2323
runs-on: ubuntu-latest
2424

2525
strategy:
2626
matrix:
27-
device: [single-android, 32bit-android]
27+
device: [ android-perf ]
2828
include:
29-
- device: single-android
29+
- device: android-perf
3030
performanceThresholdSec: 0.005
31-
- device: 32bit-android
32-
performanceThresholdSec: 0.015
3331

3432
steps:
3533
- uses: actions/checkout@v3
3634

37-
- name: Set up Node.js LTS
38-
uses: actions/setup-node@v3
35+
- name: Installing Python
36+
uses: actions/setup-python@v5
3937
with:
40-
node-version: lts/*
41-
42-
- name: Install AppCenter CLI
43-
run: npm install -g appcenter-cli
38+
python-version: '3.10'
39+
- run:
40+
pip3 install requests
4441

4542
- name: set up JDK 11
4643
uses: actions/setup-java@v3
@@ -79,12 +76,12 @@ jobs:
7976
- name: Build androidTest
8077
run: ./gradlew assembleAndroidTest -DtestBuildType=perf
8178

82-
- name: Run tests on AppCenter
83-
run: appcenter test run espresso
84-
--token ${{secrets.APPCENTERAPITOKEN}}
85-
--app "Picovoice/Cobra-Android-Activity"
86-
--devices "Picovoice/${{ matrix.device }}"
87-
--app-path cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk
88-
--test-series "cobra-android"
89-
--locale "en_US"
90-
--build-dir cobra-test-app/build/outputs/apk/androidTest/debug
79+
- name: Run tests on BrowserStack
80+
run: python3 ../../../script/automation/browserstack.py
81+
--type espresso
82+
--username "${{secrets.BROWSERSTACK_USERNAME}}"
83+
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
84+
--project_name "Cobra-Android-Performance"
85+
--devices "${{ matrix.device }}"
86+
--app_path "cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk"
87+
--test_path "cobra-test-app/build/outputs/apk/androidTest/debug/cobra-test-app-debug-androidTest.apk"

.github/workflows/ios-appcenter.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: iOS BrowserStack Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/ios-browserstack.yml'
9+
10+
pull_request:
11+
branches: [ main, 'v[0-9]+.[0-9]+' ]
12+
paths:
13+
- '.github/workflows/ios-browserstack.yml'
14+
15+
16+
defaults:
17+
run:
18+
working-directory: binding/ios/CobraAppTest
19+
20+
jobs:
21+
build:
22+
name: Run iOS Tests on BrowserStack
23+
runs-on: macos-latest
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Installing Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.10'
33+
- run:
34+
pip3 install requests
35+
36+
- name: Make build dir
37+
run: mkdir ddp
38+
39+
- name: Inject AccessKey
40+
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
41+
CobraAppTestUITests/CobraAppTestUITests.swift
42+
43+
- name: XCode Build
44+
run: xcrun xcodebuild build-for-testing
45+
-configuration Debug
46+
-project CobraAppTest.xcodeproj
47+
-sdk iphoneos
48+
-scheme CobraAppTest
49+
-derivedDataPath ddp
50+
CODE_SIGNING_ALLOWED=NO
51+
52+
- name: Generating ipa
53+
run: cd ddp/Build/Products/Debug-iphoneos/ &&
54+
mkdir Payload &&
55+
cp -r CobraAppTest.app Payload &&
56+
zip --symlinks -r CobraAppTest.ipa Payload &&
57+
rm -r Payload
58+
59+
- name: Zipping Tests
60+
run: cd ddp/Build/Products/Debug-iphoneos/ &&
61+
zip --symlinks -r CobraAppTestUITests.zip CobraAppTestUITests-Runner.app
62+
63+
- name: Run tests on BrowserStack
64+
run: python3 ../../../script/automation/browserstack.py
65+
--type xcuitest
66+
--username "${{secrets.BROWSERSTACK_USERNAME}}"
67+
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
68+
--project_name "Cobra-iOS"
69+
--devices "ios-min-max"
70+
--app_path "ddp/Build/Products/Debug-iphoneos/CobraAppTest.ipa"
71+
--test_path "ddp/Build/Products/Debug-iphoneos/CobraAppTestUITests.zip"

.github/workflows/ios-demos.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v3
2727

28-
- name: Install Cocoapods
29-
run: gem install cocoapods
30-
31-
- name: Run Cocoapods
32-
run: pod install
33-
3428
- name: Build
3529
run: xcrun xcodebuild build
3630
-configuration Debug
37-
-workspace CobraDemo.xcworkspace
31+
-project CobraDemo.xcodeproj
3832
-sdk iphoneos
3933
-scheme CobraDemo
4034
-derivedDataPath ddp

0 commit comments

Comments
 (0)