Skip to content

Commit

Permalink
feat: build and install ios interop client in interop workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
typfel committed Jan 16, 2025
1 parent a2a8119 commit 5c5faef
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,23 +182,27 @@ jobs:
wasm-pack test --headless --chrome ./crypto -F "proteus,cryptobox-migrate" -- proteus
e2e-interop-test:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts
with:
target: wasm32-unknown-unknown
target: "wasm32-unknown-unknown,aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
rustflags: ''
- name: Setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1.0'
- name: Install wasm-pack
uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
chrome-version: latest
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -211,6 +215,16 @@ jobs:
run: |
cd crypto-ffi
cargo make wasm
- name: Build iOS artifacts
run: |
cd crypto-ffi
cargo make ios
- name: Built & install iOS Interop client
run: |
cd interop/src/clients/InteropClient
xcodebuild -scheme InteropClient -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15' clean build install DSTROOT=./Products
./install_app.sh "iPhone 16"
./grant_permissions.sh "iPhone 16"
- name: Run E2E interop test
run: cargo run --bin interop

Expand Down
2 changes: 1 addition & 1 deletion extras/webdriver-installation/src/webdriver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl WebdriverKind {
.take()
.unwrap()
.channels
.remove(&ChromeDriverReleaseDetailsChannel::Stable)
.remove(&ChromeDriverReleaseDetailsChannel::Canary)
.unwrap();

let download_url = channel
Expand Down
12 changes: 12 additions & 0 deletions interop/src/clients/InteropClient/grant_permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh

DEVICE=$1

# Pre-approve opening URLs in InteropClient to suppress permission dialogs
SIM_DATA_PATH=`xcrun simctl get_app_container booted com.wire.InteropClient | sed 's/\(.*data\).*/\1/'`
PLIST_PATH="$SIM_DATA_PATH/Library/Preferences/com.apple.launchservices.schemeapproval.plist"
/usr/libexec/PlistBuddy -c 'Add :com.apple.CoreSimulator.CoreSimulatorBridge-->interop string "com.wire.InteropClient"' $PLIST_PATH

# Restart the simulator for changes to take effect
xcrun simctl shutdown all
xcrun simctl boot "$DEVICE"
6 changes: 6 additions & 0 deletions interop/src/clients/InteropClient/install_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

DEVICE=$1

xcrun simctl boot "$DEVICE"
xcrun simctl install booted Products/Applications/InteropClient.app

0 comments on commit 5c5faef

Please sign in to comment.