Skip to content

Commit 6a8d91c

Browse files
committed
Merge branch 'mmtk' into support-macos
2 parents 8582bcb + 5ed7951 commit 6a8d91c

File tree

2,345 files changed

+67234
-92136
lines changed

Some content is hidden

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

2,345 files changed

+67234
-92136
lines changed

Diff for: .document

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ trace_point.rb
3131
warning.rb
3232
yjit.rb
3333

34+
# Errno::*
35+
known_errors.inc
36+
3437
# the lib/ directory (which has its own .document file)
3538
lib
3639

Diff for: .git-blame-ignore-revs

+4
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ fc4acf8cae82e5196186d3278d831f2438479d91
2626
# Make prism_compile.c indentation consistent
2727
40b2c8e5e7e6e5f83cee9276dc9c1922a69292d6
2828
d2c5867357ed88eccc28c2b3bd4a46e206e7ff85
29+
30+
# Miss-and-revived commits
31+
a0f7de814ae5c299d6ce99bed5fb308a05d50ba0
32+
d4e24021d39e1f80f0055b55d91f8d5f22e15084

Diff for: .github/CODEOWNERS

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# YJIT sources and tests
2+
yjit* @ruby/yjit
3+
yjit/**/* @ruby/yjit
4+
doc/yjit/* @ruby/yjit
5+
bootstraptest/test_yjit* @ruby/yjit
6+
test/ruby/test_yjit* @ruby/yjit
7+
yjit/src/cruby_bindings.inc.rs

Diff for: .github/actions/launchable/setup/action.yml

+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: Set up Launchable
2+
description: >-
3+
Install the required dependencies and execute the necessary Launchable commands for test recording
4+
5+
inputs:
6+
report-path:
7+
default: launchable_reports.json
8+
required: true
9+
description: The file path of the test report for uploading to Launchable
10+
11+
os:
12+
required: true
13+
description: The operating system that CI runs on. This value is used in Launchable flavor.
14+
15+
test-opts:
16+
default: none
17+
required: false
18+
description: >-
19+
Test options that determine how tests are run.
20+
This value is used in the Launchable flavor.
21+
22+
launchable-token:
23+
required: false
24+
description: >-
25+
Launchable token is needed if you want to run Launchable on your forked repository.
26+
See https://github.com/ruby/ruby/wiki/CI-Servers#launchable-ci for details.
27+
28+
builddir:
29+
required: false
30+
default: ${{ github.workspace }}
31+
description: >-
32+
Directory to create Launchable report file.
33+
34+
srcdir:
35+
required: false
36+
default: ${{ github.workspace }}
37+
description: >-
38+
Directory to (re-)checkout source codes. Launchable retrives the commit information
39+
from the directory.
40+
41+
outputs:
42+
enable-launchable:
43+
description: "The boolean value indicating whether Launchable is enabled or not"
44+
value: ${{ steps.enable-launchable.outputs.enable-launchable }}
45+
46+
runs:
47+
using: composite
48+
49+
steps:
50+
- name: Enable Launchable conditionally
51+
id: enable-launchable
52+
run: echo "enable-launchable=true" >> $GITHUB_OUTPUT
53+
shell: bash
54+
if: >-
55+
${{
56+
(github.repository == 'ruby/ruby' ||
57+
(github.repository != 'ruby/ruby' && env.LAUNCHABLE_TOKEN)) &&
58+
(matrix.test_task == 'check' || matrix.test_task == 'test-all')
59+
}}
60+
61+
# Launchable CLI requires Python and Java.
62+
# https://www.launchableinc.com/docs/resources/cli-reference/
63+
- name: Set up Python
64+
uses: actions/setup-python@871daa956ca9ea99f3c3e30acb424b7960676734 # v5.0.0
65+
with:
66+
python-version: "3.x"
67+
if: steps.enable-launchable.outputs.enable-launchable
68+
69+
- name: Set up Java
70+
uses: actions/setup-java@7a445ee88d4e23b52c33fdc7601e40278616c7f8 # v4.0.0
71+
with:
72+
distribution: 'temurin'
73+
java-version: '17'
74+
if: steps.enable-launchable.outputs.enable-launchable
75+
76+
- name: Set environment variables for Launchable
77+
shell: bash
78+
run: |
79+
: # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App.
80+
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42
81+
echo "GITHUB_PULL_REQUEST_URL=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
82+
: # The following envs are necessary in Launchable tokenless authentication.
83+
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20
84+
echo "LAUNCHABLE_ORGANIZATION=${{ github.repository_owner }}" >> $GITHUB_ENV
85+
echo "LAUNCHABLE_WORKSPACE=${{ github.event.repository.name }}" >> $GITHUB_ENV
86+
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71
87+
echo "GITHUB_PR_HEAD_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
88+
echo "LAUNCHABLE_TOKEN=${{ inputs.launchable-token }}" >> $GITHUB_ENV
89+
if: steps.enable-launchable.outputs.enable-launchable
90+
91+
- name: Set up Launchable
92+
shell: bash
93+
working-directory: ${{ inputs.srcdir }}
94+
run: |
95+
set -x
96+
PATH=$PATH:$(python -msite --user-base)/bin
97+
echo "PATH=$PATH" >> $GITHUB_ENV
98+
pip install --user launchable
99+
launchable verify
100+
: # The build name cannot include a slash, so we replace the string here.
101+
github_ref="${{ github.ref }}"
102+
github_ref="${github_ref//\//_}"
103+
: # With the --name option, we need to configure a unique identifier for this build.
104+
: # To avoid setting the same build name as the CI which runs on other branches, we use the branch name here.
105+
: #
106+
: # FIXME: Need to fix `WARNING: Failed to process a change to a file`.
107+
: # https://github.com/launchableinc/cli/issues/786
108+
launchable record build --name ${github_ref}_${GITHUB_PR_HEAD_SHA}
109+
echo "TESTS=${TESTS} --launchable-test-reports=${{ inputs.report-path }}" >> $GITHUB_ENV
110+
if: steps.enable-launchable.outputs.enable-launchable
111+
112+
- name: Variables to report Launchable
113+
id: variables
114+
shell: bash
115+
run: |
116+
set -x
117+
: # flavor
118+
test_opts="${{ inputs.test-opts }}"
119+
test_opts="${test_opts// /}"
120+
test_opts="${test_opts//=/:}"
121+
echo test-opts="$test_opts" >> $GITHUB_OUTPUT
122+
: # report-path from srcdir
123+
if [ "${srcdir}" = "${{ github.workspace }}" ]; then
124+
dir=
125+
else
126+
# srcdir must be equal to or under workspace
127+
dir=$(echo ${srcdir:+${srcdir}/} | sed 's:[^/][^/]*/:../:g')
128+
fi
129+
report_path="${dir}${builddir:+${builddir}/}${report_path}"
130+
echo report-path="${report_path}" >> $GITHUB_OUTPUT
131+
if: steps.enable-launchable.outputs.enable-launchable
132+
env:
133+
srcdir: ${{ inputs.srcdir }}
134+
builddir: ${{ inputs.builddir }}
135+
report_path: ${{ inputs.report-path }}
136+
137+
- name: Record test results in Launchable
138+
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
139+
with:
140+
shell: bash
141+
working-directory: ${{ inputs.srcdir }}
142+
post: |
143+
: # record
144+
launchable record tests --flavor os=${{ inputs.os }} --flavor test_task=${{ matrix.test_task }} --flavor test_opts=${test_opts} raw ${report_path}
145+
rm -f ${report_path}
146+
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
147+
env:
148+
test_opts: ${{ steps.variables.outputs.test-opts }}
149+
report_path: ${{ steps.variables.outputs.report-path }}

Diff for: .github/actions/setup/directories/action.yml

+40-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ inputs:
4444
description: >-
4545
If set to true, creates dummy files in build dir.
4646
47+
fetch-depth:
48+
required: false
49+
default: '1'
50+
description: The depth of commit history fetched from the remote repository
51+
52+
clean:
53+
required: false
54+
type: boolean
55+
default: ''
56+
description: >-
57+
If set to true, clean build directory.
58+
4759
outputs: {} # nothing?
4860

4961
runs:
@@ -79,8 +91,9 @@ runs:
7991
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8092
with:
8193
path: ${{ inputs.srcdir }}
94+
fetch-depth: ${{ inputs.fetch-depth }}
8295

83-
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
96+
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
8497
with:
8598
path: ${{ inputs.srcdir }}/.downloaded-cache
8699
key: downloaded-cache
@@ -129,9 +142,33 @@ runs:
129142
130143
- if: inputs.dummy-files == 'true'
131144
shell: bash
145+
id: dummy-files
132146
working-directory: ${{ inputs.builddir }}
133147
run: |
134148
: Create dummy files in build dir
135-
for basename in {a..z} {A..Z} {0..9} foo bar test zzz; do
136-
echo > ${basename}.rb "raise %(do not load ${basename}.rb)"
149+
set {{a..z},{A..Z},{0..9},foo,bar,test,zzz}.rb
150+
for file; do \
151+
echo > $file "raise 'do not load $file'"; \
137152
done
153+
# drop {a..z}.rb if case-insensitive filesystem
154+
grep -F A.rb a.rb > /dev/null && set "${@:27}"
155+
echo clean="cd ${{ inputs.builddir }} && rm $*" >> $GITHUB_OUTPUT
156+
157+
- if: inputs.clean == 'true'
158+
shell: bash
159+
id: clean
160+
run: |
161+
echo distclean='make -C ${{ inputs.builddir }} distclean' >> $GITHUB_OUTPUT
162+
echo remained-files='find ${{ inputs.builddir }} -ls' >> $GITHUB_OUTPUT
163+
[ "${{ inputs.builddir }}" = "${{ inputs.srcdir }}" ] ||
164+
echo final='rmdir ${{ inputs.builddir }}' >> $GITHUB_OUTPUT
165+
166+
- name: clean
167+
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
168+
with:
169+
working-directory:
170+
post: |
171+
${{ steps.dummy-files.outputs.clean }}
172+
${{ steps.clean.outputs.distclean }}
173+
${{ steps.clean.outputs.remained-files }}
174+
${{ steps.clean.outputs.final }}

Diff for: .github/actions/setup/macos/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ runs:
1313
- name: brew
1414
shell: bash
1515
run: |
16-
brew install --quiet gmp libffi [email protected] zlib autoconf automake libtool readline
16+
brew install --quiet gmp libffi [email protected] zlib autoconf automake libtool
1717
1818
- name: Set ENV
1919
shell: bash
2020
run: |
21-
for lib in [email protected] readline; do
21+
for lib in [email protected] gmp; do
2222
CONFIGURE_ARGS="${CONFIGURE_ARGS:+$CONFIGURE_ARGS }--with-${lib%@*}-dir=$(brew --prefix $lib)"
2323
done
2424
echo CONFIGURE_ARGS="${CONFIGURE_ARGS}" >> $GITHUB_ENV

Diff for: .github/auto_request_review.yml

-13
This file was deleted.

Diff for: .github/dependabot.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
version: 2
22
updates:
33
- package-ecosystem: 'github-actions'
4-
directory: '/.github'
4+
directory: '/'
5+
schedule:
6+
interval: 'daily'
7+
- package-ecosystem: 'github-actions'
8+
directory: '/.github/actions/slack'
9+
schedule:
10+
interval: 'daily'
11+
- package-ecosystem: 'github-actions'
12+
directory: '/.github/actions/setup/directories'
13+
schedule:
14+
interval: 'daily'
15+
- package-ecosystem: 'cargo'
16+
directory: '/yjit'
517
schedule:
618
interval: 'daily'

Diff for: .github/workflows/annocheck.yml

+8-22
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ on:
1818
- '**/.document'
1919
- '.*.yml'
2020
merge_group:
21-
paths-ignore:
22-
- 'doc/**'
23-
- '**/man'
24-
- '**.md'
25-
- '**.rdoc'
26-
- '**/.document'
27-
- '.*.yml'
2821

2922
concurrency:
3023
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
@@ -35,7 +28,7 @@ permissions:
3528

3629
jobs:
3730
compile:
38-
name: gcc-11 annocheck
31+
name: test-annocheck
3932

4033
runs-on: ubuntu-latest
4134

@@ -46,7 +39,9 @@ jobs:
4639
if: >-
4740
${{!(false
4841
|| contains(github.event.head_commit.message, '[DOC]')
42+
|| contains(github.event.head_commit.message, 'Documentation')
4943
|| contains(github.event.pull_request.title, '[DOC]')
44+
|| contains(github.event.pull_request.title, 'Documentation')
5045
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
5146
|| (github.event_name == 'push' && github.actor == 'dependabot[bot]')
5247
)}}
@@ -79,6 +74,11 @@ jobs:
7974
builddir: build
8075
makeup: true
8176

77+
- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
78+
with:
79+
ruby-version: '3.0'
80+
bundler: none
81+
8282
# Minimal flags to pass the check.
8383
# -g0 disables backtraces when SEGV. Do not set that.
8484
- name: Run configure
@@ -100,20 +100,6 @@ jobs:
100100

101101
- run: make
102102

103-
- run: make test
104-
105-
- run: make install
106-
107-
- run: make test-tool
108-
109-
### test-all doesn't work: https://github.com/ruby/ruby/actions/runs/4340112185/jobs/7578344307
110-
# - run: make test-all TESTS='-- ruby -ext-'
111-
112-
### test-spec doesn't work: https://github.com/ruby/ruby/actions/runs/4340193212/jobs/7578505652
113-
# - run: make test-spec
114-
# env:
115-
# CHECK_LEAKS: true
116-
117103
- run: make test-annocheck
118104

119105
- uses: ./.github/actions/slack

Diff for: .github/workflows/auto_request_review.yml

-19
This file was deleted.

0 commit comments

Comments
 (0)