-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (57 loc) · 1.9 KB
/
python-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# 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:
ref: tejas3070-patch-1
path: 'triton_viz'
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Cache Python virtual environment and pip cache
uses: actions/cache@v2
with:
path: |
~/venv
~/.cache/pip
key: ${{ runner.os }}-venv-${{ hashFiles('triton_viz/**/requirements.txt', 'triton_viz/**.py', 'triton_viz/**/setup.py') }}-${{ github.sha }}
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
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Clone and install dependency project (e.g., triton)
run: |
git clone https://github.com/openai/triton.git ~/triton
cd ~/triton/python
MAX_JOBS=16 pip install .
- name: Install triton_viz
run: |
cd $GITHUB_WORKSPACE/triton_viz
pip install .
- name: Install main project (triton_viz) dependencies
run: |
pip install -r requirements.txt
- name: Lint with pre-commit
run: |
pre-commit run --all-files
- name: Test with pytest
run: |
pytest Examples