cuda-unit-test.yml 1.26 KB
Newer Older
1
2
3
4
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

trigger:
5
  - main
6
  - release/*
7
8
9
10
11
12
13

pool:
  name: SuperBench CI
  vmImage: ubuntu-latest

container:
  image: nvcr.io/nvidia/pytorch:20.12-py3
14
  options: '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/:/usr/lib/sudo/'
15
16

steps:
17
18
19
  - script: |
      echo "##vso[task.prependpath]$HOME/.local/bin"
    displayName: Export path
20
  - script: |
21
      python3 -m pip install --upgrade pip setuptools==65.7
22
      python3 -m pip install .[test,nvworker]
23
      make postinstall
24
25
      sudo DEBIAN_FRONTEND=noninteractive apt-get update
      sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswresample-dev
26
27
28
29
    displayName: Install dependencies
  - script: |
      python3 setup.py lint
    displayName: Run code lint
30
31
32
  - script: |
      SB_MICRO_PATH=$PWD make cppbuild
    displayName: Build benchmarks
33
  - script: |
34
      SB_MICRO_PATH=$PWD python3 setup.py test
35
    displayName: Run unit tests
36
    timeoutInMinutes: 60
37
  - script: |
38
      bash <(curl -s https://codecov.io/bash) -cF cuda-unit-test
39
    displayName: Report coverage results
40
41
    env:
      CODECOV_TOKEN: $(codecovToken)