Skip to content

Update python-app.yml (Test #8) #13

Update python-app.yml (Test #8)

Update python-app.yml (Test #8) #13

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main", "tejas3070-patch-1" ]
#pull_request:
#branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: 'triton_viz'
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Create virtual environment
run: |
python -m venv triton_env
source triton_env/bin/activate
- name: Cache virtual environment
id: cache-triton_env
uses: actions/cache@v2
with:
path: |
triton_env
~/.cache/pip
key: ${{ runner.os }}-triton_env-${{ hashFiles('triton_viz/requirements.txt') }}-v1
restore-keys: |
${{ runner.os }}-triton_env-${{ hashFiles('triton_viz/requirements.txt') }}-
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Installing dependencies
if: steps.cache-triton_env.outputs.cache-hit != 'true'
run: |
git clone https://github.com/openai/triton.git triton
cd triton/python
pip install .
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
cd triton_viz
pip install .
cd triton_viz
pip install -r triton_viz/requirements.txt
- name: Lint with pre-commit
run: |
cd triton_viz
pre-commit run --all-files
- name: Test with pytest
run: |
source triton_env/bin/activate
cd triton_viz
pytest Examples