-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (51 loc) · 1.73 KB
/
autotests.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
name: Autotests
on:
workflow_dispatch:
jobs:
download-artifacts:
uses: ./.github/workflows/download_artifacts.yml
test-tensorfrost:
needs: download-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglfw3-dev libgl1-mesa-dev xvfb
- name: Install PyTorch
run: |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
name: all-wheels
path: ./wheels
- name: Install TensorFrost
run: |
python_version=$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
wheel_file=$(ls ./wheels/TensorFrost-*-cp${python_version}*-manylinux*.whl)
if [ -f "$wheel_file" ]; then
pip install $wheel_file
else
echo "No matching wheel found for Python ${python_version}"
exit 1
fi
- name: Install test dependencies
run: |
if [ -f requirements-test.txt ]; then
pip install -r requirements-test.txt
elif [ -f requirements.txt ]; then
pip install -r requirements.txt
else
echo "No requirements file found. Skipping dependency installation."
fi
- name: Make test script executable
run: chmod +x run_tests.sh
- name: Run tests with Xvfb
run: |
xvfb-run -a ./run_tests.sh