Skip to content

Commit dd09d89

Browse files
committed
CI: ubuntu-ibm.yml: Refactor
* Remove logic that was used for the ubuntu.yml, but not used for ubuntu-ibm.yml. * Add a dummy Ubuntu x86_64 case to make this CI pass on fork repositories. This case only runs on fork repositories.
1 parent 8eb1ed5 commit dd09d89

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

.github/workflows/ubuntu-ibm.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
matrix:
2727
test_task: [check]
2828
configure: ['']
29-
arch: ['']
3029
os:
3130
# FIXME Comment out ppc64le due to failing tests on GitHub Actions
3231
# ppc64le
3332
# https://bugs.ruby-lang.org/issues/21534
3433
# - ubuntu-24.04-ppc64le
3534
- ubuntu-24.04-s390x
35+
# Add a x86_64 case to make this CI pass on fork repositories.
36+
- ubuntu-24.04
3637
# The ppc64le/s390x runners work only in the registered repositories.
3738
# They don't work in forked repositories.
3839
# https://github.com/IBM/actionspz/blob/main/docs/FAQ.md#what-about-forked-repos
@@ -43,13 +44,15 @@ jobs:
4344
upstream: false
4445
- os: ubuntu-24.04-s390x
4546
upstream: false
47+
- os: ubuntu-24.04
48+
upstream: true
4649
fail-fast: false
4750

4851
env:
4952
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
5053
RUBY_DEBUG: ci
5154

52-
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
55+
runs-on: ${{ matrix.os }}
5356

5457
if: >-
5558
${{!(false
@@ -66,14 +69,12 @@ jobs:
6669
sparse-checkout: /.github
6770

6871
- uses: ./.github/actions/setup/ubuntu
69-
with:
70-
arch: ${{ matrix.arch }}
7172

7273
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
7374
with:
7475
ruby-version: '3.1'
7576
bundler: none
76-
if: ${{ !endsWith(matrix.os, 'arm') && !endsWith(matrix.os, 'ppc64le') && !endsWith(matrix.os, 's390x') }}
77+
if: ${{ !endsWith(matrix.os, 'ppc64le') && !endsWith(matrix.os, 's390x') }}
7778

7879
# Avoid possible test failures with the zlib applying the following patch
7980
# on s390x CPU architecture.
@@ -105,22 +106,17 @@ jobs:
105106

106107
- name: Run configure
107108
env:
108-
arch: ${{ matrix.arch }}
109109
configure: ${{ matrix.configure }}
110110
run: >-
111-
$SETARCH ../src/configure -C --disable-install-doc ${configure:-cppflags=-DRUBY_DEBUG}
112-
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
113-
114-
- run: $SETARCH make prepare-gems
115-
if: ${{ matrix.test_task == 'test-bundled-gems' }}
111+
../src/configure -C --disable-install-doc ${configure:-cppflags=-DRUBY_DEBUG}
116112
117-
- run: $SETARCH make
113+
- run: make
118114

119-
- run: $SETARCH make hello
115+
- run: make hello
120116

121117
- name: runirb
122118
run: |
123-
echo IRB::VERSION | $SETARCH make runirb RUNOPT="-- -f"
119+
echo IRB::VERSION | make runirb RUNOPT="-- -f"
124120
125121
- name: Set test options for skipped tests
126122
run: |
@@ -133,7 +129,7 @@ jobs:
133129
id: launchable
134130
uses: ./.github/actions/launchable/setup
135131
with:
136-
os: ${{ matrix.os || 'ubuntu-22.04' }}
132+
os: ${{ matrix.os }}
137133
test-opts: ${{ matrix.configure }}
138134
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
139135
builddir: build
@@ -157,7 +153,7 @@ jobs:
157153
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
158154
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
159155
160-
$SETARCH make -s ${{ matrix.test_task }} \
156+
make -s ${{ matrix.test_task }} \
161157
${TESTS:+TESTS="$TESTS"} \
162158
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
163159
timeout-minutes: ${{ matrix.timeout || 40 }}
@@ -170,7 +166,7 @@ jobs:
170166

171167
- name: make skipped tests
172168
run: |
173-
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"
169+
make -s test-all TESTS="${TESTS//-n!\//-n/}"
174170
env:
175171
GNUMAKEFLAGS: ''
176172
RUBY_TESTOPTS: '-v --tty=no'
@@ -180,11 +176,11 @@ jobs:
180176
- name: test-pc
181177
run: |
182178
DESTDIR=${RUNNER_TEMP-${TMPDIR-/tmp}}/installed
183-
$SETARCH make test-pc "DESTDIR=$DESTDIR"
179+
make test-pc "DESTDIR=$DESTDIR"
184180
185181
- uses: ./.github/actions/slack
186182
with:
187-
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
183+
label: ${{ matrix.test_task }} ${{ matrix.configure }}
188184
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
189185
if: ${{ failure() }}
190186

0 commit comments

Comments
 (0)