forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (127 loc) · 5.06 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
language: csharp
sudo: required
dist: xenial
env:
global:
- secure: m2PtYwYOhaK0uFMZ19ZxApZwWZeAIq1dS//jx/5I3txpIWD+TfycQMAWYxycFJ/GJkeVF29P4Zz1uyS2XKKjPJpp2Pds98FNQyDv3OftpLAVa0drsjfhurVlBmSdrV7GH6ncKfvhd+h7KVK5vbZc+NeR4dH7eNvN/jraS//AMJg=
- secure: EA2fP5ymar2/ZM2G4cyP3FzK437zv1wP03AgUPCcQgke8Z5oG8Y5U632AzxBeeaqGAxHEi5Ewbq2A8N93pN+xAsoGlQf+AdLJROCeo7gy9O589Z8tmp/vAdMzZzyNhKi7SUSxOJ/TIDzLMlvBHZwj1XqFyCbOGABzkxl9sW4+uk=
- secure: UYglcVukRlhS09V7MXwMQ5pU6gZZZ+bsaKnCSlPV+CQyh+ExabEYYmF7NBJirF/RDK30tbuI6mlSYagjX18PpLZ3390WI3WkKRbP0F1SfylHKlMh5MDcKNTsSwYMcQ0BX7teg7kpYmxbigP7jing8LPehP/QdQAhnkhpdXe1P/o=
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
- DOTNET_CLI_TELEMETRY_OPTOUT=true
- DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
mono: latest
os:
- linux
- osx
osx_image: xcode9.4
script:
- git fetch --unshallow
- git fetch origin '+refs/heads/*:refs/heads/*'
- git branch -r
- chmod 755 ./build.sh
- "./build.sh --configuration Release --verbosity Verbose --target All --publish-all --archive"
addons:
apt:
packages:
- gettext
- libcurl4-openssl-dev
- libicu-dev
- libssl-dev
- libunwind8
- zlib1g
- curl
- python3
- openssl
install:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
# On Linux, we build libuv from source
sudo apt-get install make automake libtool
curl -sSL https://github.com/libuv/libuv/archive/v1.14.0.tar.gz | sudo tar zxf - -C /usr/local/src
pushd /usr/local/src/libuv-1.14.0
sudo sh autogen.sh
sudo ./configure
sudo make
sudo make install
popd
sudo rm -rf /usr/local/src/libuv-1.14.0
sudo ldconfig
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
# On OSX, we install libuv via Homebrew
brew update
brew install libuv
fi
- export PATH="$PWD/.dotnet:$PATH"
# after_success: |
# if [[ "$TRAVIS_OS_NAME" == "linux" && $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
# AZ_REPO=$(lsb_release -cs)
# echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
# sudo tee /etc/apt/sources.list.d/azure-cli.list
# curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# sudo apt-get install apt-transport-https
# sudo apt-get update && sudo apt-get install azure-cli
# # Only update "latest" version if we have all of the builds
# #deploymentDir="artifacts/deployment"
# #if [ -e $deploymentDir/"omnisharp-osx.zip" ] && \
# # [ -e $deploymentDir/"omnisharp-linux-x86.zip" ] && \
# # [ -e $deploymentDir/"omnisharp-linux-x64.zip" ]; then
# az storage blob upload-batch --destination "releases" --source artifacts/deployment --account-name roslynomnisharp --account-key $BLOB_KEY
# #fi
# fi
notifications:
slack:
rooms:
- omnisharp:U358j4McaEOIzFqXvGexVokC#integrations
on_success: change
on_failure: always
on_pull_requests: false
before_deploy:
- |
# Only deploy OSX-specific OmniSharp from the OSX.
# All other builds should be deployed by Linux CI.
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
rm -f artifacts/package/omnisharp-osx.tar.gz
rm -f artifacts/package/omnisharp-osx.zip
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
rm -f artifacts/package/mono.tar.gz
rm -f artifacts/package/mono.zip
rm -f artifacts/package/omnisharp-linux-x86.tar.gz
rm -f artifacts/package/omnisharp-linux-x64.tar.gz
rm -f artifacts/package/omnisharp-linux-x86.zip
rm -f artifacts/package/omnisharp-linux-x64.zip
fi
deploy:
provider: releases
api_key:
secure: EsRemh0XwJc3jhIjaxSuAhcm0AGjFwa3HO6oWzJOoupX0l+HV5CxrJqui//sqJ/jK4nnwNcTfMyMFTAz2t6nWCmuwuezTncty/uNTXE0Whe+3WWc/BakfEdBrCfnRhGhwQ5EW2Y6BasuF0f/hpjnucqpNxcKmKOZvThzv93bmSA=
file_glob: true
file:
- artifacts/package/*.tar.gz
- artifacts/package/*.zip
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 "omnisharp-bot@users.noreply.github.com"
git clone git@github.com: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