84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
# 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.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-DEVELOPMENT-SNAPSHOT-2019-01-22-a'
|
||
name: Linux / Swift 5.0.0-dev+2019-01-22
|
||
|
||
- stage: pretest
|
||
name: Check Linux tests are sync’d
|
||
install: swift test --generate-linuxmain
|
||
script: git diff --exit-code
|
||
|
||
- stage: deploy
|
||
name: Jazzy
|
||
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
|
||
before_script: .github/deploy generate-podspec
|
||
script: pod trunk push
|
||
after_success: .github/deploy publish-release
|