diff options
| author | tobtoht <tob@featherwallet.org> | 2025-02-07 06:50:43 +0100 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-02-08 02:58:03 +0100 |
| commit | 87a8e0b2ced6cc478a70de728d66f261df20bc72 (patch) | |
| tree | 50a9980f0f24f4a7aa7f6d62df66d6fd88f1ecf9 /.github/actions | |
| parent | 84e44dd0122cc4e532206bad01a25629deac3d9f (diff) | |
| download | monzero-core-87a8e0b2ced6cc478a70de728d66f261df20bc72.tar.gz monzero-core-87a8e0b2ced6cc478a70de728d66f261df20bc72.tar.xz monzero-core-87a8e0b2ced6cc478a70de728d66f261df20bc72.zip | |
ci: development build backports [0.18]
Diffstat (limited to '.github/actions')
| -rw-r--r-- | .github/actions/set-make-job-count/action.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/actions/set-make-job-count/action.yml b/.github/actions/set-make-job-count/action.yml new file mode 100644 index 000000000..68779ef3f --- /dev/null +++ b/.github/actions/set-make-job-count/action.yml @@ -0,0 +1,22 @@ +name: 'set-make-job-count' +description: 'Set the MAKE_JOB_COUNT environment variable to a value suitable for the host runner' +runs: + using: "composite" + steps: + # Each job runner requires 2.25 GiB (i.e. 1024 * 9/4 MiB) memory and + # a dedicated logical CPU core + - name: set-jobs-macOS + if: runner.os == 'macOS' + run: | + echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(sysctl -n hw.memsize) * 4 / (1073741824 * 9) )) $(sysctl -n hw.logicalcpu) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV + shell: bash + - name: set-jobs-windows + if: runner.os == 'Windows' + run: | + echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV + shell: msys2 {0} + - name: set-jobs-linux + if: runner.os == 'Linux' + run: | + echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV + shell: bash |
