matrix:
  include:
    - os: linux
      before_install:
        - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
        - wget -q https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04.tar.gz
        - tar xzf swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04.tar.gz
        - export PATH=${PWD}/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04/usr/bin:"${PATH}"
      script:
        - swift build
        - swift build -c release
        - swift test
    - os: osx
      osx_image: xcode9
      sudo: required
      script:
        - swift build
        - swift build -c release
        - swift test

matrix:
  include:
    - os: linux
      before_install:
        - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
        - wget -q https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04.tar.gz
        - tar xzf swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04.tar.gz
        - export PATH=${PWD}/swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a-ubuntu14.04/usr/bin:"${PATH}"
      script:
        - swift package update
        - swift build
        - swift build -c release
        - swift test
    - os: osx
      osx_image: xcode9
      sudo: required
      script:
        - swift package update
        - swift build
        - swift build -c release
        - swift test

Update packages before running tests
Update packages before running tests
