name: CI

on:
  push:
  pull_request:


jobs:
  build:
    runs-on: macos-latest
        
    steps:
    - uses: actions/checkout@v2

    - name: Generate project file to execute test and build properly
      run: |
        swift package generate-xcodeproj

    - name: Run tests
      run: |
        xcodebuild test -scheme ModuleServices-Package -configuration Debug -destination 'name=iPhone 11' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO

    - name: Compile project (in Release)
      run: |
        xcodebuild build -scheme ModuleServices-Package -configuration Debug -destination 'name=iPhone 11' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO

name: CI

on:
  push:
  pull_request:


jobs:
  build:
    runs-on: macos-latest
        
    steps:
    - uses: actions/checkout@v2

    # Github Actions' machines do in fact have recent versions of Xcode,
    # but you may have to explicitly switch to them.  We explicitly want
    # to use Xcode 12, so we use xcode-select to switch to it.
    - name: Switch to Xcode 12
      run: sudo xcode-select --switch /Applications/Xcode_12.app

    - name: Generate project file to execute test and build properly
      run: |
        swift package generate-xcodeproj

    - name: Run tests
      run: |
        xcodebuild test -scheme ModuleServices-Package -destination 'name=iPhone 11'

    - name: Compile project (in Release)
      run: |
        xcodebuild build -scheme ModuleServices-Package -destination 'name=iPhone 11'

Use Xcode 12 to compile in github
Use Xcode 12 to compile in github
