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