blob: f46414e0131d34ce2ce87f046fe5a01e43dc4f7e [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/**'
- 'pkgs/snippet_tool/**'
pull_request:
branches: [main]
paths:
- '.github/workflows/objective_c.yaml'
- 'pkgs/ffigen/**'
- 'pkgs/native_test_helpers/**'
- 'pkgs/objective_c/**'
- 'pkgs/snippet_tool/**'
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github
jobs:
build-flutter-example:
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"]
ios_version: ["18.1"]
include:
- runner: "macos-15"
xcode_version: "16.1"
- runner: "macos-latest"
xcode_version: "26.3"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
channel: stable
- name: List installed Xcodes
run: ls -l /Applications | grep Xcode
- name: List Installed SDKs
run: xcodebuild -showsdks
- name: Select the XCode version
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer
- name: Install iOS SDK
run: |
xcrun simctl list > /dev/null # Wakes up and initializes the CoreSimulator daemon
xcodebuild -downloadPlatform iOS -buildVersion ${{ matrix.ios_version }}
- name: Install dependencies
run: flutter pub get
- 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: Check for xcode for analyzer warnings
run: xcodebuild analyze -workspace macos/Runner.xcworkspace -scheme Runner -configuration Debug GCC_TREAT_WARNINGS_AS_ERRORS=YES