branches:
  only:
    - master

os: osx
osx_image: xcode10.2
language: swift

env:
  global:
    - XCODE_PROJECT="Xcode/FFFoundation.xcodeproj"
    - XCODE_SCHEME=FFFoundation
    - SWIFT_VERSION=5.0

jobs:
  include:
    - name: "iOS Xcode"
      env: XCODE_DESTINATION="platform=iOS Simulator,OS=12.2,name=iPad Pro (9.7-inch)"
      script: ./scripts/build_xcode.sh

    - name: "macOS Xcode"
      env: XCODE_DESTINATION="platform=macOS"
      script: ./scripts/build_xcode.sh

    - name: "macOS SwiftPM"
      before_script: swift package clean
      script: swift test --parallel --sanitize thread

    - name: "Linux SwiftPM"
      os: linux
      distro: xenial
      language: generic
      sudo: required
      services:
        - docker
      install: docker pull swift:${SWIFT_VERSION}
      before_script: ./scripts/run_on_linux.sh 'swift package clean'
      script: ./scripts/run_on_linux.sh 'swift test --parallel'

after_success:
  - bash <(curl -s https://codecov.io/bash) -J "FFFoundation"

branches:
  only:
    - master

os: osx
osx_image: xcode10.2
language: swift

env:
  global:
    - XCODE_PROJECT="Xcode/FFFoundation.xcodeproj"
    - XCODE_SCHEME=FFFoundation
    - SWIFT_VERSION=5.0.1

jobs:
  include:
    - name: "iOS Xcode"
      env: XCODE_DESTINATION="platform=iOS Simulator,OS=12.2,name=iPad Pro (9.7-inch)"
      script: ./scripts/build_xcode.sh

    - name: "macOS Xcode"
      env: XCODE_DESTINATION="platform=macOS"
      script: ./scripts/build_xcode.sh

    - name: "macOS SwiftPM"
      before_script: swift package clean
      script: swift test --parallel --sanitize thread

    - name: "Linux SwiftPM"
      os: linux
      distro: xenial
      language: generic
      sudo: required
      services:
        - docker
      install: docker pull swift:${SWIFT_VERSION}
      before_script: ./scripts/run_on_linux.sh 'swift package clean'
      script: ./scripts/run_on_linux.sh 'swift test --parallel'

after_success:
  - bash <(curl -s https://codecov.io/bash) -J "FFFoundation"

Update Travis to use Swift 5.0.1
Update Travis to use Swift 5.0.1
