Skip to content

Autotests

Autotests #19

Workflow file for this run

name: Test TensorFrost
on:
workflow_dispatch:
jobs:
download-artifacts:
uses: ./.github/workflows/download-artifacts.yml

Check failure on line 8 in .github/workflows/autotests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/autotests.yml

Invalid workflow file

error parsing called workflow ".github/workflows/autotests.yml" -> "./.github/workflows/download-artifacts.yml" : failed to fetch workflow: workflow was not found.
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@v2
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