forked from Provenance-Emu/Provenance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
104 lines (99 loc) · 4 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
language: swift
xcode_workspace: Provenance.xcworkspace # path to your xcodeproj folder
xcode_scheme: Provenance-Release
osx_image: xcode10.2
cache:
bundler: true
directories:
- Carthage
- /Users/travis/Library/Caches/Rome
# - /Users/travis/Library/Developer/Xcode/DerivedData/
git:
depth: 3 # Speed up cloning, don't need many commits
addons:
ssh_known_hosts:
- provenance-emu.com
- bitbucket.org
branches:
only:
- develop
- master
env:
#environment variables
global:
- LANG=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- WORKSPACE_NAME="Provenance.xcworkspace"
#- PROJECT_NAME="Provenance.xcodeproj"
- SCHEME_IOS_APP="Provenance-Release"
- SCHEME_TVOS_APP="ProvenanceTV-Release"
# - IOS_PLATFORM="iOS Simulator"
# - TVOS_PLATFORM="tvOS Simulator"
# - IOS_SDK=iphonesimulator11.4
# - TVOS_SDK=appletvsimulator11.4
- CONFIGURATION="Release"
- AWS_REGION="us-east-1"
- AWS_ENDPOINT="http://provenance-emu.com:9002"
# matrix:
# - DESTINATION="platform=$IOS_PLATFORM,OS=11.3,name=iPhone X" SCHEME="$SCHEME_IOS_APP" SDK="$IOS_SDK"
# - DESTINATION="platform=$TVOS_PLATFORM,OS=11.3,name=Apple TV 4K" SCHEME="$SCHEME_TVOS_APP" SDK="$TVOS_SDK"
before_install:
# - gem install xcpretty -N
- gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet
# - brew update
- brew outdated swiftlint || brew upgrade swiftlint
- brew outdated carthage || brew upgrade carthage
- brew install git-lfs || true
- brew install imagemagick || true
# - brew install hudochenkov/sshpass/sshpass
- brew tap blender/tap https://github.com/blender/homebrew-tap.git || true
- brew install blender/homebrew-tap/rome || true
- bundle install
before_script:
# - set +x
# - git remote set-url origin $REPO.git
# - git config --global user.email "<org@email>"
# - git config --global user.name "<org> (via TravisCI)"
- echo -n $MATCH_SSH_KEY_BASE64 > ~/.ssh/id_rsa_base64
- base64 -D ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
# - eval "$(ssh-agent -s)"
# - sshpass -p $MATCH_SSH_KEY_PASSPHRASE ssh-add ~/.ssh/id_rsa
- ssh-add ~/.ssh/id_rsa
- echo -n $SCP_KEY_ENCODED > ~/.ssh/id_provenance_base64
- base64 -D ~/.ssh/id_provenance_base64 > ~/.ssh/id_provenance
- chmod 600 ~/.ssh/id_provenance
- ssh-add ~/.ssh/id_provenance
#- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo -e "Host bitbucket.org\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo -e "Host provenance-emu.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# bootstrap the dependencies for the project
# Output something every 10 minutes or Travis kills the job
# - while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
# This can take a while so using the above to not make travis abort
# - git lfs pull
- bundle exec fastlane rome_download
# - ./Scripts/rome-download.sh
# - ./Scripts/rome-travis.sh > /tmp/carthage.log
#- carthage bootstrap --no-use-binaries --platform iOS,tvOS --cache-builds --project-directory "./" --configuration $CONFIGURATION > /tmp/carthage.log
# Killing background sleep loop
# - kill %1
after_success:
- bash <(curl -s https://codecov.io/bash)
- ./Scripts/rome-upload.sh
- wget https://raw.githubusercontent.com/JoeMatt/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
#- ./Scripts/travis-upload.bash
# Test code covered, add -enableCodeCoverage YES to xcodebuild
- sleep 5
after_failure:
- tail -100 /tmp/carthage.log
- wget https://raw.githubusercontent.com/JoeMatt/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
script:
- set -o pipefail
- bundle exec fastlane travis_ios
# - swiftlint
# - travis_wait 60 xcodebuild -workspace "$WORKSPACE_NAME" -scheme "$SCHEME" -configuration "$CONFIGURATION" -destination "$DESTINATION" -sdk "$SDK" ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO | xcpretty -f `xcpretty-travis-formatter`