Skip to content

Commit e23f188

Browse files
committed
Revert "CI: Drop Ubuntu s390x temporarily."
This reverts commit c3c74e0.
1 parent 76810fc commit e23f188

File tree

1 file changed

+193
-0
lines changed

1 file changed

+193
-0
lines changed

.github/workflows/ubuntu-ibm.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: Ubuntu IBM
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'doc/**'
6+
- '**/man/*'
7+
- '**.md'
8+
- '**.rdoc'
9+
- '**/.document'
10+
- '.*.yml'
11+
pull_request:
12+
# Do not use paths-ignore for required status checks
13+
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
14+
merge_group:
15+
16+
concurrency:
17+
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
18+
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
make:
25+
strategy:
26+
matrix:
27+
test_task: [check]
28+
configure: ['']
29+
arch: ['']
30+
os:
31+
# FIXME Comment out ppc64le due to failing tests on GitHub Actions
32+
# ppc64le
33+
# https://bugs.ruby-lang.org/issues/21534
34+
# - ubuntu-24.04-ppc64le
35+
- ubuntu-24.04-s390x
36+
# The ppc64le/s390x runners work only in the registered repositories.
37+
# They don't work in forked repositories.
38+
# https://github.com/IBM/actionspz/blob/main/docs/FAQ.md#what-about-forked-repos
39+
upstream:
40+
- ${{ github.repository == 'ruby/ruby' }}
41+
exclude:
42+
- os: ubuntu-24.04-ppc64le
43+
upstream: false
44+
- os: ubuntu-24.04-s390x
45+
upstream: false
46+
fail-fast: false
47+
48+
env:
49+
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
50+
RUBY_DEBUG: ci
51+
52+
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
53+
54+
if: >-
55+
${{!(false
56+
|| contains(github.event.head_commit.message, '[DOC]')
57+
|| contains(github.event.pull_request.title, '[DOC]')
58+
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
59+
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
60+
)}}
61+
62+
steps:
63+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64+
with:
65+
sparse-checkout-cone-mode: false
66+
sparse-checkout: /.github
67+
68+
- uses: ./.github/actions/setup/ubuntu
69+
with:
70+
arch: ${{ matrix.arch }}
71+
72+
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
73+
with:
74+
ruby-version: '3.1'
75+
bundler: none
76+
if: ${{ !endsWith(matrix.os, 'arm') && !endsWith(matrix.os, 'ppc64le') && !endsWith(matrix.os, 's390x') }}
77+
78+
# Avoid possible test failures with the zlib applying the following patch
79+
# on s390x CPU architecture.
80+
# https://github.com/madler/zlib/pull/410
81+
- name: Disable DFLTCC
82+
run: echo "DFLTCC=0" >> $GITHUB_ENV
83+
working-directory:
84+
if: ${{ endsWith(matrix.os, 's390x') }}
85+
86+
# A temporary workaround: Set HOME env to pass the step
87+
# ./.github/actions/setup/directories.
88+
# https://github.com/IBM/actionspz/issues/30
89+
- name: Set HOME env
90+
run: |
91+
echo "HOME: #{HOME}"
92+
echo "HOME=$(ls -d ~)" >> $GITHUB_ENV
93+
working-directory:
94+
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
95+
96+
- uses: ./.github/actions/setup/directories
97+
with:
98+
srcdir: src
99+
builddir: build
100+
makeup: true
101+
clean: true
102+
dummy-files: ${{ matrix.test_task == 'check' }}
103+
# Set fetch-depth: 10 so that Launchable can receive commits information.
104+
fetch-depth: 10
105+
106+
- name: Run configure
107+
env:
108+
arch: ${{ matrix.arch }}
109+
configure: ${{ matrix.configure }}
110+
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' }}
116+
117+
- run: $SETARCH make
118+
119+
- run: $SETARCH make hello
120+
121+
- name: runirb
122+
run: |
123+
echo IRB::VERSION | $SETARCH make runirb RUNOPT="-- -f"
124+
125+
- name: Set test options for skipped tests
126+
run: |
127+
set -x
128+
TESTS="$(echo "${{ matrix.skipped_tests }}" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|')"
129+
echo "TESTS=${TESTS}" >> $GITHUB_ENV
130+
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
131+
132+
- name: Set up Launchable
133+
id: launchable
134+
uses: ./.github/actions/launchable/setup
135+
with:
136+
os: ${{ matrix.os || 'ubuntu-22.04' }}
137+
test-opts: ${{ matrix.configure }}
138+
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
139+
builddir: build
140+
srcdir: src
141+
continue-on-error: true
142+
timeout-minutes: 3
143+
144+
# A temporary workaround: Skip user ground id test
145+
# There is a mismatch between the group IDs of "id -g" and C function
146+
# getpwuid(uid_t uid) pw_gid.
147+
# https://github.com/IBM/actionspz/issues/31
148+
- name: Skip user group id test
149+
run: |
150+
sed -i.orig '/^ it "returns user group id" do/a\ skip' \
151+
../src/spec/ruby/library/etc/struct_passwd_spec.rb
152+
diff -u ../src/spec/ruby/library/etc/struct_passwd_spec.rb{.orig,} || :
153+
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
154+
155+
- name: make ${{ matrix.test_task }}
156+
run: |
157+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
158+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
159+
160+
$SETARCH make -s ${{ matrix.test_task }} \
161+
${TESTS:+TESTS="$TESTS"} \
162+
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
163+
timeout-minutes: ${{ matrix.timeout || 40 }}
164+
env:
165+
RUBY_TESTOPTS: '-q --tty=no'
166+
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
167+
PRECHECK_BUNDLED_GEMS: 'no'
168+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
169+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
170+
171+
- name: make skipped tests
172+
run: |
173+
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"
174+
env:
175+
GNUMAKEFLAGS: ''
176+
RUBY_TESTOPTS: '-v --tty=no'
177+
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
178+
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
179+
180+
- name: test-pc
181+
run: |
182+
DESTDIR=${RUNNER_TEMP-${TMPDIR-/tmp}}/installed
183+
$SETARCH make test-pc "DESTDIR=$DESTDIR"
184+
185+
- uses: ./.github/actions/slack
186+
with:
187+
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
188+
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
189+
if: ${{ failure() }}
190+
191+
defaults:
192+
run:
193+
working-directory: build

0 commit comments

Comments
 (0)