Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- renovate/**
pull_request:
branches: [main]
workflow_dispatch:
workflow_call: # Allow this workflow to be called by other workflows

jobs:
Expand All @@ -15,8 +16,6 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v6
with:
lfs: true
- name: Enforce capacitor-swift-pm version
run: |
set -euo pipefail
Expand All @@ -30,8 +29,6 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v6
with:
lfs: true
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
id: install_code
Expand All @@ -47,31 +44,40 @@ jobs:
id: build_code
run: bun run verify:android
build_ios:
timeout-minutes: 30
timeout-minutes: 90
runs-on: macOS-latest
steps:
- name: Check out
uses: actions/checkout@v6
with:
lfs: true
submodules: recursive
- name: Setup Rust
uses: dtolnay/rust-toolchain@1.90.0
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
id: install_code
run: bun i
- name: Check plugin wiring
run: bun run check:wiring
- name: Build native iOS core
run: cd rust && ./build_native_xcframework.sh
- name: Build
id: build_code
run: bun run verify:ios && bun run test:macos
- name: Archive native iOS core artifact
run: tar -czf /tmp/native-ios-core-xcframework.tgz -C ios CapacitorFFmpegNativeCore.xcframework
- name: Upload native iOS core artifact
uses: actions/upload-artifact@v4
with:
name: native-ios-core-xcframework
path: /tmp/native-ios-core-xcframework.tgz
maestro_android:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [web, build_android, build_ios, guard_swiftpm_version]
steps:
- name: Check out
uses: actions/checkout@v6
with:
lfs: true
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
Expand All @@ -89,20 +95,31 @@ jobs:
with:
distribution: 'zulu'
java-version: '21'
- name: Build Android debug APK
run: ./example-app/android/gradlew -p ./example-app/android assembleDebug
- name: Enable KVM access
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Setup Android SDK tools
uses: android-actions/setup-android@v3
- name: Install Maestro CLI
run: |
export MAESTRO_VERSION=2.4.0
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> "$GITHUB_PATH"
- name: Run Android Maestro flows
run: cd example-app && ./scripts/run-maestro-android-ci.sh
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: google_atd
arch: x86_64
profile: pixel_6
emulator-boot-timeout: 900
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none
disable-animations: true
script: |
adb install -r example-app/android/app/build/outputs/apk/debug/app-debug.apk
cd example-app && bun run maestro:android
- name: Upload Android Maestro artifacts
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -122,8 +139,15 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v6
- name: Download native iOS core artifact
uses: actions/download-artifact@v4
with:
lfs: true
name: native-ios-core-xcframework
path: /tmp
- name: Restore native iOS core artifact
run: |
rm -rf ios/CapacitorFFmpegNativeCore.xcframework
tar -xzf /tmp/native-ios-core-xcframework.tgz -C ios
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -183,8 +207,6 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v6
with:
lfs: true
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
id: install_code
Expand Down
11 changes: 7 additions & 4 deletions example-app/.maestro/image-conversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ name: Convert image from picker
- extendedWaitUntil:
visible: "Load demo image"
timeout: 60000
- tapOn: "Load demo image"
- tapOn:
text: "Load demo image"
retryTapIfNoChange: true
- extendedWaitUntil:
visible:
text: "sample-image.png staged in the app cache."
Expand All @@ -20,10 +22,11 @@ name: Convert image from picker
centerElement: true
- tapOn:
text: "Convert image"
retryTapIfNoChange: true
- extendedWaitUntil:
visible:
text: "Converted .* to (jpeg|webp).*"
timeout: 30000
text: "Converted .* to (jpeg|png|webp).*"
timeout: 60000
- assertVisible:
text: "Converted .* to (jpeg|webp).*"
text: "Converted .* to (jpeg|png|webp).*"
- takeScreenshot: "image-conversion-complete"
14 changes: 5 additions & 9 deletions example-app/.maestro/unsupported-reencode-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ name: Verify unsupported Android re-encode contract
- stopApp
- launchApp
- extendedWaitUntil:
visible: "FFmpeg capability playground"
visible: "Run runtime checks"
timeout: 30000
- tapOn: "Show video workflow"
- tapOn: "Run runtime checks"
- extendedWaitUntil:
visible: "Verify unsupported path"
timeout: 30000
- tapOn: "Verify unsupported path"
- extendedWaitUntil:
visible: "Unsupported re-encode smoke test"
visible: "Unsupported re-encode contract"
timeout: 30000
- assertVisible:
text: "Unsupported re-encode smoke test"
text: "Unsupported re-encode contract"
- assertVisible:
text: "passed|Passed"
text: "reencodeVideo is currently only available on iOS."
- takeScreenshot: "unsupported-reencode-android-complete"
2 changes: 1 addition & 1 deletion example-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bun run maestro:ios
bun run maestro:android
```

The Android script bootstraps Maestro's embedded driver APKs explicitly, starts the instrumentation runner, and forwards the gRPC bridge before running the flows. That makes local Android runs match CI instead of depending on Maestro's flaky auto-bootstrap behavior.
The Android script bootstraps Maestro's embedded driver APKs explicitly and starts the instrumentation runner before running the flows. The CLI still owns the ADB port-forward setup so local runs match CI without fighting Maestro's session setup. Install Maestro CLI first before running `bun run maestro:android`; the script expects the local CLI artifacts under `$HOME/.maestro`.

### Native sync

Expand Down
153 changes: 0 additions & 153 deletions example-app/scripts/run-maestro-android-ci.sh

This file was deleted.

4 changes: 0 additions & 4 deletions example-app/scripts/run-maestro-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ if [[ "${DRIVER_READY:-0}" -ne 1 ]]; then
exit 1
fi

adb -s "$DEVICE_ID" forward --remove tcp:7001 >/dev/null 2>&1 || true
adb -s "$DEVICE_ID" forward tcp:7001 tcp:7001 >/dev/null
sleep 2

JAVA_TOOL_OPTIONS=-Djava.net.preferIPv4Stack=true maestro test \
--no-reinstall-driver \
-p android \
Expand Down
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.90.0"
2 changes: 1 addition & 1 deletion rust/build_x264_ios_sim_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
X264_DIR="$SCRIPT_DIR/x264"
X264_DIR="$SCRIPT_DIR/rust/x264"
OUTPUT_DIR="$SCRIPT_DIR/x264-build-ios-sim-arm64"

echo "Building x264 for iOS Simulator ARM64..."
Expand Down
Loading