pipelines-it-remote-windows-to-linux.yml 2.42 KB
Newer Older
1
jobs:
Chi Song's avatar
Chi Song committed
2
- job: 'integration_test_remote_windows_to_linux'
chicm-ms's avatar
chicm-ms committed
3
  timeoutInMinutes: 120
4
5
6
7
8
9
10
11
12
13

  steps:
  - script: python -m pip install --upgrade pip setuptools
    displayName: 'Install python tools'
  - task: CopyFilesOverSSH@0
    inputs:
      sshEndpoint: $(end_point)
      targetFolder: /tmp/nnitest/$(Build.BuildId)/nni-remote
      overwrite: true
    displayName: 'Copy all files to remote machine'
chicm-ms's avatar
chicm-ms committed
14
    timeoutInMinutes: 10
15
16
17
18
19
20
21
22
23
24
25
  - script: |
      powershell.exe -file install.ps1
    displayName: 'Install nni toolkit via source code'
  - script: |
      python -m pip install scikit-learn==0.20.1 --user
    displayName: 'Install dependencies for integration tests'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: inline
      inline: cd /tmp/nnitest/$(Build.BuildId)/nni-remote/deployment/pypi;make build
Chi Song's avatar
Chi Song committed
26
      failOnStdErr: false
27
28
29
30
31
32
    continueOnError: true
    displayName: 'build nni bdsit_wheel'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
chicm-ms's avatar
chicm-ms committed
33
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode start --name $(Build.BuildId) --image nni/nni --os windows
34
35
36
37
    displayName: 'Start docker'
  - powershell: |
      Write-Host "Downloading Putty..."
      (New-Object Net.WebClient).DownloadFile("https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe", "$(Agent.TempDirectory)\pscp.exe")
Scarlett Li's avatar
Scarlett Li committed
38
39
40
41
      Write-Host "Download Putty success!"
      Write-Host "Connecting to host..."
      $(Agent.TempDirectory)\pscp.exe -P $(remote_port) -hostkey $(hostkey) -pw $(pscp_pwd) $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test\port
      Write-Host "Get port success!"
42
43
44
45
      Get-Content test\port
    displayName: 'Get docker port'
  - powershell: |
      cd test
chicm-ms's avatar
chicm-ms committed
46
47
48
      python nni_test/nnitest/generate_ts_config.py --ts remote --remote_user $(docker_user) --remote_host $(remote_host) --remote_port $(Get-Content port) --remote_pwd $(docker_pwd) --nni_manager_ip $(nni_manager_ip)
      Get-Content config/training_service.yml
      python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote --exclude cifar10
49
50
51
52
53
    displayName: 'integration test'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
chicm-ms's avatar
chicm-ms committed
54
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/nni_test/nnitest/remote_docker.py --mode stop --name $(Build.BuildId) --os windows
55
    displayName: 'Stop docker'