@@ -10,24 +10,36 @@ concurrency:
1010 cancel-in-progress : ${{ github.event_name == 'pull_request' }}
1111
1212jobs :
13- generic-cpu :
13+ generic :
14+ name : >-
15+ Generic (${{ matrix.OS }}) (${{ matrix.PYTEST_FLAGS == "-m required" && "CPU" || "GPU" }})
16+ (${{ matrix.PYTHON_VERSION }})
17+
1418 strategy :
1519 fail-fast : false
1620 matrix :
1721 # See official Github documentation for details: https://shorturl.at/NJgsj
18- OS : [' ubuntu-22.04', ' ubuntu-24.04', ' macos-15', ' windows-2025' ]
22+ OS : [" ubuntu-22.04", " ubuntu-24.04", " macos-15", " windows-2025" ]
1923 PYTHON_VERSION : ["3.10", "3.11", "3.12"]
24+ PYTEST_FLAGS : ["-m required"]
25+ include :
26+ - OS : " macos-15-xlarge" # (MacOS Arm - Apple M1) 6CPU+8GPU, 14GB RAM, 14GB SSD
27+ PYTHON_VERSION : " 3.12"
28+ - OS : " gpu-t4-4-core" # (Linux x86) 4CPU, NVIDIA Tesla T4 16 GB VRAM, 28 GB RAM, 176 GB SSD
29+ PYTHON_VERSION : " 3.12"
30+ - OS : " win-gpu-t4-4-core" # (Windows x86) 4CPU, NVIDIA Tesla T4 16 GB VRAM, 28 GB RAM, 176 GB SSD
31+ PYTHON_VERSION : " 3.12"
2032
2133 env :
2234 HF_HUB_DOWNLOAD_TIMEOUT : 60
2335 GS_CACHE_FILE_PATH : " .cache/genesis"
2436 TI_OFFLINE_CACHE : " 1"
2537 TI_OFFLINE_CACHE_CLEANING_POLICY : " never"
2638 TI_OFFLINE_CACHE_FILE_PATH : " .cache/taichi"
27- TI_ENABLE_CUDA : " 0 "
28- TI_ENABLE_METAL : " 0 "
29- TI_ENABLE_OPENGL : " 0 "
30- TI_ENABLE_VULKAN : " 0 "
39+ TI_ENABLE_CUDA : ${{ matrix.PYTEST_FLAGS == "-m required" && "0" || "1" }}
40+ TI_ENABLE_METAL : ${{ matrix.PYTEST_FLAGS == "-m required" && "0" || "1" }}
41+ TI_ENABLE_OPENGL : ${{ matrix.PYTEST_FLAGS == "-m required" && "0" || "1" }}
42+ TI_ENABLE_VULKAN : ${{ matrix.PYTEST_FLAGS == "-m required" && "0" || "1" }}
3143
3244 runs-on : ${{ matrix.OS }}
3345
5264 python-version : ${{ matrix.PYTHON_VERSION }}
5365
5466 - name : Install system dependencies (Windows)
55- if : startsWith(matrix.OS, ' windows-' )
67+ if : startsWith(matrix.OS, " windows-" )
5668 shell : bash
5769 run : |
5870 # FIXME: Updating to 25.1.0 breaks rendering regardless PYOPENGL_PLATFORM is set to osmesa or egl.
@@ -63,31 +75,43 @@ jobs:
6375
6476 echo "PYOPENGL_PLATFORM=osmesa" >> $GITHUB_ENV
6577
66- - name : Install system dependencies (Linux)
67- if : startsWith(matrix.OS, ' ubuntu-')
78+ - name : Install system dependencies (Linux CPU+GPU )
79+ if : startsWith(matrix.OS, " ubuntu-") || matrix.OS == "gpu-t4-4-core"
6880 run : |
6981 sudo apt-get update
7082 sudo apt install -y \
7183 libgl1 \
7284 libegl1 \
73- libglvnd-dev \
74- libglew-dev \
85+ libgles2 \
7586 libegl-dev \
76- libx11-6 \
77- libxrender1 \
7887 libglib2.0-0 \
7988 libosmesa6-dev \
80- libglx-mesa0 \
8189 libglu1-mesa \
90+ libglx-mesa0 \
8291 libegl1-mesa-dev \
8392 libgles2-mesa-dev
84- - name : Install python dependencies
93+ - name : Install system dependencies (Linux CPU only)
94+ if : startsWith(matrix.OS, "ubuntu-")
95+ run : |
96+ sudo apt install -y \
97+ libglew-dev \
98+ libglvnd-dev \
99+ libxrender1 \
100+ libx11-6
101+ - name : Install python dependencies (Generic CPU+GPU)
85102 run : |
86103 pip install --upgrade pip setuptools pkg-info wheel
104+ - name : Install python dependencies (MacOS)
105+ if : startsWith(matrix.OS, "macos-")
106+ run : |
87107 pip install torch
108+ - name : Install python dependencies (Not MacOS)
109+ if : ${{ !startsWith(matrix.OS, "macos-") }}
110+ run : |
111+ pip install torch --index-url https://download.pytorch.org/whl/cu118
88112
89113 - name : Black Format Check
90- if : matrix.OS == ' ubuntu-22.04' && matrix.PYTHON_VERSION == ' 3.12'
114+ if : matrix.OS == " ubuntu-22.04" && matrix.PYTHON_VERSION == " 3.12"
91115 run : |
92116 pip install black
93117 black --line-length 120 --check .
98122
99123 - name : Run unit tests
100124 run : |
101- pytest -v --forked -m required ./tests
125+ pytest -v --forked ${{ matrix.PYTEST_FLAGS }} ./tests
102126
103127 - name : Save Updated Taichi Kernel Cache
104128 if : always()
0 commit comments