forked from JCMais/node-libcurl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
68 lines (59 loc) · 2.51 KB
/
appveyor.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
# http://www.appveyor.com/docs/appveyor-yml
# mostly copied from nan appveyor.yml
environment:
DEBUG: "node-libcurl"
NODE_LIBCURL_GITHUB_TOKEN:
secure: o8iCZIMbaOR5HKy9Q/ArQ6N+5LRepyRVYRtLTrxyCo2gCEXUp8xhUYjLMJmZgNu9
matrix:
# node.js
- nodejs_version: 0.10
- nodejs_version: 0.12
# io.js
- nodejs_version: 3
# yay back to node again
- nodejs_version: 4
- nodejs_version: 5
platform:
- x86
- x64
# git clone depth
clone_depth: 5
# Install scripts. (runs after repo cloning)
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:Platform
# Update nodejs for versions < 1
- IF %nodejs_version% LSS 1 npm -g install npm
- IF %nodejs_version% LSS 1 set PATH=%APPDATA%\npm;%PATH%
- SET PATH=%cd%\node_modules\.bin\;%PATH%
# Output useful info for debugging.
- node --version
- npm --version
# Check if we need to publish the package
- SET PUBLISH_BINARY=false
# we are creating a empty file named publish
- ps: if ( $env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains('[publish binary]') -OR $(git describe --tags --always HEAD) -eq $env:APPVEYOR_REPO_BRANCH ) { echo $null >> publish }
- IF EXIST "publish" SET PUBLISH_BINARY=true
# Install the curl-for-windows dependencies.
- git submodule update --init --recursive
- python deps\curl-for-windows\configure.py
build_script:
- node tools\retrieve-win-deps.js
- npm install --build-from-source --msvs_version=2013 --loglevel=http
# Post-install test scripts.
test_script:
# run tests
- IF %nodejs_version% LSS 1 (npm test) ELSE (IF %nodejs_version% LSS 4 (iojs node_modules\mocha\bin\mocha test --reporter spec) ELSE (npm test))
after_test:
- IF "%PUBLISH_BINARY%" == "true" (node-pre-gyp package testpackage --verbose)
- IF "%PUBLISH_BINARY%" == "true" (for /f "usebackq delims=" %%x in (`node-pre-gyp reveal staged_tarball --silent`) do node scripts\module-packaging.js --publish %%x)
on_success:
- SET INSTALL_RESULT=0
- IF "%PUBLISH_BINARY%" == "true" (npm install --fallback-to-build=false)
- IF "%PUBLISH_BINARY%" == "true" (SET INSTALL_RESULT=%ERRORLEVEL%)
- IF NOT %INSTALL_RESULT% == 0 (for /f "usebackq delims=" %%x in (`node-pre-gyp reveal hosted_tarball --silent`) do node scripts\module-packaging.js --unpublish %%x)
- IF NOT %INSTALL_RESULT% == 0 (echo "Package unpublished since we got an error while installing it.")
- node-pre-gyp clean
# Don't actually deploy.
deploy: off
# Set build version format here instead of in the admin panel.
version: "{build}"