test-windows.yml 2.8 KB

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