Autotests #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test TensorFrost | |
on: | |
workflow_dispatch: | |
jobs: | |
test-tensorfrost: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install system dependencies and update MESA | |
run: | | |
sudo add-apt-repository ppa:kisak/kisak-mesa -y | |
sudo apt-get update | |
sudo apt-get install -y libglfw3-dev xvfb | |
sudo apt-get upgrade -y | |
- name: Install PyTorch | |
run: | | |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
- name: Install TensorFrost | |
run: | | |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ tensorfrost | |
- 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 |