forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
109 lines (99 loc) · 3.81 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
105
106
107
108
109
language: csharp
sudo: required
dist: trusty
env:
global:
secure: m2PtYwYOhaK0uFMZ19ZxApZwWZeAIq1dS//jx/5I3txpIWD+TfycQMAWYxycFJ/GJkeVF29P4Zz1uyS2XKKjPJpp2Pds98FNQyDv3OftpLAVa0drsjfhurVlBmSdrV7GH6ncKfvhd+h7KVK5vbZc+NeR4dH7eNvN/jraS//AMJg=
mono:
- 4.8.0
os:
- linux
- osx
osx_image: xcode7.3
# Ensure MSBuild is installed
before_install:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get -qq update
sudo apt-get install msbuild
fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install jq
brew install openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
brew list
fi
- |
# This is a temporary fix to workaround a problem where Travis picks up a build of Mono on OSX that
# includes a broken version of MSBuild.
#
# See https://github.com/mono/msbuild/commit/cff4013ba3a69f82dc0ae96b3e15af700d8f74ef
# for the fix this is replicating.
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
MSBUILD_BIN=/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0/bin
if [ ! -d $MSBUILD_BIN ] || [ -f $MSBUILD_BIN/System.Reflection.Metadata.dll ]; then
echo "WORKAROUND: Time to remove System.Reflection.Metadata.dll workaround"
else
echo "WORKAROUND: Copying System.Reflection.Metadata.dll to Mono MSBuild"
sudo cp $MSBUILD_BIN/Roslyn/System.Reflection.Metadata.dll $MSBUILD_BIN/System.Reflection.Metadata.dll
fi
fi
- msbuild /version
script:
- travis_retry ./build.sh --target TravisTestAll
- ./build.sh --target Travis --archive
addons:
apt:
packages:
- gettext
- libcurl4-openssl-dev
- libicu-dev
- libssl-dev
- libunwind8
- zlib1g
- curl
notifications:
slack:
rooms:
- omnisharp:U358j4McaEOIzFqXvGexVokC#general
on_success: change
on_failure: always
on_pull_requests: false
deploy:
provider: releases
api_key:
secure: N9hansErZKHl7G5Ed/hcBgwcvLuRjB7YAskAvSAYB+luacV6rSK7Vlm/4NyjaZCwWv5wOdBphle2S4yZLRDTdMwLrdQWwWYeZI60kE22c1amKJaf6j5ai2u/P3bt55klQ2yO2U/LacwHVoRtJlVdwSAXuDQ3zMd88VbBModQyxE=
file_glob: true
file: artifacts/package/*.tar.gz
skip_cleanup: true
on:
repo: OmniSharp/omnisharp-roslyn
tags: true
after_deploy: |
openssl enc -aes-256-cbc -a -salt -in travis_rsa.enc -out ~/.ssh/id_rsa -pass pass:$OPENSSL_PASSKEY -d
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
OMNISHARP_VERSION=${TRAVIS_TAG:1};
fi
BRANCH_NAME="upgrade/omnisharp-roslyn-$TRAVIS_TAG"
git config --global user.name "OmniSharp Bot"
git config --global user.email "[email protected]"
git clone [email protected]:OmniSharp/omnisharp-node-client.git ~/omnisharp-node-client
pushd ~/omnisharp-node-client
git checkout -b $BRANCH_NAME
cat package.json > package2.json
cat package2.json | jq '."omnisharp-roslyn"="'$TRAVIS_TAG'"' > package.json
git add package.json
git commit -m "Update omnisharp-roslyn to $TRAVIS_TAG"
git push origin $BRANCH_NAME
curl -X POST -H 'Authorization: token '$GITHUB_API_TOKEN'' -d '{ "title": "Upgrade to OmniSharp/omnisharp-roslyn '$TRAVIS_TAG'", "body": "*Automated PR* - Upgrade omnisharp-roslyn to '$TRAVIS_TAG'. [release patch]", "head": "'$BRANCH_NAME'", "base": "master" }' https://api.github.com/repos/OmniSharp/omnisharp-node-client/pulls
fi