Skip to content

Commit

Permalink
ci: dynamically set thread-count
Browse files Browse the repository at this point in the history
Despite what GitHub states in their documentation, the runners feature a
different core count. Automatically set the build thread-count by the
amount of available CPU cores.

Link: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 3d81f51)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
  • Loading branch information
blocktrron authored and herbetom committed Mar 17, 2024
1 parent 999eb22 commit 2a94110
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/actions/run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ export GLUON_SITEDIR="contrib/ci/minimal-site"
export GLUON_TARGET="$1"
export BUILD_LOG=1

BUILD_THREADS="$(($(nproc) + 1))"

echo "Building Gluon with $BUILD_THREADS threads"

make update
make -j2 V=s
make -j$BUILD_THREADS V=s

0 comments on commit 2a94110

Please sign in to comment.