Skip to content

Commit

Permalink
Remove bitcode from iOS and make available on SPM (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
albho authored Nov 15, 2024
1 parent e0648d7 commit e4eaad8
Show file tree
Hide file tree
Showing 33 changed files with 448 additions and 522 deletions.
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
name: Android AppCenter Tests
name: Android BrowserStack Tests

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'binding/android/CobraTestApp/cobra-test-app/build.gradle'
- '.github/workflows/android-appcenter.yml'
- '.github/workflows/android-browserstack.yml'

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

defaults:
run:
working-directory: binding/android/CobraTestApp

jobs:
build:
name: Run Android Tests on AppCenter
name: Run Android Tests on BrowserStack
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*

- name: Install AppCenter CLI
run: npm install -g appcenter-cli
python-version: '3.10'
- run:
pip3 install requests

- name: set up JDK 11
uses: actions/setup-java@v3
Expand Down Expand Up @@ -62,30 +61,29 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleAndroidTest

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

build-integ:
name: Run Android Integration Tests on AppCenter
name: Run Android Integration Tests on BrowserStack
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*

- name: Install AppCenter CLI
run: npm install -g appcenter-cli
python-version: '3.10'
- run:
pip3 install requests

- name: set up JDK 11
uses: actions/setup-java@v3
Expand Down Expand Up @@ -118,12 +116,12 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleReleaseAndroidTest -DtestBuildType=integ

- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Cobra-Android-Activity"
--devices "Picovoice/android-min-max"
--app-path cobra-test-app/build/outputs/apk/release/cobra-test-app-release.apk
--test-series "cobra-android"
--locale "en_US"
--build-dir cobra-test-app/build/outputs/apk/androidTest/release
- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type espresso
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cobra-Android-Integration"
--devices "android-min-max"
--app_path "cobra-test-app/build/outputs/apk/release/cobra-test-app-release.apk"
--test_path "cobra-test-app/build/outputs/apk/androidTest/release/cobra-test-app-release-androidTest.apk"
37 changes: 17 additions & 20 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,25 @@ defaults:

jobs:
build:
name: Run Android Speed Tests on AppCenter
name: Run Android Speed Tests on BrowserStack
runs-on: ubuntu-latest

strategy:
matrix:
device: [single-android, 32bit-android]
device: [ android-perf ]
include:
- device: single-android
- device: android-perf
performanceThresholdSec: 0.005
- device: 32bit-android
performanceThresholdSec: 0.015

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*

- name: Install AppCenter CLI
run: npm install -g appcenter-cli
python-version: '3.10'
- run:
pip3 install requests

- name: set up JDK 11
uses: actions/setup-java@v3
Expand Down Expand Up @@ -79,12 +76,12 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleAndroidTest -DtestBuildType=perf

- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Cobra-Android-Activity"
--devices "Picovoice/${{ matrix.device }}"
--app-path cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk
--test-series "cobra-android"
--locale "en_US"
--build-dir cobra-test-app/build/outputs/apk/androidTest/debug
- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type espresso
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cobra-Android-Performance"
--devices "${{ matrix.device }}"
--app_path "cobra-test-app/build/outputs/apk/debug/cobra-test-app-debug.apk"
--test_path "cobra-test-app/build/outputs/apk/androidTest/debug/cobra-test-app-debug-androidTest.apk"
68 changes: 0 additions & 68 deletions .github/workflows/ios-appcenter.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: iOS BrowserStack Tests

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/ios-browserstack.yml'

pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/ios-browserstack.yml'


defaults:
run:
working-directory: binding/ios/CobraAppTest

jobs:
build:
name: Run iOS Tests on BrowserStack
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Installing Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- run:
pip3 install requests

- name: Make build dir
run: mkdir ddp

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
CobraAppTestUITests/CobraAppTestUITests.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-project CobraAppTest.xcodeproj
-sdk iphoneos
-scheme CobraAppTest
-derivedDataPath ddp
CODE_SIGNING_ALLOWED=NO

- name: Generating ipa
run: cd ddp/Build/Products/Debug-iphoneos/ &&
mkdir Payload &&
cp -r CobraAppTest.app Payload &&
zip --symlinks -r CobraAppTest.ipa Payload &&
rm -r Payload

- name: Zipping Tests
run: cd ddp/Build/Products/Debug-iphoneos/ &&
zip --symlinks -r CobraAppTestUITests.zip CobraAppTestUITests-Runner.app

- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type xcuitest
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cobra-iOS"
--devices "ios-min-max"
--app_path "ddp/Build/Products/Debug-iphoneos/CobraAppTest.ipa"
--test_path "ddp/Build/Products/Debug-iphoneos/CobraAppTestUITests.zip"
8 changes: 1 addition & 7 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Cocoapods
run: gem install cocoapods

- name: Run Cocoapods
run: pod install

- name: Build
run: xcrun xcodebuild build
-configuration Debug
-workspace CobraDemo.xcworkspace
-project CobraDemo.xcodeproj
-sdk iphoneos
-scheme CobraDemo
-derivedDataPath ddp
Expand Down
Loading

0 comments on commit e4eaad8

Please sign in to comment.