# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode

trigger:
  - master

jobs:
# - job: linuxSwift50
#   pool:
#     vmImage: 'Ubuntu 16.04'
#   container: swift:5.0
#   steps:
#     - script: swift test -c release -Xswiftc -enable-testing
#       displayName: Linux Swift 5.0
- job: macOS1013
  pool:
    vmImage: 'macOS 10.13'
  variables:
    DEVELOPER_DIR: /Applications/Xcode_10.1.app
  steps:
    - script: >
        set -o pipefail &&
        xcodebuild test -destination 'platform=macOS,arch=x86_64' -scheme "ZIPFoundation" |
        xcpretty -r junit -o build/reports/xcodebuild-macos.xml
      displayName: macOS Swfit 4.2

# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode

trigger:
  - master

jobs:
# - job: linuxSwift50
#   pool:
#     vmImage: 'Ubuntu 16.04'
#   container: swift:5.0
#   steps:
#     - script: swift test -c release -Xswiftc -enable-testing
#       displayName: Linux Swift 5.0

- job: macOS_10_13
  pool:
    vmImage: 'macOS 10.13'
  variables:
    DEVELOPER_DIR: /Applications/Xcode_10.1.app
  steps:
    - script: >
        set -o pipefail &&
        xcodebuild test -destination 'platform=macOS,arch=x86_64' -scheme "ZIPFoundation" |
        xcpretty -r junit -o build/reports/xcodebuild-macos.xml
      displayName: macOS Swfit 4.2

- job: iOS_12_1
  pool:
    vmImage: 'macOS 10.13'
  variables:
    DEVELOPER_DIR: /Applications/Xcode_10.1.app
  steps:
    - script: >
        set -o pipefail &&
        xcodebuild test -sdk iphonesimulator -destination "name=iPhone 5" -scheme "ZIPFoundation" |
        xcpretty -r junit -o build/reports/xcodebuild-iOS32.xml
      displayName: iOS Swfit 4.2 (32-bit)
    - script: >
        set -o pipefail &&
        xcodebuild test -sdk iphonesimulator -destination "name=iPhone X" -scheme "ZIPFoundation" |
        xcpretty -r junit -o build/reports/xcodebuild-iOS64.xml
      displayName: iOS Swfit 4.2 (64-bit)

Add iOS 12.1 test job
Add iOS 12.1 test job [skip ci]