cuda-unit-test.yml 887 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
14
15

pool:
  name: SuperBench CI
  vmImage: ubuntu-latest

container:
  image: nvcr.io/nvidia/pytorch:20.12-py3

steps:
16
17
18
  - script: |
      echo "##vso[task.prependpath]$HOME/.local/bin"
    displayName: Export path
19
  - script: |
20
      python3 -m pip install .[test,nvidia,torch]
21
      make postinstall
22
23
24
25
    displayName: Install dependencies
  - script: |
      python3 setup.py lint
    displayName: Run code lint
26
27
28
  - script: |
      SB_MICRO_PATH=$PWD make cppbuild
    displayName: Build benchmarks
29
  - script: |
30
      SB_MICRO_PATH=$PWD python3 setup.py test
31
    displayName: Run unit tests
32
    timeoutInMinutes: 10
33
  - script: |
34
      bash <(curl -s https://codecov.io/bash) -cF cuda-unit-test
35
    displayName: Report coverage results
36
37
    env:
      CODECOV_TOKEN: $(codecovToken)