Skip to content

Commit 80efe5a

Browse files
committed
Limit CPU number for make check.
1 parent de02d8e commit 80efe5a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,19 @@ jobs:
169169
diff -u ../src/spec/ruby/library/etc/struct_passwd_spec.rb{.orig,} || :
170170
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
171171

172+
# A temporary workaround: Limit CPU number for make check to avoid
173+
# failing tests due to timeout.
174+
# https://github.com/IBM/actionspz/issues/38
175+
- name: Limit CPU number
176+
run: echo "JOBS=-j$(nproc)" >> "$GITHUB_ENV"
177+
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
178+
172179
- name: make ${{ matrix.test_task }}
173180
run: |
174181
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
175182
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
176183
177-
$SETARCH make -s ${{ matrix.test_task }} \
184+
$SETARCH make -s $JOBS ${{ matrix.test_task }} \
178185
${TESTS:+TESTS="$TESTS"} \
179186
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
180187
timeout-minutes: ${{ matrix.timeout || 40 }}

0 commit comments

Comments
 (0)