Skip to content

Commit

Permalink
Update python-app.yml (Test #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
tejas3070 authored Mar 6, 2024
1 parent aacbdcd commit e10046e
Showing 1 changed file with 25 additions and 28 deletions.
53 changes: 25 additions & 28 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
Expand All @@ -27,47 +26,45 @@ jobs:
with:
python-version: "3.10"

- name: Cache Python virtual environment and pip cache
- 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: |
~/venv
triton_env
~/.cache/pip
key: ${{ runner.os }}-venv-${{ hashFiles('triton_viz/**/requirements.txt', 'triton_viz/**.py', 'triton_viz/**/setup.py') }}-${{ github.sha }}
key: ${{ runner.os }}-triton_env-${{ hashFiles('triton_viz/requirements.txt') }}-v1
restore-keys: |
${{ runner.os }}-venv-${{ hashFiles('triton_viz/**/requirements.txt', 'triton_viz/**.py', 'triton_viz/**/setup.py') }}-
${{ runner.os }}-venv-
- name: Create and activate virtual environment
run: |
python -m venv ~/venv
source ~/venv/bin/activate
${{ runner.os }}-triton_env-${{ hashFiles('triton_viz/requirements.txt') }}-
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Clone and install dependency project (e.g., triton)
- 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
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
- name: Install triton_viz
run: |
cd $GITHUB_WORKSPACE/triton_viz
cd triton_viz
pip install .
- name: Install main project (triton_viz) dependencies
run: |
pip install pytest pre-commit pyarrow
#- name: Lint with pre-commit
# run: |
# cd triton_viz
# pre-commit run --all-files
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

0 comments on commit e10046e

Please sign in to comment.