From 3d81f519194f0516438b661f5e2a5aea54dd26f8 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 8 Nov 2023 00:37:21 +0100 Subject: [PATCH 1/2] ci: dynamically set thread-count 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 --- contrib/actions/run-build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/actions/run-build.sh b/contrib/actions/run-build.sh index cdff1e5048..942f921067 100755 --- a/contrib/actions/run-build.sh +++ b/contrib/actions/run-build.sh @@ -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 From 7bfe3ec68265cdd235043be10835ba065a04fc46 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 8 Nov 2023 00:42:10 +0100 Subject: [PATCH 2/2] ci: collect basic system information Collect some basic system information about the runners the CI jobs run on. This is done iwth the intention to have diagnostics information in advance in case builds fail spuriously in some instances. Signed-off-by: David Bauer --- .github/workflows/build-gluon.yml | 3 +++ contrib/actions/show-system-info.sh | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 contrib/actions/show-system-info.sh diff --git a/.github/workflows/build-gluon.yml b/.github/workflows/build-gluon.yml index c5d327f7ab..f395b9d566 100644 --- a/.github/workflows/build-gluon.yml +++ b/.github/workflows/build-gluon.yml @@ -41,6 +41,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Show system information + run: contrib/actions/show-system-info.sh + - name: Install Dependencies run: sudo contrib/actions/install-dependencies.sh diff --git a/contrib/actions/show-system-info.sh b/contrib/actions/show-system-info.sh new file mode 100755 index 0000000000..5e449e0917 --- /dev/null +++ b/contrib/actions/show-system-info.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +echo "-- CPU --" +cat /proc/cpuinfo + +echo "-- Memory --" +cat /proc/meminfo + +echo "-- Disk --" +df -h + +echo "-- Kernel --" +uname -a + +echo "-- Network --" +ip addr