test-windows.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. parameters:
  2. name: 'TestWindows'
  3. vmImage: 'windows-2019'
  4. arch: '64' # or '32'
  5. jobs:
  6. - job: ${{ parameters.name }}
  7. dependsOn: BuildWin${{ parameters.arch }}
  8. pool:
  9. vmImage: ${{ parameters.vmImage }}
  10. variables:
  11. HAXELIB_ROOT: C:/haxelib
  12. strategy:
  13. matrix:
  14. macro:
  15. TEST: macro
  16. neko:
  17. TEST: neko
  18. hl:
  19. TEST: hl
  20. cpp:
  21. TEST: cpp
  22. HXCPP_COMPILE_CACHE: C:/hxcache
  23. java:
  24. TEST: java,jvm
  25. cs:
  26. TEST: cs
  27. js:
  28. TEST: js
  29. # https://github.com/microsoft/azure-pipelines-image-generation/issues/990
  30. # php:
  31. # TEST: php
  32. # TODO. flash has never been enabled on our AppVeyor builds.
  33. # flash:
  34. # TEST: flash9,as3
  35. python:
  36. TEST: python
  37. # TODO. Lua has never been enabled on our AppVeyor builds.
  38. # lua:
  39. # TEST: lua
  40. steps:
  41. - checkout: self
  42. fetchDepth: 20
  43. - template: extra/azure-pipelines/install-neko-snapshot.yaml
  44. parameters:
  45. ${{ if eq(parameters.arch, '64') }}:
  46. platform: windows64
  47. ${{ if eq(parameters.arch, '32') }}:
  48. platform: windows
  49. - task: DownloadPipelineArtifact@0
  50. inputs:
  51. artifactName: 'win${{ parameters.arch }}Binaries'
  52. targetPath: win${{ parameters.arch }}Binaries
  53. - powershell: |
  54. Set-PSDebug -Trace 1
  55. 7z x win${{ parameters.arch }}Binaries/*_bin.zip -owin${{ parameters.arch }}Binaries
  56. $dir = Get-ChildItem win${{ parameters.arch }}Binaries/* -Name -Directory
  57. Rename-Item win${{ parameters.arch }}Binaries/$dir haxe
  58. $dir = '' + ( get-location ) + '\win${{ parameters.arch }}Binaries\haxe'
  59. dir $dir
  60. Set-PSDebug -Trace 0
  61. Write-Host "##vso[task.prependpath]$dir"
  62. displayName: Setup Haxe
  63. - script: haxe -version
  64. displayName: Print Haxe version
  65. - task: UsePythonVersion@0
  66. inputs:
  67. versionSpec: '3.7'
  68. - powershell: |
  69. Set-PSDebug -Trace 1
  70. $pypath = python -c "import sys; print(sys.executable)"
  71. $py3path = $pypath.replace("python.exe","python3.exe")
  72. cmd /c mklink $py3path $pypath
  73. python3 -V
  74. displayName: "Make Python 3 be available as python3 in the cmdline"
  75. - script: |
  76. mkdir "$(HAXELIB_ROOT)"
  77. haxelib setup "$(HAXELIB_ROOT)"
  78. displayName: Setup haxelib
  79. - script: haxe RunCi.hxml
  80. workingDirectory: $(Build.SourcesDirectory)/tests
  81. displayName: Test