name: Swift

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  target_macOS:

    name: Smoke Test (macOS)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Run tests
      run: swift test -v

  target_iOS:

    name: Smoke Test (iOS Simulator)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: xcodebuild build -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .
    - name: Run tests
      run: xcodebuild test -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .

  target_macCatalyst:

    name: Smoke Test (macCatalyst)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: xcodebuild build -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .
    - name: Run tests
      run: xcodebuild test -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .

name: Swift

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  target_macOS:

    name: Smoke Test (macOS)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Run tests
      run: swift test -v

  target_simulator:

    name: Smoke Test (iOS Simulator)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: xcodebuild build -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .
    - name: Run tests
      run: xcodebuild test -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .

  target_iOS:

    name: Build (Generic iOS Device)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: xcodebuild build -scheme MetalPetal -destination 'platform=iOS,name=Generic iOS Device' -workspace .

  target_macCatalyst:

    name: Smoke Test (macCatalyst)
    
    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: xcodebuild build -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .
    - name: Run tests
      run: xcodebuild test -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .

Add "Generic iOS Device" build test.
Add "Generic iOS Device" build test.