[MISC] Avoid rendering cameras at reset. #543
Workflow file for this run
This file contains hidden or 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: Generic | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| branches: | |
| - main | |
| types: [published] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| generic-cpu: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # See official Github documentation for details: https://shorturl.at/NJgsj | |
| OS: ["ubuntu-22.04", "ubuntu-24.04", "macos-15", "windows-cpu-4-core"] | |
| PYTHON_VERSION: ["3.10", "3.11", "3.12", "3.13"] | |
| env: | |
| HF_HUB_DOWNLOAD_TIMEOUT: 60 | |
| GS_CACHE_FILE_PATH: ".cache/genesis" | |
| TI_OFFLINE_CACHE: "1" | |
| TI_OFFLINE_CACHE_CLEANING_POLICY: "never" | |
| TI_OFFLINE_CACHE_FILE_PATH: ".cache/taichi" | |
| TI_ENABLE_CUDA: "0" | |
| TI_ENABLE_METAL: "0" | |
| TI_ENABLE_OPENGL: "0" | |
| TI_ENABLE_VULKAN: "0" | |
| runs-on: ${{ matrix.OS }} | |
| if: github.event_name != 'release' | |
| steps: | |
| - name: Print system information (Windows) | |
| if: startsWith(matrix.OS, 'windows-') | |
| shell: pwsh | |
| run: | | |
| $cpu = Get-CimInstance -ClassName Win32_Processor | |
| $ram = Get-CimInstance -ClassName Win32_ComputerSystem | |
| [PSCustomObject]@{ | |
| CPU_Name = $cpu.Name | |
| Physical_Cores = ($cpu | Measure-Object -Property NumberOfCores -Sum).Sum | |
| Logical_Processors = ($cpu | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum | |
| Total_RAM_GB = [math]::Round($ram.TotalPhysicalMemory / 1GB, 2) | |
| } | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Restore Taichi Kernel Cache | |
| if: always() | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: .cache | |
| key: ${{ matrix.OS }}-${{ matrix.PYTHON_VERSION }} | |
| restore-keys: | | |
| ${{ matrix.OS }}-${{ matrix.PYTHON_VERSION }}- | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.PYTHON_VERSION }} | |
| - name: Install system dependencies (Windows) | |
| if: startsWith(matrix.OS, 'windows-') | |
| shell: bash | |
| run: | | |
| curl -L -o mesa.7z https://github.com/pal1000/mesa-dist-win/releases/download/25.1.5/mesa3d-25.1.5-release-msvc.7z | |
| 7z x mesa.7z -omesa | |
| mv -v mesa/x64/* /C/Windows/System32/ | |
| - name: Install system dependencies (Linux) | |
| if: startsWith(matrix.OS, 'ubuntu-') | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y \ | |
| libgl1 \ | |
| libegl1 \ | |
| libglvnd-dev \ | |
| libglew-dev \ | |
| libegl-dev \ | |
| libx11-6 \ | |
| libxrender1 \ | |
| libglib2.0-0 \ | |
| libosmesa6-dev \ | |
| libglx-mesa0 \ | |
| libglu1-mesa \ | |
| libegl1-mesa-dev \ | |
| libgles2-mesa-dev | |
| - name: Install python dependencies | |
| run: | | |
| pip install --upgrade pip setuptools pkg-info wheel | |
| pip install torch | |
| - name: Black Format Check | |
| if: matrix.OS == 'ubuntu-22.04' && matrix.PYTHON_VERSION == '3.12' | |
| run: | | |
| pip install black | |
| black --line-length 120 --check . | |
| - name: Install Genesis | |
| run: | | |
| pip install -e '.[dev]' | |
| - name: Run unit tests | |
| run: | | |
| pytest -v --logical --forked -m required ./tests | |
| - name: Save Updated Taichi Kernel Cache | |
| if: always() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: .cache | |
| # Note that it is necessary to create a new archive systematically for now: | |
| # See: https://github.com/actions/cache/issues/1594 | |
| key: ${{ matrix.OS }}-${{ matrix.PYTHON_VERSION }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| publish-pypi: | |
| name: Publish on PyPI | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: advance | |
| if: github.event_name == 'release' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Build wheels | |
| run: | | |
| pip wheel --no-deps . -w wheelhouse | |
| - name: Publish the wheels on PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.12.4 | |
| with: | |
| packages-dir: wheelhouse | |
| verify-metadata: true | |
| attestations: true | |
| print-hash: true | |
| skip-existing: true |