# 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: - 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 - stage: pretest name: Check if Linux tests are up-to-date install: swift test --generate-linuxmain script: git diff --exit-code - stage: deploy name: Jazzy before_install: | cat << EOF > .jazzy.yaml module: Path module_version: $TRAVIS_TAG custom_categories: - name: Path children: - Path - /(_:_:) xcodebuild_arguments: - UseModernBuildSystem=NO output: output github_url: https://github.com/mxcl/Path.swift EOF install: | gem install jazzy swift package generate-xcodeproj script: | jazzy rm -rf output/docsets deploy: provider: pages skip-cleanup: true github-token: $GITHUB_TOKEN local-dir: output on: tags: true - name: CocoaPods before_install: | cat << EOF > Path.swift.podspec Pod::Spec.new do |s| s.name = 'Path.swift' s.version = '$TRAVIS_TAG' s.summary = 'Delightful, robust file-pathing functions' s.homepage = 'https://github.com/mxcl/Path.swift' s.license = { :type => 'Unlicense', :file => 'LICENSE.md' } s.author = { 'mxcl' => 'mxcl@me.com' } s.source = { :git => 'https://github.com/mxcl/Path.swift.git', :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/mxcl' s.osx.deployment_target = '10.10' s.ios.deployment_target = '8.0' s.tvos.deployment_target = '10.0' s.watchos.deployment_target = '3.0' s.source_files = 'Sources/*' s.swift_version = "4.2" end EOF install: gem install cocoapods --pre script: pod trunk push --allow-warnings