Browse Source

[ci] test win32

Andy Li 6 years ago
parent
commit
4f65dddae7
2 changed files with 92 additions and 74 deletions
  1. 10 74
      azure-pipelines.yml
  2. 82 0
      extra/azure-pipelines/test-windows.yml

+ 10 - 74
azure-pipelines.yml

@@ -165,80 +165,16 @@ stages:
             workingDirectory: $(Build.SourcesDirectory)/tests
             workingDirectory: $(Build.SourcesDirectory)/tests
             displayName: Test
             displayName: Test
 
 
-      - job: TestWin64
-        dependsOn: BuildWin64
-        pool:
-          vmImage: 'windows-2019'
-        variables:
-          HAXELIB_ROOT: C:/haxelib
-          HAXE_ARCH: 64
-        strategy:
-          matrix:
-            macro:
-              TEST: macro
-            neko:
-              TEST: neko
-            hl:
-              TEST: hl
-            cpp:
-              TEST: cpp
-              HXCPP_COMPILE_CACHE: C:/hxcache
-            java:
-              TEST: java,jvm
-            cs:
-              TEST: cs
-            js:
-              TEST: js
-            # https://github.com/microsoft/azure-pipelines-image-generation/issues/990
-            # php:
-            #   TEST: php
-            # TODO. flash has never been enabled on our AppVeyor builds.
-            # flash:
-            #   TEST: flash9,as3
-            python:
-              TEST: python
-            # TODO. Lua has never been enabled on our AppVeyor builds.
-            # lua:
-            #   TEST: lua
-        steps:
-          - checkout: self
-            fetchDepth: 20
-          - template: extra/azure-pipelines/install-neko-snapshot.yaml
-            parameters:
-              platform: windows64
-          - task: DownloadPipelineArtifact@0
-            inputs:
-              artifactName: 'win64Binaries'
-              targetPath: win64Binaries
-          - powershell: |
-              Set-PSDebug -Trace 1
-              7z x win64Binaries/*_bin.zip -owin64Binaries
-              $dir = Get-ChildItem win64Binaries/* -Name -Directory
-              Rename-Item win64Binaries/$dir haxe
-              $dir = '' + ( get-location ) + '\win64Binaries\haxe'
-              dir $dir
-              Set-PSDebug -Trace 0
-              Write-Host "##vso[task.prependpath]$dir"
-            displayName: Setup Haxe
-          - script: haxe -version
-            displayName: Print Haxe version
-          - task: UsePythonVersion@0
-            inputs:
-              versionSpec: '3.7'
-          - powershell: |
-              Set-PSDebug -Trace 1
-              $pypath = python -c "import sys; print(sys.executable)"
-              $py3path = $pypath.replace("python.exe","python3.exe")
-              cmd /c mklink $py3path $pypath
-              python3 -V
-            displayName: "Make Python 3 be available as python3 in the cmdline"
-          - script: |
-              mkdir "$(HAXELIB_ROOT)"
-              haxelib setup "$(HAXELIB_ROOT)"
-            displayName: Setup haxelib
-          - script: haxe RunCi.hxml
-            workingDirectory: $(Build.SourcesDirectory)/tests
-            displayName: Test
+      - template: extra/azure-pipelines/test-windows.yml
+        parameters:
+          name: TestWin64
+          arch: '64'
+
+      - template: extra/azure-pipelines/test-windows.yml
+        parameters:
+          name: TestWin32
+          arch: '32'
+
   - stage: StageDeploy
   - stage: StageDeploy
     condition: and(succeeded(), not(variables['System.PullRequest.PullRequestId']))
     condition: and(succeeded(), not(variables['System.PullRequest.PullRequestId']))
     jobs:
     jobs:

+ 82 - 0
extra/azure-pipelines/test-windows.yml

@@ -0,0 +1,82 @@
+parameters:
+  name: 'TestWindows'
+  vmImage: 'windows-2019'
+  arch: '64' # or '32'
+
+jobs:
+  - job: ${{ parameters.name }}
+    dependsOn: BuildWin${{ parameters.arch }}
+    pool:
+      vmImage: ${{ parameters.vmImage }}
+    variables:
+      HAXELIB_ROOT: C:/haxelib
+    strategy:
+      matrix:
+        macro:
+          TEST: macro
+        neko:
+          TEST: neko
+        hl:
+          TEST: hl
+        cpp:
+          TEST: cpp
+          HXCPP_COMPILE_CACHE: C:/hxcache
+        java:
+          TEST: java,jvm
+        cs:
+          TEST: cs
+        js:
+          TEST: js
+        # https://github.com/microsoft/azure-pipelines-image-generation/issues/990
+        # php:
+        #   TEST: php
+        # TODO. flash has never been enabled on our AppVeyor builds.
+        # flash:
+        #   TEST: flash9,as3
+        python:
+          TEST: python
+        # TODO. Lua has never been enabled on our AppVeyor builds.
+        # lua:
+        #   TEST: lua
+    steps:
+      - checkout: self
+        fetchDepth: 20
+      - template: extra/azure-pipelines/install-neko-snapshot.yaml
+        parameters:
+          ${{ if eq(parameters.arch, '64') }}:
+            platform: windows64
+          ${{ if eq(parameters.arch, '32') }}:
+            platform: windows
+      - task: DownloadPipelineArtifact@0
+        inputs:
+          artifactName: 'win${{ parameters.arch }}Binaries'
+          targetPath: win${{ parameters.arch }}Binaries
+      - powershell: |
+          Set-PSDebug -Trace 1
+          7z x win${{ parameters.arch }}Binaries/*_bin.zip -owin${{ parameters.arch }}Binaries
+          $dir = Get-ChildItem win${{ parameters.arch }}Binaries/* -Name -Directory
+          Rename-Item win${{ parameters.arch }}Binaries/$dir haxe
+          $dir = '' + ( get-location ) + '\win${{ parameters.arch }}Binaries\haxe'
+          dir $dir
+          Set-PSDebug -Trace 0
+          Write-Host "##vso[task.prependpath]$dir"
+        displayName: Setup Haxe
+      - script: haxe -version
+        displayName: Print Haxe version
+      - task: UsePythonVersion@0
+        inputs:
+          versionSpec: '3.7'
+      - powershell: |
+          Set-PSDebug -Trace 1
+          $pypath = python -c "import sys; print(sys.executable)"
+          $py3path = $pypath.replace("python.exe","python3.exe")
+          cmd /c mklink $py3path $pypath
+          python3 -V
+        displayName: "Make Python 3 be available as python3 in the cmdline"
+      - script: |
+          mkdir "$(HAXELIB_ROOT)"
+          haxelib setup "$(HAXELIB_ROOT)"
+        displayName: Setup haxelib
+      - script: haxe RunCi.hxml
+        workingDirectory: $(Build.SourcesDirectory)/tests
+        displayName: Test