Skip to content

Commit 746efc8

Browse files
authored
Merge pull request #162 from Shopify/merge_upstream
Merge upstream Ruby commits
2 parents c70bd20 + 4c4d88c commit 746efc8

File tree

311 files changed

+5731
-4406
lines changed

Some content is hidden

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

311 files changed

+5731
-4406
lines changed

.github/codeql/codeql-config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
name: "CodeQL config for the Ruby language"
22

3-
paths-ignore:
4-
- '/ext/**/*/conftest.c'
3+
languages: cpp

.github/workflows/baseruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
}
4343
env:
4444
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
45-
if: failure() && github.event_name == 'push'
45+
if: ${{ failure() && github.event_name == 'push' }}

.github/workflows/check_dependencies.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
set -x
1414
sudo apt-get update -q || :
1515
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
16-
if: "contains(matrix.os, 'ubuntu')"
16+
if: ${{ contains(matrix.os, 'ubuntu') }}
1717
- name: Install libraries
1818
run: |
1919
brew upgrade
2020
brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
21-
if: "contains(matrix.os, 'macos')"
21+
if: ${{ contains(matrix.os, 'macos') }}
2222
- name: git config
2323
run: |
2424
git config --global advice.detachedHead 0
@@ -42,4 +42,4 @@ jobs:
4242
}
4343
env:
4444
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
45-
if: failure() && github.event_name == 'push'
45+
if: ${{ failure() && github.event_name == 'push' }}

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ jobs:
2121
2222
- name: Checkout repository
2323
uses: actions/checkout@v2
24-
with:
25-
fetch-depth: 2
2624

2725
- name: Remove an obsolete rubygems vendored file
2826
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
2927

3028
- name: Initialize CodeQL
3129
uses: github/codeql-action/init@v1
3230
with:
33-
languages: cpp
3431
config-file: ./.github/codeql/codeql-config.yml
3532

3633
- name: Autobuild

.github/workflows/compilers.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Compilations
33
on: [push, pull_request]
44

55
# Github actions does not support YAML anchors. This creative use of
6-
# environment variables (plus the "echo ::set-env" hack) is to reroute that
6+
# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
77
# restriction.
88
env:
9-
default_cc: clang-13
9+
default_cc: clang-14
1010
append_cc: ''
1111
crosshost: ''
1212

1313
# -O1 is faster than -O3 in our tests... Majority of time are consumed trying
14-
# to optimize binaries. Also Github Actions runs on a relatively modern CPU
14+
# to optimize binaries. Also Github Actions run on relatively modern CPUs
1515
# compared to, say, GCC 4 or Clang 3. We don't specify `-march=native`
1616
# because compilers tend not understand what the CPU is.
1717
optflags: '-O1'
@@ -55,6 +55,7 @@ jobs:
5555
- { key: default_cc, name: gcc-6, value: gcc-6, container: gcc-6 }
5656
- { key: default_cc, name: gcc-5, value: gcc-5, container: gcc-5 }
5757
- { key: default_cc, name: gcc-4.8, value: gcc-4.8, container: gcc-4.8 }
58+
- { key: default_cc, name: clang-14, value: clang-14, container: clang-14 }
5859
- { key: default_cc, name: clang-13, value: clang-13, container: clang-13 }
5960
- { key: default_cc, name: clang-12, value: clang-12, container: clang-12 }
6061
- { key: default_cc, name: clang-11, value: clang-11, container: clang-11 }
@@ -87,7 +88,7 @@ jobs:
8788
- { key: CXXFLAGS, name: c++2a, value: '-std=c++2a -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' }
8889

8990
- { key: optflags, name: '-O0', value: '-O0 -march=x86-64 -mtune=generic' }
90-
# - { key: optflags, name: '-O3', value: '-O3 -march=x86-64 -mtune=generic' }
91+
# - { key: optflags, name: '-O3', value: '-O3 -march=x86-64 -mtune=generic', check: true }
9192

9293
- { key: append_configure, name: gmp, value: '--with-gmp' }
9394
- { key: append_configure, name: jemalloc, value: '--with-jemalloc' }
@@ -157,7 +158,7 @@ jobs:
157158

158159
name: ${{ matrix.entry.name }}
159160
runs-on: ubuntu-latest
160-
container: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || 'clang-13' }}
161+
container: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || 'clang-14' }}
161162
steps:
162163
- run: mkdir build
163164
working-directory:
@@ -171,33 +172,26 @@ jobs:
171172
- run: ./autogen.sh
172173
working-directory: src
173174
- name: Run configure
174-
run: |
175-
if [ -n "${crosshost}" ]; then
176-
../src/configure -C \
177-
${default_configure} \
178-
${append_configure} \
179-
--host="${crosshost}"
180-
else
181-
../src/configure -C \
182-
${default_configure} \
183-
${append_configure} \
184-
--with-gcc="${default_cc} ${append_cc}"
185-
fi
175+
run: ../src/configure -C ${default_configure} ${append_configure} --with-gcc="${default_cc} ${append_cc}"
176+
if: ${{ matrix.entry.key != 'crosshost' }}
177+
- name: Run cross configure
178+
run: ../src/configure -C ${default_configure} ${append_configure} --host="${crosshost}"
179+
if: ${{ matrix.entry.key == 'crosshost' }}
186180
- run: $make extract-extlibs
187181
- run: $make incs
188182
- run: $make
189183
# - run: $make leaked-globals
190184
- run: $make test
191185
- run: $make install
192-
if: "matrix.entry.name == '-O3'"
186+
if: ${{ matrix.entry.check }}
193187
- run: /usr/local/bin/gem install --no-doc timezone tzinfo
194-
if: "matrix.entry.name == '-O3'"
188+
if: ${{ matrix.entry.check }}
195189
- run: $make test-tool
196-
if: "matrix.entry.name == '-O3'"
190+
if: ${{ matrix.entry.check }}
197191
- run: $make test-all TESTS='-- ruby -ext-'
198-
if: "matrix.entry.name == '-O3'"
192+
if: ${{ matrix.entry.check }}
199193
- run: $make test-spec
200-
if: "matrix.entry.name == '-O3'"
194+
if: ${{ matrix.entry.check }}
201195

202196
- uses: k0kubun/action-slack@v2.0.0
203197
with:
@@ -211,7 +205,7 @@ jobs:
211205
}
212206
env:
213207
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
214-
if: failure() && github.event_name == 'push'
208+
if: ${{ failure() && github.event_name == 'push' }}
215209

216210
defaults:
217211
run:

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# - run: make leaked-globals
3737
# if: matrix.test_task == 'check'
3838
- run: make prepare-gems
39-
if: matrix.test_task == 'check'
39+
if: ${{ matrix.test_task == 'check' }}
4040
- run: make $JOBS -s ${{ matrix.test_task }}
4141
timeout-minutes: 60
4242
env:
@@ -54,7 +54,7 @@ jobs:
5454
}
5555
env:
5656
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
57-
if: failure() && github.event_name == 'push'
57+
if: ${{ failure() && github.event_name == 'push' }}
5858

5959
defaults:
6060
run:

.github/workflows/mingw.disabled

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
}
137137
env:
138138
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
139-
if: failure() && github.event_name == 'push'
139+
if: ${{ failure() && github.event_name == 'push' }}
140140

141141
defaults:
142142
run:

.github/workflows/mjit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
}
7171
env:
7272
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
73-
if: failure() && github.event_name == 'push'
73+
if: ${{ failure() && github.event_name == 'push' }}
7474

7575
defaults:
7676
run:

.github/workflows/spec_guards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
}
3636
env:
3737
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
38-
if: failure() && github.event_name == 'push'
38+
if: ${{ failure() && github.event_name == 'push' }}

.github/workflows/ubuntu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ jobs:
5050
# - run: make leaked-globals
5151
# if: matrix.test_task == 'check'
5252
- run: make prepare-gems
53-
if: matrix.test_task == 'check'
53+
if: ${{ matrix.test_task == 'check' }}
5454
- name: Create dummy files in build dir
5555
run: |
5656
./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
57-
if: matrix.test_task == 'check'
57+
if: ${{ matrix.test_task == 'check' }}
5858
- run: make $JOBS -s ${{ matrix.test_task }}
5959
timeout-minutes: 60
6060
env:
@@ -72,7 +72,7 @@ jobs:
7272
}
7373
env:
7474
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
75-
if: failure() && github.event_name == 'push'
75+
if: ${{ failure() && github.event_name == 'push' }}
7676

7777
defaults:
7878
run:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy