name: Sample

on:
  push:
    branches: [ master ]
    paths:
      - '.github/workflows/sample.yml'
      - 'Firebase*UI/**'
      - '*.podspec'
  pull_request:
    branches: [ master ]
    paths:
      - '.github/workflows/storage.yml'
      - 'Firebase*UI/**'
      - '*.podspec'

  workflow_dispatch:

jobs:
  build:
    name: Swift build
    runs-on: macOS-latest

    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: Setup
        run: |
          cd samples/swift
          gem install bundler
          bundle install
          gem install xcpretty
          bundle exec pod install --repo-update
      - name: Build
        run: |
          cd samples/swift
          xcodebuild \
            -workspace FirebaseUI-demo-swift.xcworkspace \
            -scheme FirebaseUI-demo-swift \
            -sdk iphonesimulator \
            -destination 'platform=iOS Simulator,OS=latest,name=iPhone 11 Pro' \
            clean build test \
            ONLY_ACTIVE_ARCH=YES

name: Sample

on:
  push:
    branches: [ master ]
    paths:
      - '.github/workflows/sample.yml'
      - 'Firebase*UI/**'
      - '*.podspec'
  pull_request:
    branches: [ master ]
    paths:
      - '.github/workflows/storage.yml'
      - 'Firebase*UI/**'
      - '*.podspec'

  workflow_dispatch:

jobs:
  build:
    name: Swift build
    runs-on: macOS-latest

    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: Setup
        run: |
          cd samples/swift
          gem install bundler
          bundle install
          gem install xcpretty
          bundle exec pod install --repo-update
      - name: Build
        run: |
          cd samples/swift
          xcodebuild \
            -workspace FirebaseUI-demo-swift.xcworkspace \
            -scheme FirebaseUI-demo-swift \
            -sdk iphonesimulator \
            -destination 'platform=iOS Simulator,OS=latest,name=iPhone 11 Pro' \
            clean build test \
            ONLY_ACTIVE_ARCH=YES

    build:
    name: ObjC build
    runs-on: macOS-latest

    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: Setup
        run: |
          cd samples/objc
          gem install bundler
          bundle install
          gem install xcpretty
          bundle exec pod install --repo-update
      - name: Build
        # Note: tests aren't run here because the ObjC sample has no test targets.
        run: |
          cd samples/objc
          xcodebuild \
            -workspace FirebaseUI-demo-objc.xcworkspace \
            -scheme FirebaseUI-demo-objc \
            -sdk iphonesimulator \
            -destination 'platform=iOS Simulator,OS=latest,name=iPhone 11 Pro' \
            clean build \
            ONLY_ACTIVE_ARCH=YES

Add objc build to gha
Add objc build to gha
