# only run for: merge commits, releases and pull-requests if: type != push OR branch = master OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/ stages: - name: pretest - name: test - name: deploy if: branch =~ ^\d+\.\d+\.\d+$ os: osx language: swift osx_image: xcode10.1 xcode_project: Path.swift.xcodeproj xcode_scheme: Path.swift-Package jobs: include: - name: macOS / Swift 4.0.3 script: swift test --parallel -Xswiftc -swift-version -Xswiftc 4 - name: macOS / Swift 4.2.1 script: swift test --parallel - name: macOS / Swift 5.0 osx_image: xcode10.2 script: swift test --parallel - &xcodebuild before_install: swift package generate-xcodeproj --enable-code-coverage xcode_destination: platform=iOS Simulator,OS=latest,name=iPhone XS name: iOS / Swift 4.2.1 after_success: bash <(curl -s https://codecov.io/bash) - <<: *xcodebuild xcode_destination: platform=tvOS Simulator,OS=latest,name=Apple TV name: tvOS / Swift 4.2.1 - <<: *xcodebuild name: watchOS / Swift 4.2.1 script: | set -o pipefail xcodebuild \ -project Path.swift.xcodeproj \ -scheme Path.swift-Package \ -destination 'platform=watchOS Simulator,OS=latest,name=Apple Watch Series 4 - 40mm' \ build | xcpretty after_success: false - &linux env: SWIFT_VERSION=4.2.1 os: linux name: Linux / Swift 4.2.1 language: generic dist: trusty sudo: false install: eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: swift test --parallel - <<: *linux env: SWIFT_VERSION='5.0' name: Linux / Swift 5.0.0 - stage: pretest name: Check Linux tests are sync’d install: swift test --generate-linuxmain script: git diff --exit-code osx_image: xcode10.2 - stage: deploy name: Jazzy osx_image: xcode10.2 install: gem install jazzy before_script: swift package generate-xcodeproj script: | jazzy --config .github/jazzy.yml \ --module-version $TRAVIS_TAG \ --github_url "https://github.com/$TRAVIS_REPO_SLUG" deploy: provider: pages skip-cleanup: true github-token: $GITHUB_TOKEN local-dir: output on: tags: true - name: CocoaPods osx_image: xcode10.2 install: | brew install mxcl/made/swift-sh curl -O https://raw.githubusercontent.com/mxcl/ops/master/deploy chmod u+x deploy before_script: ./deploy generate-podspec script: pod trunk push after_success: ./deploy publish-release