|
| 1 | +#---------------------------------# |
| 2 | +# general configuration # |
| 3 | +#---------------------------------# |
| 4 | + |
| 5 | +#version: 1.0.{build}-{branch} |
| 6 | + |
| 7 | +# Do not build on tags (GitHub only) |
| 8 | +skip_tags: true |
| 9 | + |
| 10 | +#---------------------------------# |
| 11 | +# environment configuration # |
| 12 | +#---------------------------------# |
| 13 | + |
| 14 | +# Operating system (build VM template) |
| 15 | + |
| 16 | +environment: |
| 17 | + matrix: |
| 18 | + - os: Visual Studio 2015 |
| 19 | + VS: 14 |
| 20 | + - os: Visual Studio 2013 |
| 21 | + VS: 12 |
| 22 | + |
| 23 | +#matrix: |
| 24 | +# allow_failures: |
| 25 | +# - VS: 14 |
| 26 | + |
| 27 | +# scripts that are called at very beginning, before repo cloning |
| 28 | +init: |
| 29 | + - git config --global core.autocrlf input |
| 30 | + |
| 31 | +# scripts that run after cloning repository |
| 32 | +install: |
| 33 | + # show environment |
| 34 | + - set D_COMPILER=dmd |
| 35 | + - set |
| 36 | + - cd c:\projects |
| 37 | + # Download & extract D compiler |
| 38 | + - ps: | |
| 39 | + If ($Env:D_COMPILER -eq 'dmd') { |
| 40 | + Start-FileDownload 'http://downloads.dlang.org/releases/2.x/2.071.1/dmd.2.071.1.windows.7z' -FileName 'dmd2.7z' |
| 41 | + 7z x dmd2.7z > $null |
| 42 | + Set-Item -path env:DMD -value c:\projects\dmd2\windows\bin\dmd.exe |
| 43 | + c:\projects\dmd2\windows\bin\dmd.exe --version |
| 44 | + } Else { |
| 45 | + If ($Env:D_COMPILER -eq 'dmd-nightly') { |
| 46 | + Start-FileDownload 'http://nightlies.dlang.org/dmd-nightly/dmd.master.windows.7z' -FileName 'dmd2.7z' |
| 47 | + 7z x dmd2.7z > $null |
| 48 | + Set-Item -path env:DMD -value c:\projects\dmd2\windows\bin\dmd.exe |
| 49 | + c:\projects\dmd2\windows\bin\dmd.exe --version |
| 50 | + } Else { |
| 51 | + # LDC unsupported so far |
| 52 | + If ($Env:D_COMPILER -eq 'ldc') { |
| 53 | + Start-FileDownload 'http://github.com/ldc-developers/ldc/releases/download/v1.0.0/ldc2-1.0.0-win64-msvc.zip' -FileName 'ldc2.zip' |
| 54 | + 7z x ldc2.zip > $null |
| 55 | + Set-Item -path env:DMD -value c:\projects\ldc2-1.0.0-win64-msvc\bin\ldmd2.exe |
| 56 | + c:\projects\ldc2-1.0.0-win64-msvc\bin\ldc2 --version |
| 57 | + } |
| 58 | + } |
| 59 | + } |
| 60 | + # Download & extract coffimplib.exe (no longer available publically as a single download) |
| 61 | + - ps: | |
| 62 | + Start-FileDownload 'http://ftp.digitalmars.com/Digital_Mars_C++/Patch/cd851.zip' -FileName 'cd851.zip' |
| 63 | + 7z x cd851.zip > $null |
| 64 | + copy c:\projects\dm\bin\coffimplib.exe c:\projects\dmd2\windows\bin |
| 65 | + # Download & install Visual D |
| 66 | + - ps: | |
| 67 | + Start-FileDownload 'https://github.com/dlang/visuald/releases/download/v0.3.43/VisualD-v0.3.43.exe' -FileName 'VisualD-v0.3.43.exe' |
| 68 | + - .\VisualD-v0.3.43.exe /S |
| 69 | + # configure DMD path |
| 70 | + - reg add "HKLM\SOFTWARE\Microsoft\VisualStudio\12.0\ToolsOptionsPages\Projects\Visual D Settings" /v DMDInstallDir /t REG_SZ /d c:\projects\dmd2 /reg:32 /f |
| 71 | + - reg add "HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\ToolsOptionsPages\Projects\Visual D Settings" /v DMDInstallDir /t REG_SZ /d c:\projects\dmd2 /reg:32 /f |
| 72 | + # disable link dependencies monitoring, fails on AppVeyor server |
| 73 | + - reg add "HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\ToolsOptionsPages\Projects\Visual D Settings" /v optlinkDeps /t REG_DWORD /d 0 /reg:32 /f |
| 74 | + # Set environment variables |
| 75 | + - set PATH=c:\projects\dm\bin;%PATH% |
| 76 | + - call "c:\Program Files (x86)\Microsoft Visual Studio %VS%.0\VC\vcvarsall.bat" x86 |
| 77 | + # Print environment info |
| 78 | + - set |
| 79 | + - msbuild /version |
| 80 | + - cl |
| 81 | + |
| 82 | +#---------------------------------# |
| 83 | +# build configuration # |
| 84 | +#---------------------------------# |
| 85 | + |
| 86 | +before_build: |
| 87 | + - cd c:\projects |
| 88 | + |
| 89 | +build_script: |
| 90 | + - cd c:\projects |
| 91 | + - cd visuald |
| 92 | + # ignore failure once, in case it needs reloading the sdk project |
| 93 | + - nmake prerequisites || nmake prerequisites |
| 94 | + # build Visual D |
| 95 | + - nmake visuald_vs |
| 96 | + # Fetch submodules |
| 97 | + - git submodule update --init --recursive |
| 98 | + - cd .. |
| 99 | + # Clone mago/cv2pdb (need to be two levels up) |
| 100 | + - cd .. |
| 101 | + - git clone https://github.com/rainers/mago.git mago |
| 102 | + - set VS_SDK_PATH=%VSSDK120Install% |
| 103 | + - copy mago\PropSheets\Template_MagoDbg_properties.props mago\PropSheets\MagoDbg_properties.props |
| 104 | + - md cv2pdb |
| 105 | + - cd cv2pdb |
| 106 | + - git clone https://github.com/rainers/cv2pdb.git trunk |
| 107 | + - cd .. |
| 108 | + # Download & extract binutils |
| 109 | + - cd projects |
| 110 | + - ps: | |
| 111 | + Start-FileDownload 'http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.gz' -FileName 'binutils-2.25.tar.gz' |
| 112 | + 7z x binutils-2.25.tar.gz > $null |
| 113 | + 7z x binutils-2.25.tar > $null |
| 114 | + - 'if "%VS%"=="12" echo #define snprintf _snprintf >binutils-2.25\config.h' |
| 115 | + - 'if "%VS%"=="14" echo // empty >binutils-2.25\config.h' |
| 116 | + - set BINUTILS=c:\projects\binutils-2.25 |
| 117 | + - set DMDINSTALLDIR=c:\projects\dmd2 |
| 118 | + # build installer |
| 119 | + - cd visuald |
| 120 | + - nmake install_vs |
| 121 | + |
| 122 | +after_build: |
| 123 | + # publish as artifact |
| 124 | + - cd c:\projects |
| 125 | + - 7z a logs_and_symbols.7z -r visuald\bin\*.pdb visuald\bin\*.html |
| 126 | + - for %%I in (downloads\*.exe) do (set BUILD_EXE=%%I && set ARTIFACT=%%~dpnI-%APPVEYOR_BUILD_NUMBER%-vs%VS%.exe) |
| 127 | + - copy %BUILD_EXE% %ARTIFACT% |
| 128 | + - ps: | |
| 129 | + If ($Env:VS -eq '12') { |
| 130 | + echo 'Creating artifacts...' |
| 131 | + Push-AppveyorArtifact $Env:ARTIFACT |
| 132 | + Push-AppveyorArtifact ..\cv2pdb\trunk\bin\Release\cv2pdb.exe |
| 133 | + Push-AppveyorArtifact visuald\bin\Release\pipedmd.exe |
| 134 | + Push-AppveyorArtifact logs_and_symbols.7z |
| 135 | + } |
| 136 | +
|
| 137 | +on_failure: |
| 138 | + - cd c:\projects |
| 139 | + - 7z a logs.7z -r visuald\bin\*.html |
| 140 | + - ps: | |
| 141 | + echo 'Publishing log files...' |
| 142 | + Push-AppveyorArtifact logs.7z |
| 143 | +
|
| 144 | +#---------------------------------# |
| 145 | +# test configuration # |
| 146 | +#---------------------------------# |
| 147 | + |
| 148 | +test_script: |
| 149 | + - cd c:\projects |
0 commit comments