forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathappveyor.yml
More file actions
237 lines (189 loc) · 7.58 KB
/
Copy pathappveyor.yml
File metadata and controls
237 lines (189 loc) · 7.58 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# Specify the build version format:
version: '{build}'
environment:
global:
APPVEYOR_BUILD_SYS: MSYS2
# Executables from within Windows:
WIN_SHELL: C:\msys64\usr\bin\bash
WIN_MAKE: C:\msys64\usr\bin\make
WIN_SETUP: C:\msys64\usr\bin\bash
WIN_GCC: C:\msys64\mingw64\bin\gcc
WIN_GXX: C:\msys64\mingw64\bin\g++
WIN_GFORTRAN: C:\msys64\mingw64\bin\gfortran
# Executables from within MSYS2:
SHELL: /usr/bin/bash
MAKE: /usr/bin/make
SETUP: /usr/bin/bash
# Compilers:
CC: /c/msys64/mingw64/bin/gcc
C_COMPILER: /c/msys64/mingw64/bin/gcc
CXX: /c/msys64/mingw64/bin/g++
CXX_COMPILER: /c/msys64/mingw64/bin/g++
FC: /c/msys64/mingw64/bin/gfortran
FORTRAN_COMPILER: /c/msys64/mingw64/bin/gfortran
# Linkers:
LINKER: /c/msys64/mingw64/bin/g++
matrix:
# Unit tests:
- nodejs_version: '7'
npm_version: '>2.7.0'
BUILD_TASK: 'test'
- nodejs_version: '6'
npm_version: '>2.7.0'
BUILD_TASK: 'test'
- nodejs_version: '5'
npm_version: '>2.7.0'
BUILD_TASK: 'test'
- nodejs_version: '4'
npm_version: '>2.7.0'
BUILD_TASK: 'test'
- nodejs_version: '0.12'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'test'
- nodejs_version: '0.10'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'test'
# Benchmarks:
- nodejs_version: '7'
npm_version: '>2.7.0'
BUILD_TASK: 'benchmark'
- nodejs_version: '6'
npm_version: '>2.7.0'
BUILD_TASK: 'benchmark'
- nodejs_version: '5'
npm_version: '>2.7.0'
BUILD_TASK: 'benchmark'
- nodejs_version: '4'
npm_version: '>2.7.0'
BUILD_TASK: 'benchmark'
- nodejs_version: '0.12'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'benchmark'
- nodejs_version: '0.10'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'benchmark'
# Examples:
- nodejs_version: '7'
npm_version: '>2.7.0'
BUILD_TASK: 'examples'
- nodejs_version: '6'
npm_version: '>2.7.0'
BUILD_TASK: 'examples'
- nodejs_version: '5'
npm_version: '>2.7.0'
BUILD_TASK: 'examples'
- nodejs_version: '4'
npm_version: '>2.7.0'
BUILD_TASK: 'examples'
- nodejs_version: '0.12'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'examples'
- nodejs_version: '0.10'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'examples'
# Test coverage:
- nodejs_version: '7'
npm_version: '>2.7.0'
BUILD_TASK: 'test-coverage'
- nodejs_version: '6'
npm_version: '>2.7.0'
BUILD_TASK: 'test-coverage'
- nodejs_version: '5'
npm_version: '>2.7.0'
BUILD_TASK: 'test-coverage'
- nodejs_version: '4'
npm_version: '>2.7.0'
BUILD_TASK: 'test-coverage'
- nodejs_version: '0.12'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'test-coverage'
- nodejs_version: '0.10'
npm_version: '>2.7.0 <4.0.0'
BUILD_TASK: 'test-coverage'
platform:
- x64
matrix:
# Flag to immediately finish a build if any one of the jobs fails:
fast_finish: true
# Define build artifacts. To download build artifacts for any build, use the following URL template:
#
# https://ci.appveyor.com/api/projects/<account>/<project>/artifacts/<artifact_file_path>?all=<boolean>&job=<job>&branch=<branch>
artifacts:
# Push entire `log` directory:
- path: var\log
name: logs
type: zip
# Clone directory:
clone_folder: c:\projects\stdlib
# Set the clone depth:
clone_depth: 100
# Script commands are run either via [batch][1] (`cmd:`; default) or [PowerShell][2] (`ps:`) script engines.
#
# [1]: https://en.wikipedia.org/wiki/Batch_file
# [2]: https://en.wikipedia.org/wiki/Windows_PowerShell
# Scripts run before repo cloning...
init:
# Instruct `git` to convert CRLF line endings (Windows) to LF on commit.
#
# [1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Formatting-and-Whitespace
- cmd: git config --global core.autocrlf input
install:
# Remove [MinGW][1], a minimalist GNU for Windows, from the path. This version is old and no longer maintained. To generate builds with modern tool chains, need to use an alternative.
#
# [1]: http://www.mingw.org/
- cmd: set PATH=%PATH:C:\MinGW\bin;=%
# In order to run `make` commands and perform compilation steps, we can use [MSYS2][1], an independent rewrite of [MSYS][2] based on modern Cygwin (POSIX compatibility layer) and [MinGW-w64][3], by adding the application folder to the `PATH` variable.
#
# [1]: https://msys2.github.io/
# [2]: http://www.mingw.org/wiki/MSYS
# [3]: https://mingw-w64.org/doku.php
- cmd: set PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%PATH%
# Install updated browsers for browser testing:
# TODO: address 32-bit vs 64-bit installs
# - cmd: choco upgrade firefox
# - cmd: choco upgrade googlechrome
# Install Windows build tools for compiling native Node modules. Note: requires Node v4+.
#
# [1]: https://github.com/felixrieseberg/windows-build-tools
# [2]: https://github.com/nodejs/node-gyp#installation
- cmd: npm install --global --production windows-build-tools
# Switch to the desired Node version:
- ps: Install-Product node $env:nodejs_version $env:platform
# Set the NODE_PATH environment variable (use POSIX path convention):
- cmd: set NODE_PATH=/c/projects/stdlib/lib/node_modules
- cmd: echo %NODE_PATH%
# Update the npm client. Older clients cannot handle scoped modules and, on Windows, are subject to race conditions (see https://github.com/appveyor/ci/issues/102 and https://www.appveyor.com/docs/lang/nodejs-iojs/#locking-errors-eperm-eexist-tgzlock ).
- cmd: npm install -g npm@"%npm_version%"
- cmd: set PATH=%APPDATA%\npm;%PATH%
# Print debug info:
- cmd: '%WIN_GCC% --version'
- cmd: '%WIN_GXX% --version'
- cmd: '%WIN_GFORTRAN% --version'
- cmd: git --version
- cmd: node --version
- cmd: npm --version
- cmd: npm config get registry
# Update configuration for compiling native add-ons:
- cmd: set PYTHON=%USERPROFILE%\.windows-build-tools\python27
- cmd: set PATH=%PATH:C:\Python27;=%
- cmd: set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- cmd: npm config set python "%PYTHON%"
- cmd: npm config set msvs_version 2015
- cmd: echo %PATH%
# Perform installation tasks:
- cmd: '%WIN_MAKE% FC=%FC% FORTRAN_COMPILER=%FORTRAN_COMPILER% NODE_GYP_FLAGS="--python %PYTHON% --msvs_version=2015" install'
build_script:
# If a newer build is queued for the same PR, cancel the current build:
- ps: 'if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `throw "Canceling the current build as newer builds are queued for this pull request." }'
test_script:
# Node.js does not support Cygwin (used by MSYS2). Cygwin provides a terminal emulator which is not compatible with Node. For example, when Node.js scripts attempt to read from `stdin`, Node is unable to determine if running in a TTY due to Cygwin's use of pipes.
#
# [1]: https://github.com/nodejs/node/issues/3006
- cmd: 'C:\MinGW\msys\1.0\bin\sh --login -i -c " /c/projects/stdlib/tools/ci/appveyor/script $BUILD_TASK"'
# Scripts run after a build success or failure:
on_finish:
- cmd: '%WIN_SHELL% --login -i -c " /c/projects/stdlib/tools/ci/appveyor/on_finish"'
notifications:
- provider: Slack
incoming_webhook:
secure: wn39IgZGtIMkvmXPpo+Slm6QlfpxbARQOw98Xuifd2JtNpLKHms5w1Jvm1QIK0D1Ipg7NLgxbQDt0pKQt4nEpWy6TM30rZUX4tUtYJg0Kmo=