cuda-unit-test.yml 1019 Bytes
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'
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
22
      python3 -m pip install .[test,nvworker]
23
      make postinstall
24
25
26
27
    displayName: Install dependencies
  - script: |
      python3 setup.py lint
    displayName: Run code lint
28
29
30
  - script: |
      SB_MICRO_PATH=$PWD make cppbuild
    displayName: Build benchmarks
31
  - script: |
32
      SB_MICRO_PATH=$PWD python3 setup.py test
33
    displayName: Run unit tests
34
    timeoutInMinutes: 15
35
  - script: |
36
      bash <(curl -s https://codecov.io/bash) -cF cuda-unit-test
37
    displayName: Report coverage results
38
39
    env:
      CODECOV_TOKEN: $(codecovToken)