# only run for: merge commits, releases and pull-requests if: type != push OR branch = master OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/ stages: - 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: - script: swift test name: macOS - &xcodebuild before_install: swift package generate-xcodeproj xcode_destination: platform=iOS Simulator,OS=latest,name=iPhone XS name: iOS - <<: *xcodebuild xcode_destination: platform=tvOS Simulator,OS=latest,name=Apple TV name: tvOS - <<: *xcodebuild name: watchOS 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 - env: SWIFT_VERSION=4.2.1 os: linux name: Linux language: generic dist: trusty sudo: false install: eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: swift test - <<: *xcodebuild stage: deploy name: Jazzy before_install: | cat << EOF > .jazzy.yml custom_categories: - name: Path children: - Path - /(_:_:) EOF touch Contents.md install: gem install jazzy script: | jazzy \ --no-hide-documentation-coverage \ --theme fullwidth \ --output output \ --readme Contents.md \ --root-url https://mxcl.github.io/Path.swift/ \ --github_url https://github.com/mxcl/Path.swift \ --module Path \ --module-version $TRAVIS_TAG deploy: provider: pages skip-cleanup: true github-token: $GITHUB_TOKEN local-dir: output on: tags: true - stage: deploy name: CocoaPods install: gem install cocoapods --pre script: pod trunk push --allow-warnings