matrix:
  include:
    - os: osx
      language: generic
      # Xcode version implicitly defines the Swift version to be used on macOS.
      osx_image: xcode8.3

    - os: osx
      language: generic
      # Xcode version implicitly defines the Swift version to be used on macOS.
      osx_image: xcode9.2

    - os: linux
      language: generic
      sudo: required
      services:
        - docker
      env:
        # The Docker image to use on Linux in Docker notation,
        # e.g. "swift" or "myusername/myswift" or "swift:3.0.2".
        # The image must have Swift installed so that the `swift`
        # command is in the `$PATH`.
        #
        # I recommend Docker Hub's "official" (not maintained by Apple)
        # Swift image at https://hub.docker.com/r/_/swift/. Its name
        # is simply "swift".
        #
        # You can use tags to select a specific Swift version if the
        # image supports it, e.g. "swift:3.0.2" or "swift:latest".
        DOCKER_IMAGE="swift:3.1"

script:
  - chmod ugo+x ./scripts/travis-build-script.sh
  - ./scripts/travis-build-script.sh

matrix:
  include:
    - os: osx
      language: generic
      # Xcode version implicitly defines the Swift version to be used on macOS.
      osx_image: xcode8.3

    - os: osx
      language: generic
      # Xcode version implicitly defines the Swift version to be used on macOS.
      osx_image: xcode9.2

    - os: linux
      language: generic
      sudo: required
      services:
        - docker
      env:
        # The Docker image to use on Linux in Docker notation,
        # e.g. "swift" or "myusername/myswift" or "swift:3.0.2".
        # The image must have Swift installed so that the `swift`
        # command is in the `$PATH`.
        #
        # I recommend Docker Hub's "official" (not maintained by Apple)
        # Swift image at https://hub.docker.com/r/_/swift/. Its name
        # is simply "swift".
        #
        # You can use tags to select a specific Swift version if the
        # image supports it, e.g. "swift:3.0.2" or "swift:latest".
        DOCKER_IMAGE="swift:3.1"

    - os: linux
      language: generic
      sudo: required
      services:
        - docker
      env:
        DOCKER_IMAGE="swift:4.0"

script:
  - chmod ugo+x ./scripts/travis-build-script.sh
  - ./scripts/travis-build-script.sh

Add Swift 4.0 on Linux to Travis CI scheme
Add Swift 4.0 on Linux to Travis CI scheme
