File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
actions/setup_environment Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,17 +37,20 @@ runs:
3737 restore-keys : |
3838 ${{ runner.os }}-npm-
3939 - name : Set GOMEMLIMIT
40+ shell : bash
4041 run : |
41- ratio="${{ inputs.memlimit_ratio }}"
42- # Get the memory limit from cgroups v2.
42+ ratio=${{ inputs.memlimit_ratio }}
4343 cgroup=$(awk -F':' '{print $3}' /proc/self/cgroup)
4444 cgroup_mem_limit=$(< "/sys/fs/cgroup/${cgroup}/memory.max")
4545 if [[ "${cgroup_mem_limit}" != "max" ]] ; then
4646 echo "${cgroup_mem_limit}" | awk -v "ratio=${ratio}" '{printf "GOMEMLIMIT=%.0fKiB\n", $1 / 1024 * ratio}' >> "$GITHUB_ENV"
4747 exit 0
4848 fi
49- # Fallback to the system memory limit.
5049 awk -v "ratio=${ratio}" '$1 == "MemTotal:" {printf "GOMEMLIMIT=%.0fKiB\n", $2 * ratio}' /proc/meminfo >> "$GITHUB_ENV"
50+ if : inputs.enable_go == 'true'
51+ - run : echo "GOMEMLIMIT=${GOMEMLIMIT}"
52+ shell : bash
53+ if : inputs.enable_go == 'true'
5154 - run : make promu
5255 shell : bash
5356 if : inputs.enable_go == 'true'
You can’t perform that action at this time.
0 commit comments