pipelines-it-remote-windows.yml 2.29 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
jobs:
- job: 'integration_test_remote_windows'

  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'
  - 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
    continueOnError: true
    displayName: 'build nni bdsit_wheel'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/remote_docker.py --mode start --name $(Build.BuildId) --image nni/nni --os windows
    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")
      $(Agent.TempDirectory)\pscp.exe -hostkey $(hostkey) -pw $(pscp_pwd) $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test\port
      Get-Content test\port
    displayName: 'Get docker port'
  - powershell: |
      cd test
      python 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 training_service.yml
42
      python config_test.py --ts remote --exclude cifar10,smac,bohb
43
44
45
46
47
48
49
    displayName: 'integration test'
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
      commands: python3 /tmp/nnitest/$(Build.BuildId)/nni-remote/test/remote_docker.py --mode stop --name $(Build.BuildId) --os windows
    displayName: 'Stop docker'
50
51
52
53
54
55
  - task: SSH@0
    inputs:
      sshEndpoint: $(end_point)
      runOptions: commands
      commands: sudo rm -rf /tmp/nnitest/$(Build.BuildId)
    displayName: 'Clean the remote files'