appveyor.yml 4.78 KB
Newer Older
Cédric Moreau's avatar
Cédric Moreau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
environment:
  matrix:
    - nodejs_version: "5.8.0"

platform:
  - x64

install:
  - ps: Install-Product node $env:nodejs_version $env:platform
  - node -v
  - npm install -g npm
  - npm install -g nw-gyp node-pre-gyp
  - npm install

test_script:
  - npm test

build: off

after_test:
Cédric Moreau's avatar
Cédric Moreau committed
21 22 23
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %APPDATA%\..\Local\NuGet\Cache
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y wget 7zip InnoSetup
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files\7-Zip";"C:\Program Files (x86)\Inno Setup 5";%PATH%
Cédric Moreau's avatar
Cédric Moreau committed
24
  # GUI Version
Cédric Moreau's avatar
Cédric Moreau committed
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
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set SRC=%cd%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %SRC%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy misc\MSVSVersion.py %APPDATA%\npm\node_modules\nw-gyp\gyp\pylib\gyp\MSVSVersion.py
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_VERSION=0.13.0-rc3
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_RELEASE=v0.13.0-rc3
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW_RELEASE%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd node_modules/wotb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\wotb.node %cd%\lib\binding\Release\node-v47-win32-x64\wotb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../naclb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\naclb.node %cd%\lib\binding\Release\node-v47-win32-x64\naclb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../scryptb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\scryptb.node %cd%\lib\binding\Release\node-v47-win32-x64\scryptb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../sqlite3b
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\node-webkit-%NW_RELEASE%-win32-x64\node_sqlite3.node %cd%\lib\binding\node-v47-win32-x64\node_sqlite3.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../..
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm prune --production
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ..
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] mkdir ucoin_release
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW=nwjs-%NW_RELEASE%-win-x64
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_GZ=%NW%.zip
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW_GZ%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] wget http://dl.nwjs.io/%NW_RELEASE%/%NW_GZ%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] 7z x %NW_GZ% 1> null
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %NW% %cd%\ucoin_release\nw
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] mkdir %cd%\ucoin_release\sources
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] xcopy %SRC%\gui\* %cd%\ucoin_release\nw\ /s /e
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] xcopy %SRC%\* %cd%\ucoin_release\sources\ /s /e
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %cd%\ucoin_release\sources\ui\package\node_modules
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %cd%\ucoin_release\sources\ui\package\bower_components
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ucoin_release\sources\duniter.iss /DROOT_PATH=%cd%\ucoin_release
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\ucoin_release\Duniter.exe %cd%\ucoin\duniter-%APPVEYOR_REPO_TAG_NAME%-windows-x64.exe
Cédric Moreau's avatar
Cédric Moreau committed
69 70 71 72 73 74

artifacts:
  - path: duniter*.exe
    name: Duniter

deploy:
Cédric Moreau's avatar
Cédric Moreau committed
75
  release: v0.20.0a30
Cédric Moreau's avatar
Cédric Moreau committed
76 77 78 79 80 81
  provider: GitHub
  auth_token:
    secure: Vp/M0r0i1yhGR2nhrPWEbTiDIF6r0cmwbNDFZUzdFe5clWxPXtuC0lgIpOQI78zt
  artifact: /Duniter/
  prerelease: true
  on:
82
    appveyor_repo_tag: true