Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37bb861

Browse files
committed
Merge branch 'master' into remove-dependency-from-cont.h-to-prism
2 parents ad11a0d + b897a47 commit 37bb861

File tree

717 files changed

+50108
-40219
lines changed

Some content is hidden

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

717 files changed

+50108
-40219
lines changed

.gdbinit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ define rp
5151
printf "%sT_OBJECT%s: ", $color_type, $color_end
5252
print ((struct RObject *)($arg0))->basic
5353
if ($flags & ROBJECT_EMBED)
54-
print/x *((VALUE*)((struct RObject*)($arg0))->as.ary) @ (rb_shape_get_shape($arg0)->capacity)
54+
print/x *((VALUE*)((struct RObject*)($arg0))->as.ary) @ (RSHAPE_CAPACITY(rb_obj_shape_id($arg0)))
5555
else
5656
print (((struct RObject *)($arg0))->as.heap)
5757
if (((struct RObject*)($arg0))->as.heap.numiv) > 0

.github/actions/capiext/action.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: rubyspec C-API extensions
2+
3+
inputs:
4+
builddir:
5+
required: false
6+
default: '.'
7+
make:
8+
required: false
9+
default: 'make -s'
10+
11+
outputs:
12+
key:
13+
value: >-
14+
${{
15+
!steps.restore.outputs.cache-hit &&
16+
github.ref == 'refs/heads/master' &&
17+
steps.config.outputs.key
18+
}}
19+
20+
runs:
21+
using: composite
22+
23+
steps:
24+
- id: config
25+
shell: bash
26+
run: |
27+
eval $(grep -e '^arch *=' -e '^ruby_version *=' -e '^DLEXT *=' Makefile |
28+
sed 's/ *= */=/')
29+
case "${ruby_version}" in
30+
*+*) key=capiexts-${arch}-${ruby_version};;
31+
*) key=;;
32+
esac
33+
echo version=$ruby_version >> $GITHUB_OUTPUT
34+
echo key=$key >> $GITHUB_OUTPUT
35+
echo DLEXT=$DLEXT >> $GITHUB_OUTPUT
36+
working-directory: ${{ inputs.builddir }}
37+
38+
- name: CAPI extensions cache
39+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
40+
id: cache
41+
with:
42+
path: ${{ inputs.builddir }}/spec/ruby/optional/capi/ext/
43+
key: ${{ steps.config.outputs.key }}
44+
if: ${{ steps.config.outputs.key }}
45+
46+
- name: Run test-spec with previous CAPI extension binaries
47+
id: check
48+
shell: bash
49+
run: |
50+
touch spec/ruby/optional/capi/ext/*.$DLEXT
51+
[ ! -f spec/ruby/optional/capi/ext/\*.$DLEXT ]
52+
${{ inputs.make }} SPECOPTS=optional/capi test-spec
53+
env:
54+
DLEXT: ${{ steps.config.outputs.DLEXT }}
55+
working-directory: ${{ inputs.builddir }}
56+
if: ${{ steps.cache.outputs.cache-hit }}
57+
58+
- shell: bash
59+
run: |
60+
echo "::error::Change from ${prev} detected; bump up ABI version"
61+
env:
62+
prev: ${{ steps.config.outputs.version }}
63+
if: ${{ always() && steps.check.outcome == 'failure' }}

.github/actions/compilers/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export CONFIGURE_TTY='never'
2626
export RUBY_DEBUG='ci rgengc'
2727
export RUBY_TESTOPTS='-q --color=always --tty=no'
2828
export RUBY_DEBUG_COUNTER_DISABLE='1'
29-
export GNUMAKEFLAGS="-j$((1 + $(nproc --all)))"
29+
export GNUMAKEFLAGS="-j$((1 + $(nproc)))"
3030

3131
case "x${INPUT_ENABLE_SHARED}" in
3232
x | xno | xfalse )

.github/actions/setup/directories/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ runs:
8888
git config --global init.defaultBranch garbage
8989
9090
- if: inputs.checkout
91-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
9292
with:
9393
path: ${{ inputs.srcdir }}
9494
fetch-depth: ${{ inputs.fetch-depth }}
9595

96-
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
96+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
9797
with:
9898
path: ${{ inputs.srcdir }}/.downloaded-cache
99-
key: downloaded-cache
99+
key: ${{ runner.os }}-${{ runner.arch }}-downloaded-cache
100100

101101
- if: steps.which.outputs.autoreconf
102102
shell: bash
@@ -110,7 +110,7 @@ runs:
110110

111111
- if: runner.os == 'Linux'
112112
shell: bash
113-
run: echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> "$GITHUB_ENV"
113+
run: echo "GNUMAKEFLAGS=-sj$((1 + $(nproc)))" >> "$GITHUB_ENV"
114114

115115
# macOS' GNU make is so old that they doesn't understand `GNUMAKEFLAGS`.
116116
- if: runner.os == 'macOS'

.github/auto_request_review.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ files:
1010
'zjit/src/cruby_bindings.inc.rs': []
1111
'doc/zjit*': [team:jit]
1212
'test/ruby/test_zjit*': [team:jit]
13-
'test/.excludes-zjit/*': [team:jit]
1413
'defs/jit.mk': [team:jit]
1514
options:
1615
ignore_draft: true

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ updates:
1616
directory: '/yjit'
1717
schedule:
1818
interval: 'daily'
19+
- package-ecosystem: 'vcpkg'
20+
directory: '/'
21+
schedule:
22+
interval: 'daily'

.github/workflows/annocheck.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ jobs:
3939
if: >-
4040
${{!(false
4141
|| contains(github.event.head_commit.message, '[DOC]')
42-
|| contains(github.event.head_commit.message, 'Document')
4342
|| contains(github.event.pull_request.title, '[DOC]')
44-
|| contains(github.event.pull_request.title, 'Document')
4543
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
4644
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
4745
)}}
@@ -63,7 +61,7 @@ jobs:
6361
- run: id
6462
working-directory:
6563

66-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6765
with:
6866
sparse-checkout-cone-mode: false
6967
sparse-checkout: /.github
@@ -74,7 +72,7 @@ jobs:
7472
builddir: build
7573
makeup: true
7674

77-
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
75+
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
7876
with:
7977
ruby-version: '3.1'
8078
bundler: none

.github/workflows/baseruby.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ jobs:
3535
if: >-
3636
${{!(false
3737
|| contains(github.event.head_commit.message, '[DOC]')
38-
|| contains(github.event.head_commit.message, 'Document')
3938
|| contains(github.event.pull_request.title, '[DOC]')
40-
|| contains(github.event.pull_request.title, 'Document')
4139
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
4240
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
4341
)}}
@@ -50,12 +48,12 @@ jobs:
5048
- ruby-3.3
5149

5250
steps:
53-
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
51+
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
5452
with:
5553
ruby-version: ${{ matrix.ruby }}
5654
bundler: none
5755

58-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5957

6058
- uses: ./.github/actions/setup/ubuntu
6159

.github/workflows/bundled_gems.yml

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232

3333
steps:
34-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3535
with:
3636
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
3737

@@ -82,6 +82,67 @@ jobs:
8282
echo gems=$gems >> $GITHUB_OUTPUT
8383
echo update=${news:-$gems} >> $GITHUB_OUTPUT
8484
85+
- name: Commit
86+
id: commit
87+
run: |
88+
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
89+
message="Update bundled gems list"
90+
if [ -z "${gems}" ]; then
91+
git commit --message="[DOC] ${message} at ${GITHUB_SHA:0:30}"
92+
else
93+
git commit --message="${message} as of ${TODAY}"
94+
fi
95+
env:
96+
TODAY: ${{ steps.bundled_gems.outputs.latest_date || env.TODAY }}
97+
98+
GIT_AUTHOR_NAME: git
99+
GIT_COMMITTER_NAME: git
100+
gems: ${{ steps.diff.outputs.gems }}
101+
if: ${{ steps.diff.outputs.update }}
102+
103+
- name: Development revision of bundled gems
104+
run: |
105+
#!ruby
106+
file = "gems/bundled_gems"
107+
108+
SECONDS_IN_DAY = 86400
109+
today = Time.new("#{ENV['TODAY']}Z")
110+
if !(december = today.month == 12)
111+
days = 30
112+
elsif (days = 26 - today.day).positive?
113+
days += 4
114+
else
115+
puts "::info:: just after released"
116+
exit
117+
end
118+
119+
since = "#{today.year-1}-12-26"
120+
ref = ENV['GITHUB_REF']
121+
puts "::group::\e[94mfetching \e[1m#{file}\e[22m since \e[1m#{since}\e[22m from \e[1m#{ref}\e[m"
122+
system(*%W[git fetch --shallow-since=#{since} --no-tags origin #{ref}], exception: true)
123+
puts "::endgroup::"
124+
125+
puts "\e[94mchecking development version bundled gems older than \e[1m#{days}\e[22m days\e[m"
126+
limit = today.to_i - days * SECONDS_IN_DAY
127+
old = 0
128+
IO.popen(%W"git blame --line-porcelain -- #{file}") do |blame|
129+
while head = blame.gets("\n\t") and s = blame.gets
130+
next unless (gem = s.split(/\s+|#.*/)).size > 3
131+
time = head[/^committer-time \K\d+/].to_i
132+
next if (d = limit - time) <= 0
133+
d /= SECONDS_IN_DAY
134+
line = head[/\A\h+ \d+ \K\d+/].to_i
135+
level = if d < days; 'warning'; else old += 1; 'error'; end
136+
d += days
137+
puts "::#{level} file=#{file},line=#{line},title=Older than #{d} days::#{gem[0]} #{gem[3]}"
138+
end
139+
end
140+
abort "::error title=Too long-standing gems::The release comes soon." if december and old.nonzero?
141+
shell: ruby {0}
142+
env:
143+
file: ${{ steps.logs.outputs.file }}
144+
days: ${{ steps.logs.outputs.days }}
145+
85146
- name: Install libraries
86147
uses: ./.github/actions/setup/ubuntu
87148
if: ${{ steps.diff.outputs.gems }}
@@ -107,27 +168,14 @@ jobs:
107168
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
108169
if: ${{ steps.diff.outputs.gems }}
109170

110-
- name: Commit
171+
- name: Push
111172
run: |
112-
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
113-
message="Update bundled gems list"
114-
if [ -z "${gems}" ]; then
115-
git commit --message="[DOC] ${message} at ${GITHUB_SHA:0:30}"
116-
else
117-
git commit --message="${message} as of ${TODAY}"
118-
fi
119173
git push origin ${GITHUB_REF#refs/heads/}
120-
env:
121-
TODAY: ${{ steps.bundled_gems.outputs.latest_date || env.TODAY }}
122-
123-
GIT_AUTHOR_NAME: git
124-
GIT_COMMITTER_NAME: git
125-
gems: ${{ steps.diff.outputs.gems }}
126174
if: >-
127175
${{
128176
github.repository == 'ruby/ruby' &&
129177
!startsWith(github.event_name, 'pull') &&
130-
steps.diff.outputs.update
178+
steps.commit.outcome == 'success'
131179
}}
132180
133181
- uses: ./.github/actions/slack

.github/workflows/check_dependencies.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ matrix.os }}
3131

3232
steps:
33-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3434

3535
- uses: ./.github/actions/setup/ubuntu
3636
if: ${{ contains(matrix.os, 'ubuntu') }}
@@ -40,19 +40,15 @@ jobs:
4040

4141
- uses: ./.github/actions/setup/directories
4242

43-
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
43+
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
4444
with:
4545
ruby-version: '3.1'
4646
bundler: none
4747

4848
- name: Run configure
4949
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
5050

51-
- run: make all golf
52-
53-
- run: ./goruby -veh
54-
55-
- run: ruby tool/update-deps --fix
51+
- run: make fix-depends
5652

5753
- run: git diff --no-ext-diff --ignore-submodules --exit-code
5854

0 commit comments

Comments
 (0)