2020-06-12 16:14:34 -07:00
|
|
|
osx_image: xcode11.5
|
2019-01-03 01:39:35 -08:00
|
|
|
language: swift
|
|
|
|
cache:
|
2019-11-03 09:07:45 -08:00
|
|
|
bundler: true
|
|
|
|
cocoapods: true
|
2019-01-03 01:39:35 -08:00
|
|
|
directories:
|
|
|
|
- Carthage
|
2020-06-12 16:14:34 -07:00
|
|
|
# env:
|
|
|
|
# secure: ink5jhbtR9aGbiVzcrPP+jBLtYKmZ61uxmXmqwqsyAZip2zbL/tktXdLaeNhUnlJHazZF156rOFe5DFSElFmNYvpSZrXJCVMxwWKB+MJWQ879LUk6W4W65jTvkXKZmMrrUqwkOTNNMq0ycfs5tx+eFJBzHd3Z93OX0oKwb44ZjC1NC05LGJfOlZQs+7IWYKXu0XKpZ/Zo+n4jGxMPEaQCMifz8ac8WVAgsgXs5R3ANrAd6AtBHZqNLu+NzGi5FQ2u7M1EERWo69qAmmHQYKB9aYyERi4cU6KD3XF8B89szR3pH41avfYFs+ZqenF7yAm0dN5UoLBqHA5s+yBQ1kzZbvcCunEU88XjgeRuzwTUfyTq8RIN+BNzaAwSCgu/fNMaFLOZjYAXK+gtVm2elx69maC6N+hKpZblmgUtmaOQyXzY3pVNXdqCqqqzIrqSyvqPuuNSzLxjVFJUW8ycYEfB4Iywcwl74IlxWJ58WpeCgMW3cVE4l4kxw+ZWoVniumpVlp69QtgwHloUosOzmzoIwLjgEm6uGZvr3DIKKXwLZACtq8Oj7uhm8iNV4sU5eS0w+b+VC6gYCxI4yOZHWhwtBG4QtrKlEvXC0Gjy4rIXN0JuKiAHLZKiCr0YuCmks2xXv2INNnJAIBVlJ7URVY4OSY+eqCiWUSobO8n48Zu7gk=
|
2019-01-03 01:39:35 -08:00
|
|
|
before_install:
|
|
|
|
- brew update
|
2019-11-03 09:07:45 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: Build - CocoaPods
|
2019-11-03 17:30:16 -08:00
|
|
|
install:
|
2019-11-03 09:07:45 -08:00
|
|
|
- brew outdated cocoapods || brew upgrade cocoapods
|
2019-11-03 17:30:16 -08:00
|
|
|
script:
|
2020-04-17 08:05:37 -07:00
|
|
|
- pod lib lint --verbose --allow-warnings --platforms=ios
|
2019-11-03 09:07:45 -08:00
|
|
|
- stage: Build - Carthage And Code Coverage
|
2019-11-03 17:30:16 -08:00
|
|
|
install:
|
2019-11-03 09:07:45 -08:00
|
|
|
- brew outdated carthage || brew upgrade carthage
|
|
|
|
- brew install xcodegen
|
|
|
|
- gem install slather
|
2019-11-03 17:30:16 -08:00
|
|
|
script:
|
|
|
|
# Carthage requires that XCode project files are checked in. Project.yml is
|
|
|
|
# the canonical definition for the .xcodeproj file. Remove the .xcodeproj file
|
|
|
|
# and regenerate it.
|
|
|
|
# See: https://github.com/Carthage/Carthage/issues/2684
|
2020-06-12 16:14:34 -07:00
|
|
|
- rm -rf MnemonicSwift.xcodeproj
|
2019-11-03 09:07:45 -08:00
|
|
|
- xcodegen generate
|
2019-11-03 17:30:16 -08:00
|
|
|
|
|
|
|
# Build with Carthage
|
2019-11-26 00:20:33 -08:00
|
|
|
- travis_wait 500 carthage bootstrap --platform iOS,mac --no-use-binaries --verbose
|
2020-06-13 14:23:54 -07:00
|
|
|
- set -o pipefail && xcodebuild test -scheme MnemonicSwift_iOS -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.5' ONLY_ACTIVE_ARCH=YES | xcpretty
|
2020-06-12 16:14:34 -07:00
|
|
|
- set -o pipefail && xcodebuild test -scheme MnemonicSwift_macOS -destination 'platform=macOS,arch=x86_64' ONLY_ACTIVE_ARCH=YES | xcpretty
|
2019-11-03 17:30:16 -08:00
|
|
|
|
|
|
|
# Generate and Upload Code Coverage
|
2019-11-03 09:07:45 -08:00
|
|
|
- slather
|
2020-06-12 16:14:34 -07:00
|
|
|
# - bash <(curl -s https://codecov.io/bash)
|
2019-11-03 17:30:16 -08:00
|
|
|
|
2019-11-03 11:19:47 -08:00
|
|
|
- stage: Release - If Tagged Commit
|
2019-11-03 09:07:45 -08:00
|
|
|
script:
|
2019-11-03 11:19:47 -08:00
|
|
|
- echo "Checking for release tag"
|
2019-11-03 09:07:45 -08:00
|
|
|
before_deploy:
|
2019-11-03 17:30:16 -08:00
|
|
|
- echo "Found tagged release"
|
|
|
|
|
|
|
|
- echo "Deploying CocoaPods"
|
|
|
|
- brew outdated cocoapods || brew upgrade cocoapods
|
2019-11-03 17:52:39 -08:00
|
|
|
- travis_wait 500 pod trunk push --skip-import-validation --skip-tests --allow-warnings
|