pipelines-it-remote-linux-to-windows.yml 2.01 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
42
43
44
45
46
47
48
jobs:
  - job: "integration_test_remote_linux_to_windows"
    timeoutInMinutes: 120
    steps:
      - script: make clean
        displayName: "clean nni source code"
      - task: CopyFilesOverSSH@0
        inputs:
          sshEndpoint: $(end_point)
          contents: |
            **
            !**/dist/**
            !**/node_modules/**
          targetFolder: /tmp/nnitest/$(Build.BuildId)
          overwrite: true
        displayName: "Copy all files to remote machine"
        timeoutInMinutes: 10
      - task: SSH@0
        inputs:
          sshEndpoint: $(end_point)
          runOptions: commands
          commands: cd "\tmp\nnitest\$(Build.BuildId)" && powershell.exe -command "conda activate l2w | .\uninstall.ps1 | .\install.ps1"
          failOnStdErr: false
        displayName: "install on remote windows"
      - script: python3 -m pip install --upgrade pip setuptools --user
        displayName: "Install python tools"
      - script: make easy-install
        displayName: "Install nni via source code"
      - script: |
          sudo apt-get install swig -y
          PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
          PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
        displayName: "Install dependencies for integration tests in remote mode"
      - script: |
          set -e
          cd test
          python3 nni_test/nnitest/generate_ts_config.py --ts remote --remote_user $(remote_user) --remote_host $(remote_host) \
          --remote_port $(remote_port) --remote_pwd $(remote_pwd) --nni_manager_ip $(nni_manager_ip)
          cat config/training_service.yml
          PATH=$HOME/.local/bin:$PATH python3 nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts remote
        displayName: "integration test"
      - task: SSH@0
        inputs:
          sshEndpoint: $(end_point)
          runOptions: commands
          commands: rmdir /s /q "\\?\c:\tmp\nnitest\$(Build.BuildId)"
        condition: always()
        displayName: "clean up on remote server"