Skip to content

Commit

Permalink
Limiting the number of parallel builds for python CI
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Sauter <[email protected]>
  • Loading branch information
COM8 committed Jul 27, 2022
1 parent 7ad254e commit 731b746
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def build_extension(self, 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)
Expand Down

0 comments on commit 731b746

Please sign in to comment.