]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Adjust thread counts for compiles and tests to avoid under-utilization and congestion.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 9 Feb 2023 00:51:09 +0000 (01:51 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 9 Feb 2023 09:42:28 +0000 (10:42 +0100)
The free Github Actions VMs have 2 cores, the dedicated s390x VM has 4 cores.

.github/workflows/analyze.yml
.github/workflows/cmake.yml
.github/workflows/libpng.yml
.github/workflows/link.yml
.github/workflows/pigz.yml
.github/workflows/release.yml
test/pkgcheck.sh

index 17333d244c266c0c2d097a88939ec962ead5c936..cbdea0e504e73eb2fe2508caeb4768e67ffa1222 100644 (file)
@@ -49,7 +49,7 @@ jobs:
         CI: true
 
     - name: Compile source code
-      run: cmake --build . --config Release > /dev/null
+      run: cmake --build . -j2 --config Release > /dev/null
 
   Clang:
     runs-on: ubuntu-latest
@@ -75,4 +75,4 @@ jobs:
     - name: Compile source code
       run: |
         scan-build --status-bugs \
-          cmake --build . --config Release > /dev/null
+          cmake --build . -j2 --config Release > /dev/null
index b214288261e46a40a33f846e090ec9dde253da6d..b0cde4246f4cce04ada8d7ff712cd97365e982af 100644 (file)
@@ -231,6 +231,8 @@ jobs:
             packages: qemu qemu-user gcc-s390x-linux-gnu g++-s390x-linux-gnu libc-dev-s390x-cross
             ldflags: -static
             codecov: ubuntu_gcc_s390x
+            # The dedicated test VM has 4 cores
+            parallels-jobs: 4
 
           - name: Ubuntu GCC S390X No vectorized CRC32 ASAN
             os: ubuntu-latest
@@ -239,6 +241,8 @@ jobs:
             packages: qemu qemu-user gcc-s390x-linux-gnu g++-s390x-linux-gnu libc-dev-s390x-cross
             ldflags: -static
             codecov: ubuntu_gcc_s390x_no_crc32
+            # The dedicated test VM has 4 cores
+            parallels-jobs: 4
 
           - name: Ubuntu GCC S390X DFLTCC ASAN
             os: z15
@@ -248,6 +252,8 @@ jobs:
             asan-options: detect_leaks=0
             ldflags: -static
             codecov: ubuntu_gcc_s390x_dfltcc
+            # The dedicated test VM has 4 cores
+            parallels-jobs: 4
 
           - name: Ubuntu GCC S390X DFLTCC Compat UBSAN
             os: z15
@@ -256,12 +262,16 @@ jobs:
             cmake-args: -DZLIB_COMPAT=ON -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON -DWITH_SANITIZER=Undefined
             ldflags: -static
             codecov: ubuntu_gcc_s390x_dfltcc_compat
+            # The dedicated test VM has 4 cores
+            parallels-jobs: 4
 
           - name: Ubuntu Clang S390X DFLTCC MSAN
             os: z15
             compiler: clang-11
             cxx-compiler: clang++-11
             cmake-args: -GNinja -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON -DWITH_SANITIZER=Memory
+            # The dedicated test VM has 4 cores
+            parallels-jobs: 4
 
           - name: Ubuntu MinGW i686
             os: ubuntu-22.04
@@ -524,7 +534,7 @@ jobs:
           -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
           -DLLVM_USE_SANITIZER=MemoryWithOrigins \
           -DLLVM_LIBC_ENABLE_LINTING=OFF
-        cmake --build llvm-project/build -- cxx cxxabi
+        cmake --build llvm-project/build -j2 -- cxx cxxabi
         echo "LLVM_BUILD_DIR=`pwd`/llvm-project/build" >> $GITHUB_ENV
       env:
         CC: ${{ matrix.compiler }}
@@ -548,12 +558,12 @@ jobs:
         CI: true
 
     - name: Compile source code
-      run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }}
+      run: cmake --build ${{ matrix.build-dir || '.' }} -j2 --config ${{ matrix.build-config || 'Release' }}
 
     - name: Run test cases
       # Don't run tests on Windows ARM
       if: runner.os != 'Windows' || contains(matrix.name, 'ARM') == false
-      run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '6' }}
+      run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }}
       working-directory: ${{ matrix.build-dir || '.' }}
       env:
         ASAN_OPTIONS: ${{ matrix.asan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1
index 9118a96c81de2336634b2179b676fdf602f8d0ba..c5fea574fe81b5dbad723e53ba1ed0876ab265ae 100644 (file)
@@ -21,7 +21,7 @@ jobs:
         CI: true
 
     - name: Compile source code (zlib-ng)
-      run: cmake --build . --config Release
+      run: cmake --build . -j2 --config Release
 
     - name: Checkout repository (libpng)
       uses: actions/checkout@v3
@@ -43,9 +43,9 @@ jobs:
         CI: true
 
     - name: Compile source code (libpng)
-      run: cmake --build . --config Release
+      run: cmake --build . -j2 --config Release
       working-directory: libpng
 
     - name: Run test cases (libpng)
-      run: ctest -C Release --output-on-failure --max-width 120
+      run: ctest -j2 -C Release --output-on-failure --max-width 120
       working-directory: libpng
index 918720f517e0e3a338d32db8b0ecf26d793a2ab6..5de669840f6544d81d2baf85e50fece2f8fd066a 100644 (file)
@@ -18,13 +18,13 @@ jobs:
       run: cmake -S zlib -B zlib/build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
 
     - name: Compile source code (zlib)
-      run: cmake --build zlib/build --config Release
+      run: cmake --build zlib/build -j2 --config Release
 
     - name: Generate project files (native)
       run: cmake -S . -B native -DZLIB_COMPAT=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARIES=../zlib/build/libz.a -DZLIB_INCLUDE_DIR="../zlib/build;../zlib"
 
     - name: Compile source code (native)
-      run: cmake --build native --config Release
+      run: cmake --build native -j2 --config Release
 
     - name: Upload build errors
       uses: actions/upload-artifact@v3
@@ -47,13 +47,13 @@ jobs:
       run: cmake -S . -B compat -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DWITH_MAINTAINER_WARNINGS=ON
 
     - name: Compile source code (compat)
-      run: cmake --build compat --config Release
+      run: cmake --build compat -j2 --config Release
 
     - name: Generate project files (native)
       run: cmake -S . -B native -DZLIB_COMPAT=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARIES=../compat/libz.a -DZLIB_INCLUDE_DIR=../compat
 
     - name: Compile source code (native)
-      run: cmake --build native --config Release
+      run: cmake --build native -j2 --config Release
 
     - name: Upload build errors
       uses: actions/upload-artifact@v3
index e90cb63ab27ca080ff4cc8da406bce9ae6c46c46..be4e1ce5073a49987d06126ed97983b80da4c1a6 100644 (file)
@@ -89,11 +89,11 @@ jobs:
         CI: true
 
     - name: Compile source code
-      run: cmake --build . --config ${{ matrix.build-config || 'Release' }}
+      run: cmake --build . -j2 --config ${{ matrix.build-config || 'Release' }}
       working-directory: test/pigz
 
     - name: Run test cases
-      run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '2' }}
+      run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }}
       working-directory: test/pigz
 
     - name: Generate coverage report
index 768cf48bcb77ff496ce1b2f604af115730564904..b64933cc7c04fa894b0c2822539d39cafcbc66c4 100644 (file)
@@ -80,7 +80,7 @@ jobs:
         CI: true
 
     - name: Compile source code
-      run: cmake --build . --config Release --target install
+      run: cmake --build . -j2 --config Release --target install
 
     - name: Package release (Windows)
       if: runner.os == 'Windows'
index 4c757dff10a9510fa0d9c24c79755b03a9d5cd70..832df8dbefd50bed94ecc92ac2785bfe458c3e3e 100644 (file)
@@ -125,7 +125,7 @@ cd btmp1
     ;;
   esac
   ../configure $CONFIGURE_ARGS
-  make
+  make -j2
   make install
 cd ..