-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.08 KB
/
CI-Python.yaml
File metadata and controls
46 lines (37 loc) · 1.08 KB
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
name: "CI - Python"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
name: Build with Pip
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt update
- name: Install Protoc Ubuntu
run: sudo apt install protobuf-compiler
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "PyTorch_requirements.txt"
- name: Build and install
run: pip install --verbose .[testing]
- name: Test
run: |
# Need to set the library path so that torch can find itself (:
export LD_LIBRARY_PATH=`python3 -c 'import os;import torch;print(os.path.abspath(torch.__file__)[:-11])'`/lib:$LD_LIBRARY_PATH
pytest tests/python/*.py