Newer
Older
dub_jkp / appveyor.yml
@Sebastian Wilzbach Sebastian Wilzbach on 12 Jan 2018 3 KB Change LDC Windows binary URLs
  1. platform: x64
  2. environment:
  3. matrix:
  4. - DC: dmd
  5. DVersion: nightly
  6. arch: x64
  7. - DC: dmd
  8. DVersion: nightly
  9. arch: x86
  10. - DC: dmd
  11. DVersion: beta
  12. arch: x64
  13. - DC: dmd
  14. DVersion: beta
  15. arch: x86
  16. - DC: dmd
  17. DVersion: stable
  18. arch: x64
  19. - DC: dmd
  20. DVersion: 2.072.2
  21. arch: x86
  22. - DC: dmd
  23. DVersion: 2.072.2
  24. arch: x64
  25. - DC: dmd
  26. DVersion: stable
  27. arch: x86
  28. - DC: ldc
  29. DVersion: stable
  30. arch: x64
  31. - DC: ldc
  32. DVersion: 1.7.0
  33. arch: x64
  34.  
  35. skip_tags: false
  36. branches:
  37. only:
  38. - master
  39.  
  40. install:
  41. - ps: function ResolveLatestDMD
  42. {
  43. $version = $env:DVersion;
  44. if($version -eq "stable") {
  45. $latest = (Invoke-WebRequest "http://downloads.dlang.org/releases/LATEST").toString();
  46. $url = "http://downloads.dlang.org/releases/2.x/$($latest)/dmd.$($latest).windows.7z";
  47. }elseif($version -eq "beta") {
  48. $latest = (Invoke-WebRequest "http://downloads.dlang.org/pre-releases/LATEST").toString();
  49. $latestVersion = $latest.split("-")[0].split("~")[0];
  50. $url = "http://downloads.dlang.org/pre-releases/2.x/$($latestVersion)/dmd.$($latest).windows.7z";
  51. }elseif($version -eq "nightly") {
  52. $url = "http://nightlies.dlang.org/dmd-master-2017-05-20/dmd.master.windows.7z"
  53. }else {
  54. $url = "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z";
  55. }
  56. $env:PATH += ";C:\dmd2\windows\bin;";
  57. return $url;
  58. }
  59. - ps: function ResolveLatestLDC
  60. {
  61. $version = $env:DVersion;
  62. $arch = $env:arch;
  63. if($version -eq "stable") {
  64. $latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r","");
  65. $url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-windows-$($arch).7z";
  66. }elseif($version -eq "beta") {
  67. $latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST_BETA").toString().replace("`n","").replace("`r","");
  68. $url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-windows-$($arch).7z";
  69. } else {
  70. $latest = $version;
  71. $url = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-$($arch).7z";
  72. }
  73. $env:PATH += ";C:\ldc2-$($latest)-windows-$($arch)\bin";
  74. $env:DC = "ldc2";
  75. return $url;
  76. }
  77. - ps: function SetUpDCompiler
  78. {
  79. $env:toolchain = "msvc";
  80. if($env:DC -eq "dmd"){
  81. echo "downloading ...";
  82. $url = ResolveLatestDMD;
  83. echo $url;
  84. Invoke-WebRequest $url -OutFile "c:\dmd.7z";
  85. echo "finished.";
  86. pushd c:\\;
  87. 7z x dmd.7z > $null;
  88. popd;
  89. }
  90. elseif($env:DC -eq "ldc"){
  91. echo "downloading ...";
  92. $url = ResolveLatestLDC;
  93. echo $url;
  94. Invoke-WebRequest $url -OutFile "c:\ldc.zip";
  95. echo "finished.";
  96. pushd c:\\;
  97. 7z x ldc.zip > $null;
  98. popd;
  99. }
  100. }
  101. - ps: SetUpDCompiler
  102.  
  103. build_script:
  104. - ps: if($env:arch -eq "x86"){
  105. $env:compilersetupargs = "x86";
  106. $env:Darch = "x86";
  107. $env:DConf = "m32";
  108. }elseif($env:arch -eq "x64"){
  109. $env:compilersetupargs = "amd64";
  110. $env:Darch = "x86_64";
  111. $env:DConf = "m64";
  112. }
  113. - ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
  114. - '"%compilersetup%" %compilersetupargs%'
  115.  
  116. test_script:
  117. - echo %PLATFORM%
  118. - echo %Darch%
  119. - echo %DC%
  120. - echo %PATH%
  121. - '%DC% --version'
  122. - dub test --arch=%Darch% --compiler=%DC%