Skip to content

Commit

Permalink
[tmp] Try to fix windows ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmlnkn committed Nov 25, 2023
1 parent c20f135 commit 3f0c1e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -y install bzip2 pbzip2 lbzip2 g++ zlib1g-dev
echo "nproc: $( nproc )"
- name: Install Python Modules
run: |
Expand Down
3 changes: 2 additions & 1 deletion src/tests/testPythonWrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def openThroughGlobalFile(name, module):
if __name__ == '__main__':
print("indexed_bzip2 version:", indexed_bzip2.__version__)
print("rapidgzip version:", rapidgzip.__version__)
print("Cores:", os.cpu_count())

def test(openIndexedFileFromName, closeUnderlyingFile=None):
testPythonInterface(
Expand Down Expand Up @@ -395,7 +396,7 @@ def test(openIndexedFileFromName, closeUnderlyingFile=None):
# max_workers = max(1, os.cpu_count() // 2) # 12
# python3 real 0m44.114s, user 7m45.942s, sys 0m37.996s
# python3 -X dev real 8m2.940s, user 61m11.703s, sys 34m51.367s
max_workers = max(1, os.cpu_count() // 4)
max_workers = os.cpu_count() if 'CI' in os.environ else max(1, os.cpu_count() // 4)
with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor:
for input, output in zip(parameters, executor.map(testDecompression, parameters)):
assert output == True

0 comments on commit 3f0c1e6

Please sign in to comment.