Three things to get Windows CI working correctly: (#9047)

- Ensure that the set backend environment variable is persisted to the next step via $GITHUB_ENV
- It doesn't actually persist for Windows unless shell is explicitly set to bash.
- Add the assertion to ensure the selected backend is actually used.
This commit is contained in:
rmtew
2025-02-13 08:41:00 +13:00
committed by GitHub
parent f53b819648
commit b3eab03055

View File

@@ -612,7 +612,10 @@ jobs:
key: windows-minimal
deps: testing_minimal
- name: Set env
run: printf "${{ matrix.backend == 'llvm' && 'LLVM=1' || matrix.backend == 'clang' && 'CLANG=1'}}"
shell: bash
run: printf "${{ matrix.backend == 'llvm' && 'LLVM=1' || matrix.backend == 'clang' && 'CLANG=1'}}" >> $GITHUB_ENV
- name: Run pytest (${{ matrix.backend }})
shell: bash
run: python -m pytest -n=auto test/test_tiny.py test/test_ops.py --durations=20
run: |
python -c "from tinygrad import Device; assert Device.DEFAULT == '${{ matrix.backend }}'.upper(), Device.DEFAULT"
python -m pytest -n=auto test/test_tiny.py test/test_ops.py --durations=20