Skip to content

Commit 1a74670

Browse files
authored
Merge branch 'master' into zjit-defined-ivar
2 parents 06a67da + 2b810ac commit 1a74670

100 files changed

Lines changed: 2318 additions & 1163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/compilers/entrypoint.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,7 @@ setup_launchable() {
8585
export LAUNCHABLE_SESSION_DIR=${builddir}
8686
local github_ref="${GITHUB_REF//\//_}"
8787
local build_name="${github_ref}"_"${GITHUB_PR_HEAD_SHA}"
88-
btest_report_path='launchable_bootstraptest.json'
89-
test_report_path='launchable_test_all.json'
90-
test_spec_report_path='launchable_test_spec_report'
91-
test_all_session_file='launchable_test_all_session.txt'
92-
btest_session_file='launchable_btest_session.txt'
93-
test_spec_session_file='launchable_test_spec_session.txt'
9488
btests+=--launchable-test-reports="${btest_report_path}"
95-
echo "::group::Setup Launchable"
9689
launchable record build --name "${build_name}" || true
9790
launchable record session \
9891
--build "${build_name}" \
@@ -135,8 +128,6 @@ setup_launchable() {
135128
> "${builddir}"/${test_spec_session_file} \
136129
|| true
137130
fi
138-
echo "::endgroup::"
139-
trap launchable_record_test EXIT
140131
}
141132
launchable_record_test() {
142133
pushd "${builddir}"
@@ -147,7 +138,20 @@ launchable_record_test() {
147138
fi
148139
}
149140
if [ "$LAUNCHABLE_ENABLED" = "true" ]; then
150-
setup_launchable
141+
echo "::group::Setup Launchable"
142+
btest_report_path='launchable_bootstraptest.json'
143+
test_report_path='launchable_test_all.json'
144+
test_spec_report_path='launchable_test_spec_report'
145+
test_all_session_file='launchable_test_all_session.txt'
146+
btest_session_file='launchable_btest_session.txt'
147+
test_spec_session_file='launchable_test_spec_session.txt'
148+
setup_launchable & setup_pid=$!
149+
(sleep 180; echo "setup_launchable timed out; killing"; kill "$setup_pid" 2> /dev/null) & sleep_pid=$!
150+
launchable_failed=false
151+
wait -f "$setup_pid" || launchable_failed=true
152+
kill "$sleep_pid" 2> /dev/null
153+
echo "::endgroup::"
154+
$launchable_failed || trap launchable_record_test EXIT
151155
fi
152156

153157
pushd ${builddir}

.github/actions/launchable/setup/action.yml

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ inputs:
5555
description: >-
5656
Whether this workflow is executed on YJIT.
5757
58+
outputs:
59+
stdout_report_path:
60+
value: ${{ steps.variables.outputs.stdout_report_path }}
61+
description: >-
62+
Report file path for standard output.
63+
64+
stderr_report_path:
65+
value: ${{ steps.variables.outputs.stderr_report_path }}
66+
description: >-
67+
Report file path for standard error.
68+
5869
runs:
5970
using: composite
6071

@@ -135,6 +146,7 @@ runs:
135146
if: steps.enable-launchable.outputs.enable-launchable && startsWith(inputs.os, 'macos')
136147

137148
- name: Set up Launchable
149+
id: setup-launchable
138150
shell: bash
139151
working-directory: ${{ inputs.srcdir }}
140152
run: |
@@ -224,6 +236,38 @@ runs:
224236
btest_report_file: ${{ steps.global.outputs.btest_report_file }}
225237
test_spec_report_dir: ${{ steps.global.outputs.test_spec_report_dir }}
226238

239+
- name: Clean up session files in Launchable
240+
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
241+
with:
242+
shell: bash
243+
working-directory: ${{ inputs.srcdir }}
244+
post: |
245+
rm -f "${test_all_session_file}"
246+
rm -f "${btest_session_file}"
247+
rm -f "${test_spec_session_file}
248+
if: always() && steps.setup-launchable.outcome == 'success'
249+
env:
250+
test_all_session_file: ${{ steps.global.outputs.test_all_session_file }}
251+
btest_session_file: ${{ steps.global.outputs.btest_session_file }}
252+
test_spec_session_file: ${{ steps.global.outputs.test_spec_session_file }}
253+
254+
- name: Clean up test results in Launchable
255+
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
256+
with:
257+
shell: bash
258+
working-directory: ${{ inputs.builddir }}
259+
post: |
260+
rm -f "${test_all_report_file}"
261+
rm -f "${btest_report_file}"
262+
rm -fr "${test_spec_report_dir}"
263+
rm -f launchable_stdout.log
264+
rm -f launchable_stderr.log
265+
if: always() && steps.setup-launchable.outcome == 'success'
266+
env:
267+
test_all_report_file: ${{ steps.global.outputs.test_all_report_file }}
268+
btest_report_file: ${{ steps.global.outputs.btest_report_file }}
269+
test_spec_report_dir: ${{ steps.global.outputs.test_spec_report_dir }}
270+
227271
- name: Variables to report Launchable
228272
id: variables
229273
shell: bash
@@ -300,15 +344,6 @@ runs:
300344
--session "$(cat "${test_spec_session_file}")" \
301345
raw ${test_spec_report_path}/* || true; \
302346
fi
303-
304-
rm -f "${test_all_session_file}"
305-
rm -f "${btest_session_file}"
306-
rm -f "${test_spec_session_file}"
307-
rm -f "${test_report_path}"
308-
rm -f "${btest_report_path}"
309-
rm -fr "${test_spec_report_path}"
310-
rm -f "${stdout_report_path}"
311-
rm -f "${stderr_report_path}"
312347
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
313348
env:
314349
test_report_path: ${{ steps.variables.outputs.test_report_path }}

.github/workflows/macos.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
116116

117117
- name: Set up Launchable
118+
id: launchable
118119
uses: ./.github/actions/launchable/setup
119120
with:
120121
os: ${{ matrix.os }}
@@ -123,6 +124,7 @@ jobs:
123124
builddir: build
124125
srcdir: src
125126
continue-on-error: true
127+
timeout-minutes: 3
126128

127129
- name: Set extra test options
128130
run: |
@@ -132,11 +134,8 @@ jobs:
132134

133135
- name: make ${{ matrix.test_task }}
134136
run: |
135-
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
136-
exec \
137-
> >(tee launchable_stdout.log) \
138-
2> >(tee launchable_stderr.log)
139-
fi
137+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
138+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
140139
141140
ulimit -c unlimited
142141
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
@@ -145,6 +144,8 @@ jobs:
145144
RUBY_TESTOPTS: '-q --tty=no'
146145
TEST_BUNDLED_GEMS_ALLOW_FAILURES: 'typeprof,rbs,repl_type_completor'
147146
PRECHECK_BUNDLED_GEMS: 'no'
147+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
148+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
148149

149150
- name: make skipped tests
150151
run: |

.github/workflows/mingw.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ jobs:
127127
srcdir: src
128128
test-tasks: '["test", "test-all", "test-spec"]'
129129
continue-on-error: true
130+
timeout-minutes: 3
130131

131132
- name: test
132133
timeout-minutes: 30

.github/workflows/modgc.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ jobs:
131131
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
132132

133133
- name: Set up Launchable
134+
id: launchable
134135
uses: ./.github/actions/launchable/setup
135136
with:
136137
os: ${{ matrix.os || 'ubuntu-22.04' }}
@@ -139,14 +140,12 @@ jobs:
139140
builddir: build
140141
srcdir: src
141142
continue-on-error: true
143+
timeout-minutes: 3
142144

143145
- name: make ${{ matrix.test_task }}
144146
run: |
145-
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
146-
exec \
147-
> >(tee launchable_stdout.log) \
148-
2> >(tee launchable_stderr.log)
149-
fi
147+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
148+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
150149
151150
$SETARCH make -s ${{ matrix.test_task }} \
152151
${TESTS:+TESTS="$TESTS"} \
@@ -156,6 +155,8 @@ jobs:
156155
RUBY_TESTOPTS: '-q --tty=no'
157156
TEST_BUNDLED_GEMS_ALLOW_FAILURES: 'typeprof,rbs,repl_type_completor'
158157
PRECHECK_BUNDLED_GEMS: 'no'
158+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
159+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
159160

160161
- name: make skipped tests
161162
run: |

.github/workflows/ubuntu.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
108108

109109
- name: Set up Launchable
110+
id: launchable
110111
uses: ./.github/actions/launchable/setup
111112
with:
112113
os: ${{ matrix.os || 'ubuntu-22.04' }}
@@ -115,14 +116,12 @@ jobs:
115116
builddir: build
116117
srcdir: src
117118
continue-on-error: true
119+
timeout-minutes: 3
118120

119121
- name: make ${{ matrix.test_task }}
120122
run: |
121-
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
122-
exec \
123-
> >(tee launchable_stdout.log) \
124-
2> >(tee launchable_stderr.log)
125-
fi
123+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
124+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
126125
127126
$SETARCH make -s ${{ matrix.test_task }} \
128127
${TESTS:+TESTS="$TESTS"} \
@@ -132,6 +131,8 @@ jobs:
132131
RUBY_TESTOPTS: '-q --tty=no'
133132
TEST_BUNDLED_GEMS_ALLOW_FAILURES: 'typeprof,rbs,repl_type_completor'
134133
PRECHECK_BUNDLED_GEMS: 'no'
134+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
135+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
135136

136137
- name: make skipped tests
137138
run: |

.github/workflows/windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ jobs:
188188
test-task: ${{ matrix.test_task || 'check' }}
189189
continue-on-error: true
190190
if: ${{ matrix.test_task != 'test-bundled-gems' }}
191+
timeout-minutes: 3
191192

192193
- run: nmake ${{ matrix.test_task || 'check' }}
193194
env:

.github/workflows/yjit-macos.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
131131

132132
- name: Set up Launchable
133+
id: launchable
133134
uses: ./.github/actions/launchable/setup
134135
with:
135136
os: macos-14
@@ -139,14 +140,12 @@ jobs:
139140
srcdir: src
140141
is-yjit: true
141142
continue-on-error: true
143+
timeout-minutes: 3
142144

143145
- name: make ${{ matrix.test_task }}
144146
run: |
145-
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
146-
exec \
147-
> >(tee launchable_stdout.log) \
148-
2> >(tee launchable_stderr.log)
149-
fi
147+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
148+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
150149
151150
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"} \
152151
RUN_OPTS="$RUN_OPTS" \
@@ -157,6 +156,8 @@ jobs:
157156
TEST_BUNDLED_GEMS_ALLOW_FAILURES: 'typeprof,rbs,repl_type_completor'
158157
SYNTAX_SUGGEST_TIMEOUT: '5'
159158
PRECHECK_BUNDLED_GEMS: 'no'
159+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
160+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
160161
continue-on-error: ${{ matrix.continue-on-test_task || false }}
161162

162163
- name: make skipped tests

.github/workflows/yjit-ubuntu.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ jobs:
178178
run: ./miniruby --yjit -v | grep "+YJIT"
179179

180180
- name: Set up Launchable
181+
id: launchable
181182
uses: ./.github/actions/launchable/setup
182183
with:
183184
os: ubuntu-22.04
@@ -187,14 +188,12 @@ jobs:
187188
srcdir: src
188189
is-yjit: true
189190
continue-on-error: true
191+
timeout-minutes: 3
190192

191193
- name: make ${{ matrix.test_task }}
192194
run: |
193-
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
194-
exec \
195-
> >(tee launchable_stdout.log) \
196-
2> >(tee launchable_stderr.log)
197-
fi
195+
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
196+
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
198197
199198
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"} \
200199
RUN_OPTS="$RUN_OPTS" MSPECOPT=--debug SPECOPTS="$SPECOPTS" \
@@ -207,6 +206,8 @@ jobs:
207206
SYNTAX_SUGGEST_TIMEOUT: '5'
208207
YJIT_BINDGEN_DIFF_OPTS: '--exit-code'
209208
LIBCLANG_PATH: ${{ matrix.libclang_path }}
209+
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
210+
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
210211
continue-on-error: ${{ matrix.continue-on-test_task || false }}
211212

212213
- name: Show ${{ github.event.pull_request.base.ref }} GitHub URL for yjit-bench comparison

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The following default gems are updated.
119119
* prism 1.4.0
120120
* psych 5.2.6
121121
* stringio 3.1.8.dev
122-
* strscan 3.1.5.dev
122+
* strscan 3.1.6.dev
123123
* uri 1.0.3
124124

125125
The following bundled gems are added.

0 commit comments

Comments
 (0)