[CI] Improvement of CI pipeline (#60)
This commit is contained in:
committed by
Philippe Tillet
parent
04c7bb75ce
commit
358c7c239e
@@ -3,7 +3,10 @@
|
||||
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
|
||||
|
||||
trigger:
|
||||
|
||||
name: Triton CI
|
||||
|
||||
pr:
|
||||
- master
|
||||
|
||||
pool:
|
||||
@@ -20,28 +23,19 @@ strategy:
|
||||
maxParallel: 1
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
architecture: 'x64'
|
||||
displayName: 'Use Python $(python.version)'
|
||||
|
||||
- script: |
|
||||
mkdir $(venv)
|
||||
python -m virtualenv $(venv)
|
||||
source $(venv)/bin/activate
|
||||
displayName: setup virtual environment
|
||||
|
||||
- script: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
- script: |
|
||||
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2 \
|
||||
-f https://download.pytorch.org/whl/torch_stable.html
|
||||
cd python
|
||||
python setup.py install
|
||||
displayName: 'Install Triton'
|
||||
displayName: Setup python environment
|
||||
|
||||
- script: |
|
||||
source $(venv)/bin/activate
|
||||
pip install pytest
|
||||
pytest .
|
||||
displayName: 'Python Unit Tests'
|
||||
displayName: 'Run Python tests'
|
23
.github/workflows/run-pipeline.yaml
vendored
23
.github/workflows/run-pipeline.yaml
vendored
@@ -1,23 +0,0 @@
|
||||
name: CI
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
# Triggers the workflow on pull request events Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Call Azure Pipeline
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Azure Pipelines Action
|
||||
uses: Azure/pipelines@v1
|
||||
with:
|
||||
azure-devops-project-url: https://dev.azure.com/phil0342
|
||||
azure-pipeline-name: 'ptillet.triton'
|
||||
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}
|
Reference in New Issue
Block a user