2021-04-12 15:03:19 +03:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# Licensed under the MIT license.
|
|
|
|
|
|
|
|
trigger:
|
2021-04-14 12:40:34 +03:00
|
|
|
- main
|
2021-07-09 11:54:42 +03:00
|
|
|
- release/*
|
2021-04-12 15:03:19 +03:00
|
|
|
|
|
|
|
pool:
|
|
|
|
name: SuperBench CI
|
|
|
|
vmImage: ubuntu-latest
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: nvcr.io/nvidia/pytorch:20.12-py3
|
2021-10-22 10:22:15 +03:00
|
|
|
options: '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker'
|
2021-04-12 15:03:19 +03:00
|
|
|
|
|
|
|
steps:
|
2021-05-23 18:53:37 +03:00
|
|
|
- script: |
|
|
|
|
echo "##vso[task.prependpath]$HOME/.local/bin"
|
|
|
|
displayName: Export path
|
2021-04-12 15:03:19 +03:00
|
|
|
- script: |
|
2021-12-10 16:53:11 +03:00
|
|
|
python3 -m pip install .[test,nvidia,torch,ort]
|
2021-05-23 18:53:37 +03:00
|
|
|
make postinstall
|
2021-04-12 15:03:19 +03:00
|
|
|
displayName: Install dependencies
|
|
|
|
- script: |
|
|
|
|
python3 setup.py lint
|
|
|
|
displayName: Run code lint
|
2021-05-26 15:38:27 +03:00
|
|
|
- script: |
|
|
|
|
SB_MICRO_PATH=$PWD make cppbuild
|
|
|
|
displayName: Build benchmarks
|
2021-04-12 15:03:19 +03:00
|
|
|
- script: |
|
2021-05-26 14:14:14 +03:00
|
|
|
SB_MICRO_PATH=$PWD python3 setup.py test
|
2021-04-12 15:03:19 +03:00
|
|
|
displayName: Run unit tests
|
2021-12-10 14:01:59 +03:00
|
|
|
timeoutInMinutes: 15
|
2021-04-12 15:03:19 +03:00
|
|
|
- script: |
|
2021-04-13 11:25:35 +03:00
|
|
|
bash <(curl -s https://codecov.io/bash) -cF cuda-unit-test
|
2021-04-12 15:03:19 +03:00
|
|
|
displayName: Report coverage results
|
2021-04-13 11:25:35 +03:00
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: $(codecovToken)
|