Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7c8862

Browse files
committed
Use local tox plugin to set the VTK_DEFAULT_OPENGL_WINDOW dynamically with CI variable
1 parent 31b5730 commit f7c8862

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

18-
env:
19-
VTK_DEFAULT_OPENGL_WINDOW: "vtkEGLRenderWindow"
20-
2118
permissions:
2219
id-token: none
2320

toxfile.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from __future__ import annotations # noqa: D100
2+
3+
import os
4+
from typing import TYPE_CHECKING
5+
6+
from tox.plugin import impl
7+
8+
if TYPE_CHECKING:
9+
from tox.config.sets import EnvConfigSet
10+
from tox.session.state import State
11+
12+
13+
@impl
14+
def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: ARG001, D103
15+
if env_conf.env_name != 'docs-build':
16+
return
17+
18+
if os.environ.get('CI', 'false').lower() == 'true':
19+
env_conf['set_env'].update({'VTK_DEFAULT_OPENGL_WINDOW': 'vtkEGLRenderWindow'})

0 commit comments

Comments
 (0)