fix1 #2
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
name: iOS Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Install CocoaPods dependencies | |
run: | | |
cd ios | |
pod init | |
pod install | |
cd .. | |
- name: Build iOS application | |
run: flutter build ios --simulator --no-codesign | |
#run: flutter build ios --release --no-codesign | |
#run: flutter build ios --debug --no-codesign | |
#run: flutter build ipa --release --no-codesign | |
#run: flutter build ipa --release --no-codesign --obfuscate --split-debug-info=ios/symbols --build-name=0.2.0 --build-number=2 | |
#- name: Build iOS ipa | |
#run: xcodebuild -exportArchive -archivePath build/ios/archive/Runner.xcarchive -exportOptionsPlist ios/exportOptions.plist -exportPath build/ios/ipa/Runner.ipa | |
# xcodebuild -exportArchive -archivePath $PWD/build/Runner.xcarchive -exportOptionsPlist exportOptions.plist -exportPath $PWD/build/Runner.ipa | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: iOS-Build | |
path: build/ios/iphonesimulator # flutter build ios --simulator --no-codesign | |
#path: build/ios/iphoneos # for command: flutter build ios --release --no-codesign | |
#path: build/ios/iphoneos # for command: flutter build ios --debug --no-codesign | |
#path: build/ios/archive # for command: flutter build ipa --no-codesign | |
#path: build/ios/ipa | |
# More: https://chatgpt.com/share/67603bca-97a0-800f-bf71-14f90fd55afb | |
- name: Run Flutter Integration Test with Video Recording | |
run: | | |
# Boot iOS simulator | |
xcrun simctl list devices | |
xcrun simctl boot "iPhone 14" | |
# Start screen recording | |
mkdir -p artifacts | |
xcrun simctl io booted recordVideo artifacts/integration-test-video.mp4 & RECORD_PID=$! | |
# Run the integration tests | |
flutter test integration_test/my_app_test.dart | |
# Stop screen recording | |
kill $RECORD_PID || true | |
- name: Upload Test Video | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flutter-integration-test-video | |
path: artifacts/integration-test-video.mp4 |