Limiting the number of parallel builds for python CI
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
parent
7ad254e07a
commit
731b74610d
2 changed files with 6 additions and 1 deletions
4
.github/workflows/python_tests.yml
vendored
4
.github/workflows/python_tests.yml
vendored
|
|
@ -20,7 +20,9 @@ jobs:
|
|||
- name: Install Python Requirements
|
||||
run: pip3 install --user -r python/test/requirements-dev.txt
|
||||
- name: Python Build
|
||||
run: pip3 install --user .
|
||||
env:
|
||||
KOMPUTE_PYTHON_NUM_PARALLEL_THREADS: 2
|
||||
run: pip3 install --user . -v
|
||||
- name: Python run Tests
|
||||
run: |
|
||||
export VK_ICD_FILENAMES=/swiftshader/vk_swiftshader_icd.json
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -66,6 +66,9 @@ class CMakeBuild(build_ext):
|
|||
env['CXXFLAGS'] += ' -fPIC'
|
||||
cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
|
||||
build_args += ['--', '-j']
|
||||
# Optional environment variable to limit the number of parallel jobs for GitHub actions to reduce RAM usage
|
||||
if 'KOMPUTE_PYTHON_NUM_PARALLEL_THREADS' in env:
|
||||
build_args += env['KOMPUTE_PYTHON_NUM_PARALLEL_THREADS']
|
||||
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue