blob: 8ad0fe61b106a8d0c64590b6a1db92e643521179 [file] [edit]
name: objective_c
on:
# Run on PRs and pushes to the default branch.
push:
branches: [main]
paths:
- '.github/workflows/objective_c.yaml'
- 'pkgs/ffigen/**'
- 'pkgs/native_test_helpers/**'
- 'pkgs/objective_c/**'
pull_request:
branches: [main]
paths:
- '.github/workflows/objective_c.yaml'
- 'pkgs/ffigen/**'
- 'pkgs/native_test_helpers/**'
- 'pkgs/objective_c/**'
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github
jobs:
test-flutter:
runs-on: ${{ matrix.runner }}
permissions:
contents: read
defaults:
run:
working-directory: pkgs/objective_c/example/flutter_app
strategy:
fail-fast: false
matrix:
runner: ["macos-15", "macos-latest"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Boot iOS Simulator
run: |
UDID=$(xcrun simctl create "Test iPhone" "iPhone 16")
xcrun simctl boot "$UDID"
echo "UDID=$UDID" >> "$GITHUB_ENV"
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
channel: stable
- name: Install dependencies
run: flutter pub get && flutter pub get --directory="../path_provider_example"
- name: Analyze Flutter examples
run: flutter analyze --fatal-infos && flutter analyze --fatal-infos ../path_provider_example
- name: Build the example app for macos
run: flutter build macos
- name: Build the example app for ios
run: flutter build ios --no-codesign
- name: Run integration tests on iOS Simulator
run: |
xcrun simctl bootstatus "$UDID" -b
flutter test integration_test/objective_c_test.dart -d "$UDID"
- name: Check for xcode for analyzer warnings
run: xcodebuild analyze -workspace macos/Runner.xcworkspace -scheme Runner -configuration Debug GCC_TREAT_WARNINGS_AS_ERRORS=YES