-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
44 lines (44 loc) · 1.88 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
matrix:
include:
- os: linux
dist: trusty
- os: osx
osx_image: xcode9.3
language: csharp
mono: latest
dotnet: 2.1.105
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - ; curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list ; sudo apt-get update -q ; sudo apt-get install -y powershell ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install dotnet-sdk-2.1.300-preview2-008533 ; fi
script:
- unset DOTNET_CLI_TELEMETRY_OPTOUT
- VER=$(cat Revision.targets | egrep -o '[0-9]+')
- if [ "$TRAVIS_BRANCH" != "master" ]; then echo "<Project><PropertyGroup><Rev>$VER-$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER</Rev></PropertyGroup></Project>" > Revision.targets; fi
- dotnet build -c Release Tensor/Tensor.sln
- dotnet test -c Release Tensor/Tensor.Test/Tensor.Test.fsproj
- dotnet run -c Release -p Tensor/Tensor.Sample/Tensor.Sample.Internal.fsproj
- dotnet pack -c Release Tensor/Tensor.sln
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pwsh Tensor/Tensor.Docs/Build.ps1 ; fi
after_success:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then git clone https://github.com/DeepMLNet/webpage.git; rm -rf webpage/.git webpage/Tensor webpage/CNAME; cp -av Tensor/Tensor.Docs/_site/ webpage/Tensor; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash deploy.sh ; fi
deploy:
- provider: pages
local-dir: webpage
repo: DeepMLNet/webpage
fqdn: www.deepml.net
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: master
condition: $TRAVIS_OS_NAME = linux
- provider: pages
local-dir: webpage
repo: DeepMLNet/webpage-dev
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: develop
condition: $TRAVIS_OS_NAME = linux