-
Notifications
You must be signed in to change notification settings - Fork 644
/
azure-pipelines.yml
143 lines (143 loc) · 4.88 KB
/
azure-pipelines.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
131
132
133
134
135
136
137
138
139
140
141
142
143
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
jobs:
# Test a configuration with the oldest supported GHC
- job: Linux_GHC_710
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-7.10.3 cabal-install-2.2
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
displayName: 'Prepare system'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
cabal update
CABALFLAGS="-fffi -fci" make
displayName: 'Build Idris'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
make test_c
displayName: 'Run tests'
# Test on Linux
- job: Linux
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-8.2.2 cabal-install-2.2
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
displayName: 'Prepare system'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
cabal update
CABALFLAGS="-fffi -fci" make
displayName: 'Build Idris'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
make test_c
displayName: 'Run tests'
# Test on MacOS
- job: macOS
pool:
vmImage: 'xcode9-macos10.13'
steps:
- script: |
brew install ghc cabal-install libffi pkgconfig
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
export PATH=$HOME/.cabal/bin:$PATH
cabal update
CABALFLAGS="-fffi -fci" make
make test_c
displayName: 'Build idris and run tests'
# Test on Windows
- job: Windows
pool:
vmImage: 'vs2017-win2016'
steps:
- powershell: |
choco install cabal -y --no-progress
choco install 7zip.portable -y --no-progress
choco install msys2 -y --no-progress --params "/InstallDir=C:/msys64/"
mkdir C:\ghc
Invoke-WebRequest "https://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-x86_64-unknown-mingw32.tar.xz" -OutFile C:\ghc\ghc.tar.xz -UserAgent "Curl"
7z x C:\ghc\ghc.tar.xz -oC:\ghc
7z x C:\ghc\ghc.tar -oC:\ghc
displayName: "Setting up environment"
- powershell: |
cabal update
$env:PATH="$env:PATH;$HOME\AppData\Roaming\cabal\bin;c:\ghc\ghc-8.4.3\bin"
$env:current_posix=c:\msys64\usr\bin\cygpath -u $(pwd)
c:\msys64\usr\bin\bash -l -c "echo `$MSYSTEM && echo `$PATH"
c:\msys64\usr\bin\bash -l -c "pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-libffi --noconfirm 2>&1"
c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && cabal install -fffi --enable-test 2>&1"
c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && make test_c 2>&1"
env:
MSYSTEM: MINGW64
MSYS2_PATH_TYPE: inherit
displayName: "Build and test Idris"
# Check styling
- job: Stylize
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-8.2.2 cabal-install-2.2
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
displayName: 'Prepare system'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
cabal update
cabal install stylish-haskell
./stylize.sh
displayName: 'Run stylish'
# Run tests on the node backend
- job: JS
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-8.2.2 cabal-install-2.2
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
displayName: 'Prepare system'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
cabal update
CABALFLAGS="-fffi -fci" make
displayName: 'Build Idris'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
make test_js
displayName: 'Run tests'
# Build docs
- job: Docs
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-8.2.2 cabal-install-2.2
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
displayName: 'Prepare system'
- script: |
export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
cabal update
CABALFLAGS="-fffi -fci" make
make lib_doc doc
displayName: 'Build Docs'