on f80809a help sign in
Idris-dev/azure-pipelines.yml
143 lines 5.0 kB history raw
1# Starter pipeline
2# Start with a minimal pipeline that you can customize to build and deploy your code.
3# Add steps that build, run tests, deploy, and more:
4# https://aka.ms/yaml
5jobs:
6 # Test a configuration with the oldest supported GHC
7 - job: Linux_GHC_710
8 pool:
9 vmImage: 'Ubuntu 16.04'
10 steps:
11 - script: |
12 sudo add-apt-repository ppa:hvr/ghc
13 sudo apt-get update
14 sudo apt-get install ghc-7.10.3 cabal-install-2.2
15 sudo update-alternatives --config opt-ghc
16 sudo update-alternatives --config opt-cabal
17 displayName: 'Prepare system'
18 - script: |
19 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
20 cabal update
21 CABALFLAGS="-fffi -fci" make
22 displayName: 'Build Idris'
23 - script: |
24 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
25 make test_c
26 displayName: 'Run tests'
27 # Test on Linux
28 - job: Linux
29 pool:
30 vmImage: 'Ubuntu 16.04'
31 steps:
32 - script: |
33 sudo add-apt-repository ppa:hvr/ghc
34 sudo apt-get update
35 sudo apt-get install ghc-8.2.2 cabal-install-2.2
36 sudo update-alternatives --config opt-ghc
37 sudo update-alternatives --config opt-cabal
38 displayName: 'Prepare system'
39 - script: |
40 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
41 cabal update
42 CABALFLAGS="-fffi -fci" make
43 displayName: 'Build Idris'
44 - script: |
45 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
46 make test_c
47 displayName: 'Run tests'
48 # Test on MacOS
49 - job: macOS
50 pool:
51 vmImage: 'xcode9-macos10.13'
52 steps:
53 - script: |
54 brew install ghc cabal-install libffi pkgconfig
55 export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
56 export PATH=$HOME/.cabal/bin:$PATH
57 cabal update
58 CABALFLAGS="-fffi -fci" make
59 make test_c
60 displayName: 'Build idris and run tests'
61 # Test on Windows
62 - job: Windows
63 pool:
64 vmImage: 'vs2017-win2016'
65 steps:
66 - powershell: |
67 choco install cabal -y --no-progress
68 choco install 7zip.portable -y --no-progress
69 choco install msys2 -y --no-progress --params "/InstallDir=C:/msys64/"
70 mkdir C:\ghc
71 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"
72 7z x C:\ghc\ghc.tar.xz -oC:\ghc
73 7z x C:\ghc\ghc.tar -oC:\ghc
74 displayName: "Setting up environment"
75 - powershell: |
76 cabal update
77 $env:PATH="$env:PATH;$HOME\AppData\Roaming\cabal\bin;c:\ghc\ghc-8.4.3\bin"
78 $env:current_posix=c:\msys64\usr\bin\cygpath -u $(pwd)
79 c:\msys64\usr\bin\bash -l -c "echo `$MSYSTEM && echo `$PATH"
80 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"
81 c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && cabal install -fffi --enable-test 2>&1"
82 c:\msys64\usr\bin\bash -l -c "cd $env:current_posix && make test_c 2>&1"
83 env:
84 MSYSTEM: MINGW64
85 MSYS2_PATH_TYPE: inherit
86 displayName: "Build and test Idris"
87 # Check styling
88 - job: Stylize
89 pool:
90 vmImage: 'Ubuntu 16.04'
91 steps:
92 - script: |
93 sudo add-apt-repository ppa:hvr/ghc
94 sudo apt-get update
95 sudo apt-get install ghc-8.2.2 cabal-install-2.2
96 sudo update-alternatives --config opt-ghc
97 sudo update-alternatives --config opt-cabal
98 displayName: 'Prepare system'
99 - script: |
100 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
101 cabal update
102 cabal install stylish-haskell
103 ./stylize.sh
104 displayName: 'Run stylish'
105 # Run tests on the node backend
106 - job: JS
107 pool:
108 vmImage: 'Ubuntu 16.04'
109 steps:
110 - script: |
111 sudo add-apt-repository ppa:hvr/ghc
112 sudo apt-get update
113 sudo apt-get install ghc-8.2.2 cabal-install-2.2
114 sudo update-alternatives --config opt-ghc
115 sudo update-alternatives --config opt-cabal
116 displayName: 'Prepare system'
117 - script: |
118 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
119 cabal update
120 CABALFLAGS="-fffi -fci" make
121 displayName: 'Build Idris'
122 - script: |
123 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
124 make test_js
125 displayName: 'Run tests'
126 # Build docs
127 - job: Docs
128 pool:
129 vmImage: 'Ubuntu 16.04'
130 steps:
131 - script: |
132 sudo add-apt-repository ppa:hvr/ghc
133 sudo apt-get update
134 sudo apt-get install ghc-8.2.2 cabal-install-2.2
135 sudo update-alternatives --config opt-ghc
136 sudo update-alternatives --config opt-cabal
137 displayName: 'Prepare system'
138 - script: |
139 export PATH=/opt/ghc/bin:$HOME/.cabal/bin:$PATH
140 cabal update
141 CABALFLAGS="-fffi -fci" make
142 make lib_doc doc
143 displayName: 'Build Docs'