Skip to content

Commit 06829e8

Browse files
Set up CI with Azure Pipelines
[skip ci]
1 parent a873d36 commit 06829e8

File tree

1 file changed

+159
-0
lines changed

1 file changed

+159
-0
lines changed

azure-pipelines.yml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- master
6+
- staging
7+
- trying
8+
9+
jobs:
10+
- job: Linux
11+
12+
timeoutInMinutes: 0
13+
14+
pool:
15+
vmImage: 'ubuntu-16.04'
16+
17+
strategy:
18+
matrix:
19+
Julia 1.2:
20+
JULIA_VERSION: '1.2'
21+
Julia 1.3:
22+
JULIA_VERSION: '1.3'
23+
24+
steps:
25+
- bash: |
26+
set -o xtrace
27+
wget -nv https://julialang-s3.julialang.org/bin/linux/x64/$(JULIA_VERSION)/julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz
28+
mkdir julia-$(JULIA_VERSION)
29+
tar zxf julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz -C julia-$(JULIA_VERSION) --strip-components 1
30+
displayName: 'Download and extract Julia'
31+
- bash: |
32+
set -o xtrace
33+
sudo apt-get update
34+
displayName: 'Install dependencies'
35+
- bash: |
36+
set -o xtrace
37+
./julia-$(JULIA_VERSION)/bin/julia -e 'using InteractiveUtils; versioninfo()'
38+
./julia-$(JULIA_VERSION)/bin/julia --project=@. -e 'using Pkg; Pkg.instantiate()'
39+
./julia-$(JULIA_VERSION)/bin/julia --project=@. -e 'using Pkg; Pkg.test(coverage=true)'
40+
displayName: 'Run the tests'
41+
- bash: |
42+
./julia-$(JULIA_VERSION)/bin/julia --project=.coverage -e 'using Pkg; Pkg.instantiate();
43+
Pkg.add("Coverage");
44+
using Coverage;
45+
Codecov.submit_local(Codecov.process_folder();
46+
service = "azure_pipelines",
47+
commit = @show(ENV["BUILD_SOURCEVERSION"]),
48+
pull_request = @show(get(ENV, "SYSTEM_PULLREQUEST_PULLREQUESTNUMBER", "false")),
49+
job = @show(ENV["BUILD_DEFINITIONNAME"]),
50+
slug = @show(ENV["BUILD_REPOSITORY_NAME"]),
51+
build = @show(ENV["BUILD_BUILDID"]))'
52+
env:
53+
CODECOV_TOKEN: "f995e5d9-25fb-42df-99c5-5b690294a298"
54+
displayName: 'Submit code coverage'
55+
56+
- job: macOS
57+
58+
timeoutInMinutes: 0
59+
60+
pool:
61+
vmImage: 'macOS-10.14'
62+
63+
strategy:
64+
matrix:
65+
Julia 1.2:
66+
JULIA_VERSION: '1.2'
67+
Julia 1.3:
68+
JULIA_VERSION: '1.3'
69+
70+
steps:
71+
- bash: |
72+
set -o xtrace
73+
wget -nv https://julialang-s3.julialang.org/bin/mac/x64/$(JULIA_VERSION)/julia-$(JULIA_VERSION)-latest-mac64.dmg
74+
mkdir juliamnt
75+
hdiutil mount -readonly -mountpoint juliamnt julia-$(JULIA_VERSION)-latest-mac64.dmg
76+
cp -a juliamnt/*.app/Contents/Resources/julia julia-$(JULIA_VERSION)
77+
displayName: 'Download and extract Julia'
78+
- bash: |
79+
set -o xtrace
80+
brew update
81+
brew upgrade
82+
displayName: 'Install dependencies'
83+
- bash: |
84+
set -o xtrace
85+
./julia-$(JULIA_VERSION)/bin/julia -e 'using InteractiveUtils; versioninfo()'
86+
./julia-$(JULIA_VERSION)/bin/julia --project=@. -e 'using Pkg; Pkg.instantiate()'
87+
./julia-$(JULIA_VERSION)/bin/julia --project=@. -e 'using Pkg; Pkg.test()'
88+
displayName: 'Run the tests'
89+
90+
91+
- job: Windows
92+
93+
timeoutInMinutes: 0
94+
95+
pool:
96+
vmImage: 'VS2017-Win2016'
97+
98+
strategy:
99+
matrix:
100+
Julia 1.2:
101+
JULIA_VERSION: '1.2'
102+
Julia 1.3:
103+
JULIA_VERSION: '1.3'
104+
105+
steps:
106+
- powershell: |
107+
Set-PSDebug -Trace 1
108+
wget https://julialang-s3.julialang.org/bin/winnt/x64/$(JULIA_VERSION)/julia-$(JULIA_VERSION)-latest-win64.exe -OutFile julia-$(JULIA_VERSION)-latest-win64.exe
109+
Start-Process -FilePath .\julia-$(JULIA_VERSION)-latest-win64.exe -ArgumentList "/S /D=C:\julia-$(JULIA_VERSION)" -NoNewWindow -Wait
110+
displayName: 'Download and extract Julia'
111+
- powershell: |
112+
Set-PSDebug -Trace 1
113+
displayName: 'Install dependencies'
114+
- powershell: |
115+
Set-PSDebug -Trace 1
116+
C:\julia-$(JULIA_VERSION)\bin\julia.exe -e 'using InteractiveUtils; versioninfo()'
117+
C:\julia-$(JULIA_VERSION)\bin\julia.exe --project=@. -e 'using Pkg; Pkg.instantiate()'
118+
C:\julia-$(JULIA_VERSION)\bin\julia.exe --project=@. -e 'using Pkg; Pkg.test()'
119+
displayName: 'Run the tests'
120+
121+
- job: Documentation
122+
123+
pool:
124+
vmImage: 'ubuntu-16.04'
125+
126+
strategy:
127+
matrix:
128+
Julia 1.3:
129+
JULIA_VERSION: '1.3'
130+
131+
steps:
132+
- bash: |
133+
set -o xtrace
134+
wget -nv https://julialang-s3.julialang.org/bin/linux/x64/$(JULIA_VERSION)/julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz
135+
mkdir julia-$(JULIA_VERSION)
136+
tar zxf julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz -C julia-$(JULIA_VERSION) --strip-components 1
137+
displayName: 'Download and extract Julia'
138+
- bash: |
139+
set -o xtrace
140+
sudo apt-get update
141+
displayName: 'Install dependencies'
142+
- bash: |
143+
set -o xtrace
144+
export TRAVIS_REPO_SLUG="$BUILD_REPOSITORY_NAME"
145+
export TRAVIS_PULL_REQUEST="${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false}"
146+
if [[ $BUILD_SOURCEBRANCH == refs/tags/* ]]; then
147+
export TRAVIS_TAG="${BUILD_SOURCEBRANCH:10}"
148+
fi
149+
if [[ $BUILD_SOURCEBRANCH == refs/heads/* ]]; then
150+
export TRAVIS_BRANCH="${BUILD_SOURCEBRANCH:11}"
151+
fi
152+
./julia-$(JULIA_VERSION)/bin/julia -e 'using InteractiveUtils; versioninfo()'
153+
./julia-$(JULIA_VERSION)/bin/julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
154+
Pkg.develop(PackageSpec(path=pwd()));
155+
Pkg.build()'
156+
./julia-$(JULIA_VERSION)/bin/julia --project=docs/ docs/make.jl
157+
env:
158+
DOCUMENTER_KEY: $(documenter_key)
159+
displayName: 'Build and deploy docs'

0 commit comments

Comments
 (0)