This commit is contained in:
Jun Aruga 2025-08-15 02:46:14 +05:30 committed by GitHub
commit beaa35ee21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 10 additions and 3638 deletions

View file

@ -1,112 +0,0 @@
name: Annocheck
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
compile:
name: test-annocheck
runs-on: ubuntu-latest
container:
image: ghcr.io/ruby/ruby-ci-image:gcc-11
options: --user root
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
env:
CONFIGURE_TTY: never
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUBY_DEBUG: ci rgengc
RUBY_TESTOPTS: >-
-q
--color=always
--tty=no
# FIXME: Drop skipping options
# https://bugs.ruby-lang.org/issues/18061
# https://sourceware.org/annobin/annobin.html/Test-pie.html
TEST_ANNOCHECK_OPTS: '--skip-pie --skip-gaps'
steps:
- run: id
working-directory:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
# Minimal flags to pass the check.
# -g0 disables backtraces when SEGV. Do not set that.
- name: Run configure
run: >
../src/configure -C
--enable-debug-env
--disable-install-doc
--with-ext=-test-/cxxanyargs,+
--without-valgrind
--without-jemalloc
--without-gmp
--with-gcc="gcc-11 -fcf-protection -Wa,--generate-missing-build-notes=yes"
--enable-shared
debugflags=-ggdb3
optflags=-O2
LDFLAGS=-Wl,-z,now
- run: make showflags
- run: make
- run: make test-annocheck
- uses: ./.github/actions/slack
with:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
defaults:
run:
working-directory: build

View file

@ -1,20 +0,0 @@
name: Auto Request Review
on:
pull_request_target:
types: [opened, ready_for_review, reopened]
branches: [master]
permissions:
contents: read
jobs:
auto-request-review:
name: Auto Request Review
runs-on: ubuntu-latest
if: ${{ github.repository == 'ruby/ruby' && github.base_ref == 'master' }}
steps:
- name: Request review based on files changes and/or groups the author belongs to
uses: necojackarc/auto-request-review@e89da1a8cd7c8c16d9de9c6e763290b6b0e3d424 # v0.13.0
with:
# scope: public_repo
token: ${{ secrets.MATZBOT_AUTO_REQUEST_REVIEW_TOKEN }}

View file

@ -1,76 +0,0 @@
name: BASERUBY Check
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
baseruby:
name: BASERUBY
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
strategy:
matrix:
ruby:
- ruby-3.1
- ruby-3.2
- ruby-3.3
steps:
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup/ubuntu
- uses: ./.github/actions/setup/directories
with:
makeup: true
- run: ./configure --disable-install-doc
- run: make all
- run: make test
- uses: ./.github/actions/slack
with:
label: ${{ matrix.ruby }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -1,136 +0,0 @@
name: bundled_gems
on:
push:
branches: ['master']
paths:
- '.github/workflows/bundled_gems.yml'
- 'gems/bundled_gems'
pull_request:
branches: ['master']
paths:
- '.github/workflows/bundled_gems.yml'
- 'gems/bundled_gems'
merge_group:
schedule:
- cron: '45 6 * * *'
workflow_dispatch:
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
update:
permissions:
contents: write # for Git to git push
if: ${{ github.event_name != 'schedule' || github.repository == 'ruby/ruby' }}
name: update ${{ github.workflow }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup/directories
with:
# Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
- name: Set ENV
run: |
echo "TODAY=$(date +%F)" >> $GITHUB_ENV
- name: Download previous gems list
run: |
mkdir -p .downloaded-cache
for data in bundled_gems.json default_gems.json; do
ln -s .downloaded-cache/$data .
curl -O -R -z ./$data https://stdgems.org/$data
done
- name: Update bundled gems list
id: bundled_gems
run: |
ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems >> $GITHUB_OUTPUT
- name: Update spec/bundler/support/builders.rb
run: |
#!ruby
rake_version = File.read("gems/bundled_gems")[/^rake\s+(\S+)/, 1]
print ARGF.read.sub(/^ *def rake_version\s*\K".*?"/) {rake_version.dump}
shell: ruby -i~ {0} spec/bundler/support/builders.rb
- name: Maintain updated gems list in NEWS
run: |
ruby tool/update-NEWS-gemlist.rb bundled
- name: Check diffs
id: diff
run: |
news= gems=
git diff --color --no-ext-diff --ignore-submodules --exit-code -- NEWS.md ||
news=true
git diff --color --no-ext-diff --ignore-submodules --exit-code -- gems/bundled_gems ||
gems=true
git add -- NEWS.md gems/bundled_gems
git add -- spec/bundler/support/builders.rb
echo news=$news >> $GITHUB_OUTPUT
echo gems=$gems >> $GITHUB_OUTPUT
echo update=${news:-$gems} >> $GITHUB_OUTPUT
- name: Install libraries
uses: ./.github/actions/setup/ubuntu
if: ${{ steps.diff.outputs.gems }}
- name: Build
run: |
./autogen.sh
./configure -C --disable-install-doc
make
if: ${{ steps.diff.outputs.gems }}
- name: Prepare bundled gems
run: |
make -s prepare-gems
if: ${{ steps.diff.outputs.gems }}
- name: Test bundled gems
run: |
make -s test-bundled-gems
timeout-minutes: 30
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
if: ${{ steps.diff.outputs.gems }}
- name: Commit
run: |
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
message="Update bundled gems list"
if [ -z "${gems}" ]; then
git commit --message="[DOC] ${message} at ${GITHUB_SHA:0:30}"
else
git commit --message="${message} as of ${TODAY}"
fi
git push origin ${GITHUB_REF#refs/heads/}
env:
TODAY: ${{ steps.bundled_gems.outputs.latest_date || env.TODAY }}
EMAIL: svn-admin@ruby-lang.org
GIT_AUTHOR_NAME: git
GIT_COMMITTER_NAME: git
gems: ${{ steps.diff.outputs.gems }}
if: >-
${{
github.repository == 'ruby/ruby' &&
!startsWith(github.event_name, 'pull') &&
steps.diff.outputs.update
}}
- uses: ./.github/actions/slack
with:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -1,63 +0,0 @@
name: Check Dependencies
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
update-deps:
name: Dependency checks
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup/ubuntu
if: ${{ contains(matrix.os, 'ubuntu') }}
- uses: ./.github/actions/setup/macos
if: ${{ contains(matrix.os, 'macos') }}
- uses: ./.github/actions/setup/directories
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
- name: Run configure
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
- run: make all golf
- run: ./goruby -veh
- run: ruby tool/update-deps --fix
- run: git diff --no-ext-diff --ignore-submodules --exit-code
- uses: ./.github/actions/slack
with:
label: ${{ matrix.os }} / Dependencies need to update
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -1,120 +0,0 @@
name: Misc
on: [push, pull_request, merge_group]
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
checks:
name: Miscellaneous checks
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup/directories
with:
makeup: true
# Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
# Run this step first to make sure auto-style commits are pushed
- name: ${{ github.ref == 'refs/heads/master' && 'Auto-correct' || 'Check for' }} code styles
run: |
set -x
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" "$PUSH_REF"
env:
EMAIL: svn-admin@ruby-lang.org
GIT_AUTHOR_NAME: git
GIT_COMMITTER_NAME: git
GITHUB_OLD_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_NEW_SHA: ${{ github.event.pull_request.merge_commit_sha }}
PUSH_REF: ${{ github.ref == 'refs/heads/master' && github.ref || '' }}
if: ${{ github.repository == 'ruby/ruby' && startsWith(github.event_name, 'pull') }}
- name: Check if C-sources are US-ASCII
run: |
grep -r -n --include='*.[chyS]' --include='*.asm' $'[^\t-~]' -- . && exit 1 || :
- name: Check for bash specific substitution in configure.ac
run: |
git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac && exit 1 || :
- name: Check for header macros
run: |
fail=
for header in ruby/*.h; do
git grep -l -F -e $header -e HAVE_`echo $header | tr a-z./ A-Z__` -- . > /dev/null && continue
fail=1
echo $header
done
exit $fail
working-directory: include
- name: Check if to generate documents
id: rdoc
run: |
ref=$(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems | awk '{print $4}')
echo ref=$ref >> $GITHUB_OUTPUT
# Generate only when document commit/PR
if: >-
${{false
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
}}
- name: Checkout rdoc
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ruby/rdoc
ref: ${{ steps.rdoc.outputs.ref }}
path: .bundle/gems/rdoc-0
if: ${{ steps.rdoc.outputs.ref != '' }}
- name: Generate rdoc
run: |
set -x
gempath=$(ruby -e 'print Gem.user_dir, "/bin"')
PATH=$gempath:$PATH
gem install --user bundler
bundle config --local path vendor/bundle
bundle install --jobs 4
bundle exec rake generate
working-directory: .bundle/gems/rdoc-0
if: ${{ steps.rdoc.outputs.ref != '' }}
- name: Generate docs
id: docs
run: |
$RDOC -C -x ^ext -x ^lib .
$RDOC --op html .
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
env:
RDOC: ruby -W0 --disable-gems tool/rdoc-srcdir -q
if: ${{ steps.rdoc.outcome == 'success' }}
- name: Upload docs
uses: actions/upload-artifact@v4
with:
path: html
name: ${{ steps.docs.outputs.htmlout }}
if: ${{ steps.docs.outcome == 'success' }}
- uses: ./.github/actions/slack
with:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -1,123 +0,0 @@
name: 'CodeQL'
on:
push:
branches: ['master']
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
# CodeQL fails to run pull requests from dependabot due to missing write access to upload results.
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
env:
enable_install_doc: no
strategy:
fail-fast: false
matrix:
include:
- language: cpp
- language: ruby
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install libraries
if: ${{ contains(matrix.os, 'macos') }}
uses: ./.github/actions/setup/macos
- name: Install libraries
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/setup/ubuntu
- uses: ./.github/actions/setup/directories
- name: Remove an obsolete rubygems vendored file
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
- name: Initialize CodeQL
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
languages: ${{ matrix.language }}
trap-caching: false
debug: true
- name: Autobuild
uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
category: '/language:${{ matrix.language }}'
upload: False
output: sarif-results
- name: filter-sarif
uses: advanced-security/filter-sarif@f3b8118a9349d88f7b1c0c488476411145b6270d # v1.0.1
with:
patterns: |
+**/*.rb
-lib/uri/mailto.rb:rb/overly-large-range
-lib/uri/rfc3986_parser.rb:rb/overly-large-range
-lib/bundler/vendor/uri/lib/uri/mailto.rb:rb/overly-large-range
-lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb:rb/overly-large-range
-test/ruby/test_io.rb:rb/non-constant-kernel-open
-test/open-uri/test_open-uri.rb:rb/non-constant-kernel-open
-test/open-uri/test_ssl.rb:rb/non-constant-kernel-open
-spec/ruby/core/io/binread_spec.rb:rb/non-constant-kernel-open
-spec/ruby/core/io/readlines_spec.rb:rb/non-constant-kernel-open
-spec/ruby/core/io/foreach_spec.rb:rb/non-constant-kernel-open
-spec/ruby/core/io/write_spec.rb:rb/non-constant-kernel-open
-spec/ruby/core/io/read_spec.rb:rb/non-constant-kernel-open
-spec/ruby/core/kernel/open_spec.rb:rb/non-constant-kernel-open
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif
if: ${{ matrix.language == 'ruby' }}
continue-on-error: true
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
continue-on-error: true

View file

@ -1,339 +0,0 @@
# Some tests depending on this name 'Compilations' via $GITHUB_WORKFLOW. Make sure to update such tests when renaming this workflow.
name: Compilations
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
# Each job is split so that they roughly take 30min to run through.
jobs:
compile-if:
name: 'omnibus compilations, trigger'
runs-on: ubuntu-latest
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- run: true
working-directory:
compile1:
name: 'omnibus compilations, #1'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
# Set fetch-depth: 10 so that Launchable can receive commits information.
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- name: 'clang 18 LTO'
uses: './.github/actions/compilers'
with:
tag: clang-18
with_gcc: 'clang-18 -flto=auto'
optflags: '-O2'
enable_shared: false
- { uses: './.github/actions/compilers', name: '-O0', with: { optflags: '-O0 -march=x86-64 -mtune=generic' } }
# - { uses: './.github/actions/compilers', name: '-O3', with: { optflags: '-O3 -march=x86-64 -mtune=generic', check: true } }
compile2:
name: 'omnibus compilations, #2'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- name: 'GCC 15 LTO'
uses: './.github/actions/compilers'
with:
tag: gcc-15
with_gcc: 'gcc-15 -flto=auto -ffat-lto-objects -Werror=lto-type-mismatch'
optflags: '-O2'
enable_shared: false
- { uses: './.github/actions/compilers', name: 'ext/Setup', with: { static_exts: 'etc json/* */escape' } }
- { uses: './.github/actions/compilers', name: 'GCC 15', with: { tag: 'gcc-15' } }
- { uses: './.github/actions/compilers', name: 'GCC 14', with: { tag: 'gcc-14' } }
- { uses: './.github/actions/compilers', name: 'GCC 13', with: { tag: 'gcc-13' } }
- { uses: './.github/actions/compilers', name: 'GCC 12', with: { tag: 'gcc-12' } }
- { uses: './.github/actions/compilers', name: 'GCC 11', with: { tag: 'gcc-11' } }
- { uses: './.github/actions/compilers', name: 'GCC 10', with: { tag: 'gcc-10' } }
- { uses: './.github/actions/compilers', name: 'GCC 9', with: { tag: 'gcc-9' } }
- { uses: './.github/actions/compilers', name: 'GCC 8', with: { tag: 'gcc-8' } }
- { uses: './.github/actions/compilers', name: 'GCC 7', with: { tag: 'gcc-7' } }
compile3:
name: 'omnibus compilations, #3'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'clang 22', with: { tag: 'clang-22' } }
- { uses: './.github/actions/compilers', name: 'clang 21', with: { tag: 'clang-21' } }
- { uses: './.github/actions/compilers', name: 'clang 20', with: { tag: 'clang-20' } }
- { uses: './.github/actions/compilers', name: 'clang 19', with: { tag: 'clang-19' } }
- { uses: './.github/actions/compilers', name: 'clang 18', with: { tag: 'clang-18' } }
- { uses: './.github/actions/compilers', name: 'clang 17', with: { tag: 'clang-17' } }
- { uses: './.github/actions/compilers', name: 'clang 16', with: { tag: 'clang-16' } }
- { uses: './.github/actions/compilers', name: 'clang 15', with: { tag: 'clang-15' } }
- { uses: './.github/actions/compilers', name: 'clang 14', with: { tag: 'clang-14' } }
compile4:
name: 'omnibus compilations, #4'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'clang 13', with: { tag: 'clang-13' } }
- { uses: './.github/actions/compilers', name: 'clang 12', with: { tag: 'clang-12' } }
- { uses: './.github/actions/compilers', name: 'clang 11', with: { tag: 'clang-11' } }
- { uses: './.github/actions/compilers', name: 'clang 10', with: { tag: 'clang-10' } }
# llvm-objcopy<=9 doesn't have --wildcard. It compiles, but leaves Rust symbols in libyjit.o.
- { uses: './.github/actions/compilers', name: 'clang 9', with: { tag: 'clang-9', append_configure: '--disable-yjit' } }
- { uses: './.github/actions/compilers', name: 'clang 8', with: { tag: 'clang-8', append_configure: '--disable-yjit' } }
- { uses: './.github/actions/compilers', name: 'clang 7', with: { tag: 'clang-7', append_configure: '--disable-yjit' } }
- { uses: './.github/actions/compilers', name: 'clang 6', with: { tag: 'clang-6.0', append_configure: '--disable-yjit' } }
compile5:
name: 'omnibus compilations, #5'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
# -Wno-strict-prototypes is necessary with current clang-15 since
# older autoconf generate functions without prototype and -pedantic
# now implies strict-prototypes. Disabling the error but leaving the
# warning generates a lot of noise from use of ANYARGS in
# rb_define_method() and friends.
# See: https://github.com/llvm/llvm-project/commit/11da1b53d8cd3507959022cd790d5a7ad4573d94
- { uses: './.github/actions/compilers', name: 'C99', with: { CFLAGS: '-std=c99 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
- { uses: './.github/actions/compilers', name: 'C11', with: { CFLAGS: '-std=c11 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
- { uses: './.github/actions/compilers', name: 'C17', with: { CFLAGS: '-std=c17 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
- { uses: './.github/actions/compilers', name: 'C23', with: { CFLAGS: '-std=c2x -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
- { uses: './.github/actions/compilers', name: 'C++98', with: { CXXFLAGS: '-std=c++98 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'C++11', with: { CXXFLAGS: '-std=c++11 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'C++14', with: { CXXFLAGS: '-std=c++14 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'C++17', with: { CXXFLAGS: '-std=c++17 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
compile6:
name: 'omnibus compilations, #6'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'C++20', with: { CXXFLAGS: '-std=c++20 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'C++23', with: { CXXFLAGS: '-std=c++23 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'C++26', with: { CXXFLAGS: '-std=c++26 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
- { uses: './.github/actions/compilers', name: 'gmp', with: { append_configure: '--with-gmp', check: 'ruby/test_bignum.rb', mspecopt: "/github/workspace/src/spec/ruby/core/integer" } }
- { uses: './.github/actions/compilers', name: 'jemalloc', with: { append_configure: '--with-jemalloc' } }
- { uses: './.github/actions/compilers', name: 'valgrind', with: { append_configure: '--with-valgrind' } }
- { uses: './.github/actions/compilers', name: 'coroutine=ucontext', with: { append_configure: '--with-coroutine=ucontext' } }
- { uses: './.github/actions/compilers', name: 'coroutine=pthread', with: { append_configure: '--with-coroutine=pthread' } }
compile7:
name: 'omnibus compilations, #7'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'disable-jit', with: { append_configure: '--disable-yjit --disable-zjit' } }
- { uses: './.github/actions/compilers', name: 'disable-yjit', with: { append_configure: '--disable-yjit' } }
- { uses: './.github/actions/compilers', name: 'disable-zjit', with: { append_configure: '--disable-zjit' } }
- { uses: './.github/actions/compilers', name: 'disable-dln', with: { append_configure: '--disable-dln' } }
- { uses: './.github/actions/compilers', name: 'enable-mkmf-verbose', with: { append_configure: '--enable-mkmf-verbose' } }
- { uses: './.github/actions/compilers', name: 'disable-rubygems', with: { append_configure: '--disable-rubygems' } }
- { uses: './.github/actions/compilers', name: 'RUBY_DEVEL', with: { append_configure: '--enable-devel' } }
- { uses: './.github/actions/compilers', name: 'OPT_THREADED_CODE=0', with: { cppflags: '-DOPT_THREADED_CODE=0' } }
- { uses: './.github/actions/compilers', name: 'OPT_THREADED_CODE=1', with: { cppflags: '-DOPT_THREADED_CODE=1' } }
- { uses: './.github/actions/compilers', name: 'OPT_THREADED_CODE=2', with: { cppflags: '-DOPT_THREADED_CODE=2' } }
compile8:
name: 'omnibus compilations, #8'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'NDEBUG', with: { cppflags: '-DNDEBUG' } }
- { uses: './.github/actions/compilers', name: 'RUBY_DEBUG', with: { cppflags: '-DRUBY_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'ARRAY_DEBUG', with: { cppflags: '-DARRAY_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'BIGNUM_DEBUG', with: { cppflags: '-DBIGNUM_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'CCAN_LIST_DEBUG', with: { cppflags: '-DCCAN_LIST_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'CPDEBUG=-1', with: { cppflags: '-DCPDEBUG=-1' } }
- { uses: './.github/actions/compilers', name: 'ENC_DEBUG', with: { cppflags: '-DENC_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'GC_DEBUG', with: { cppflags: '-DGC_DEBUG' } }
compile9:
name: 'omnibus compilations, #9'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'HASH_DEBUG', with: { cppflags: '-DHASH_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'ID_TABLE_DEBUG', with: { cppflags: '-DID_TABLE_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'RGENGC_DEBUG=-1', with: { cppflags: '-DRGENGC_DEBUG=-1' } }
- { uses: './.github/actions/compilers', name: 'SYMBOL_DEBUG', with: { cppflags: '-DSYMBOL_DEBUG' } }
- { uses: './.github/actions/compilers', name: 'RGENGC_CHECK_MODE', with: { cppflags: '-DRGENGC_CHECK_MODE' } }
- { uses: './.github/actions/compilers', name: 'VM_CHECK_MODE', with: { cppflags: '-DVM_CHECK_MODE' } }
- { uses: './.github/actions/compilers', name: 'USE_EMBED_CI=0', with: { cppflags: '-DUSE_EMBED_CI=0' } }
- { uses: './.github/actions/compilers', name: 'USE_FLONUM=0', with: { cppflags: '-DUSE_FLONUM=0', append_configure: '--disable-yjit' } }
compileX:
name: 'omnibus compilations, #10'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'USE_LAZY_LOAD', with: { cppflags: '-DUSE_LAZY_LOAD' } }
- { uses: './.github/actions/compilers', name: 'USE_SYMBOL_GC=0', with: { cppflags: '-DUSE_SYMBOL_GC=0' } }
- { uses: './.github/actions/compilers', name: 'USE_THREAD_CACHE=0', with: { cppflags: '-DUSE_THREAD_CACHE=0' } }
- { uses: './.github/actions/compilers', name: 'USE_RUBY_DEBUG_LOG=1', with: { cppflags: '-DUSE_RUBY_DEBUG_LOG=1' } }
- { uses: './.github/actions/compilers', name: 'USE_DEBUG_COUNTER', with: { cppflags: '-DUSE_DEBUG_COUNTER=1' } }
- { uses: './.github/actions/compilers', name: 'SHARABLE_MIDDLE_SUBSTRING', with: { cppflags: '-DSHARABLE_MIDDLE_SUBSTRING=1' } }
- { uses: './.github/actions/compilers', name: 'DEBUG_FIND_TIME_NUMGUESS', with: { cppflags: '-DDEBUG_FIND_TIME_NUMGUESS' } }
- { uses: './.github/actions/compilers', name: 'DEBUG_INTEGER_PACK', with: { cppflags: '-DDEBUG_INTEGER_PACK' } }
compileB:
name: 'omnibus compilations, #11'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'GC_DEBUG_STRESS_TO_CLASS', with: { cppflags: '-DGC_DEBUG_STRESS_TO_CLASS' } }
- { uses: './.github/actions/compilers', name: 'GC_ENABLE_LAZY_SWEEP=0', with: { cppflags: '-DGC_ENABLE_LAZY_SWEEP=0' } }
- { uses: './.github/actions/compilers', name: 'GC_PROFILE_DETAIL_MEMORY', with: { cppflags: '-DGC_PROFILE_DETAIL_MEMORY' } }
- { uses: './.github/actions/compilers', name: 'GC_PROFILE_MORE_DETAIL', with: { cppflags: '-DGC_PROFILE_MORE_DETAIL' } }
- { uses: './.github/actions/compilers', name: 'MALLOC_ALLOCATED_SIZE_CHECK', with: { cppflags: '-DMALLOC_ALLOCATED_SIZE_CHECK' } }
- { uses: './.github/actions/compilers', name: 'RGENGC_ESTIMATE_OLDMALLOC', with: { cppflags: '-DRGENGC_ESTIMATE_OLDMALLOC' } }
- { uses: './.github/actions/compilers', name: 'RGENGC_OBJ_INFO', with: { cppflags: '-DRGENGC_OBJ_INFO' } }
- { uses: './.github/actions/compilers', name: 'RGENGC_PROFILE', with: { cppflags: '-DRGENGC_PROFILE' } }
compileC:
name: 'omnibus compilations, #12'
runs-on: ubuntu-latest
needs: compile-if
if: ${{ needs.compile-if.result == 'success' }}
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'VM_DEBUG_BP_CHECK', with: { cppflags: '-DVM_DEBUG_BP_CHECK' } }
- { uses: './.github/actions/compilers', name: 'VM_DEBUG_VERIFY_METHOD_CACHE', with: { cppflags: '-DVM_DEBUG_VERIFY_METHOD_CACHE' } }
- { uses: './.github/actions/compilers', name: 'enable-yjit', with: { append_configure: '--enable-yjit' } }
- { uses: './.github/actions/compilers', name: 'enable-{y,z}jit', with: { append_configure: '--enable-yjit --enable-zjit' } }
- { uses: './.github/actions/compilers', name: 'enable-{y,z}jit=dev', with: { append_configure: '--enable-yjit=dev --enable-zjit' } }
- { uses: './.github/actions/compilers', name: 'YJIT_FORCE_ENABLE', with: { cppflags: '-DYJIT_FORCE_ENABLE' } }
- { uses: './.github/actions/compilers', name: 'UNIVERSAL_PARSER', with: { cppflags: '-DUNIVERSAL_PARSER' } }
compilemax:
name: 'omnibus compilations, result'
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- 'compile1'
- 'compile2'
- 'compile3'
- 'compile4'
- 'compile5'
- 'compile6'
- 'compile7'
- 'compile8'
- 'compile9'
- 'compileX'
- 'compileB'
- 'compileC'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- uses: ./.github/actions/slack
with:
label: 'omnibus'
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
- run: false
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build

View file

@ -1,67 +0,0 @@
name: Cygwin
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
runs-on: windows-2022
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: ruby gcc-core make autoconf libtool libssl-devel libyaml-devel libffi-devel zlib-devel
- name: configure
run: |
./autogen.sh
./configure --disable-install-doc
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}
- name: Extract bundled gems
run: |
make ruby -j5
make extract-gems
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}
- name: make all
timeout-minutes: 30
run: make -j4 V=1
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o igncr -o pipefail {0}

View file

@ -1,96 +0,0 @@
name: Update default gems list
on: [push, pull_request, merge_group]
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
update_default_gems:
name: Update default gems list
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
if: ${{ github.repository == 'ruby/ruby' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
- id: gems
run: true
if: ${{ github.ref == 'refs/heads/master' }}
- uses: ./.github/actions/setup/directories
with:
makeup: true
# Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
if: ${{ steps.gems.outcome == 'success' }}
- name: Download previous gems list
run: |
data=default_gems.json
mkdir -p .downloaded-cache
ln -s .downloaded-cache/$data .
curl -O -R -z ./$data https://stdgems.org/$data
if: ${{ steps.gems.outcome == 'success' }}
- name: Make default gems list
run: |
#!ruby
require 'rubygems'
$:.unshift "lib"
rgver = File.foreach("lib/rubygems.rb") do |line|
break $1 if /^\s*VERSION\s*=\s*"([^"]+)"/ =~ line
end
gems = Dir.glob("{ext,lib}/**/*.gemspec").map do |f|
spec = Gem::Specification.load(f)
"#{spec.name} #{spec.version}"
end.sort
File.open("gems/default_gems", "w") do |f|
f.puts "RubyGems #{rgver}"
f.puts gems
end
shell: ruby --disable=gems {0}
if: ${{ steps.gems.outcome == 'success' }}
- name: Maintain updated gems list in NEWS
run: |
ruby tool/update-NEWS-gemlist.rb default
if: ${{ steps.gems.outcome == 'success' }}
- name: Check diffs
id: diff
run: |
git diff --color --no-ext-diff --ignore-submodules --exit-code NEWS.md ||
echo update=true >> $GITHUB_OUTPUT
if: ${{ steps.gems.outcome == 'success' }}
- name: Commit
run: |
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
git commit --message="Update default gems list at ${GITHUB_SHA:0:30} [ci skip]" NEWS.md
git push origin ${GITHUB_REF#refs/heads/}
env:
EMAIL: svn-admin@ruby-lang.org
GIT_AUTHOR_NAME: git
GIT_COMMITTER_NAME: git
if: >-
${{
github.repository == 'ruby/ruby' &&
!startsWith(github.event_name, 'pull') &&
steps.diff.outputs.update
}}
- uses: ./.github/actions/slack
with:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -1,32 +0,0 @@
# from https://github.com/gofiber/swagger/blob/main/.github/workflows/dependabot_automerge.yml
name: Dependabot auto-merge
on:
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
automerge:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'ruby/ruby'
steps:
- name: Dependabot metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
id: metadata
- name: Wait for status checks
uses: lewagon/wait-on-check-action@31f07a800aa1ba8518509dc8561cdf5a891deb4b # v1.4.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
check-regexp: 'make \(check, .*\)'
wait-interval: 30
- name: Auto-merge for Dependabot PRs
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.MATZBOT_DEPENDABOT_MERGE_TOKEN }}

View file

@ -1,12 +0,0 @@
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5

View file

@ -1,198 +0,0 @@
name: macOS
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
strategy:
matrix:
include:
- test_task: check
os: macos-14
- test_task: check
os: macos-14
configure_args: '--with-gcc=gcc-14'
- test_task: check
os: macos-14
configure_args: '--with-jemalloc --with-opt-dir=$(brew --prefix jemalloc)'
- test_task: check
os: macos-14
configure_args: '--with-gmp'
- test_task: test-all
test_opts: --repeat-count=2
os: macos-14
- test_task: test-bundler-parallel
os: macos-14
- test_task: test-bundled-gems
os: macos-14
- test_task: check
os: macos-15
- test_task: check
os: macos-13
fail-fast: false
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
runs-on: ${{ matrix.os }}
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- name: Install libraries
uses: ./.github/actions/setup/macos
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
clean: true
dummy-files: ${{ matrix.test_task == 'check' }}
# Set fetch-depth: 0 so that Launchable can receive commits information.
fetch-depth: 10
- name: make sure that kern.coredump=1
run: |
sysctl -n kern.coredump
sudo sysctl -w kern.coredump=1
sudo chmod -R +rwx /cores/
- name: Delete unused SDKs
# To free up disk space to not run out during the run
run: |
sudo rm -rf ~/.dotnet
sudo rm -rf /Library/Android
sudo rm -rf /Library/Developer/CoreSimulator
continue-on-error: true
- name: Run configure
run: ../src/configure -C --disable-install-doc ${ruby_configure_args} ${{ matrix.configure_args }}
- run: make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}
- run: make
- run: make hello
- name: runirb
run: |
echo IRB::VERSION | make runirb RUNOPT="-- -f"
- name: Set test options for skipped tests
run: |
set -x
TESTS="$(echo "${{ matrix.skipped_tests }}" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|')"
echo "TESTS=${TESTS}" >> $GITHUB_ENV
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
- name: Set up Launchable
id: launchable
uses: ./.github/actions/launchable/setup
with:
os: ${{ matrix.os }}
test-opts: ${{ matrix.test_opts }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
continue-on-error: true
timeout-minutes: 3
- name: Set extra test options
run: |
echo "TESTS=$TESTS ${{ matrix.test_opts }}" >> $GITHUB_ENV
echo "RUBY_TEST_TIMEOUT_SCALE=10" >> $GITHUB_ENV # With --repeat-count=2, flaky test by timeout occurs frequently for some reason
if: matrix.test_opts
- name: make ${{ matrix.test_task }}
run: |
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
ulimit -c unlimited
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
timeout-minutes: 60
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
PRECHECK_BUNDLED_GEMS: 'no'
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
- name: make skipped tests
run: |
make -s test-all TESTS="${TESTS//-n!\//-n/}"
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-v --tty=no'
PRECHECK_BUNDLED_GEMS: 'no'
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
- uses: ./.github/actions/slack
with:
label: ${{ matrix.os }} / ${{ matrix.test_task }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
- name: Resolve job ID
id: job_id
uses: actions/github-script@main
env:
matrix: ${{ toJson(matrix) }}
with:
script: |
const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId
});
const matrix = JSON.parse(process.env.matrix);
const job_name = `${context.job}${matrix ? ` (${Object.values(matrix).join(", ")})` : ""}`;
return workflow_run.jobs.find((job) => job.name === job_name).id;
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: macos-latest
needs: [make]
steps:
- run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build

View file

@ -1,223 +0,0 @@
name: MinGW
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
# Notes:
# Actions console encoding causes issues, see test-all & test-spec steps
#
jobs:
make:
runs-on: windows-2022
name: ${{ github.workflow }} (${{ matrix.msystem }})
env:
MSYSTEM: ${{ matrix.msystem }}
MSYS2_ARCH: x86_64
CHOST: 'x86_64-w64-mingw32'
CFLAGS: '-march=x86-64 -mtune=generic -O3 -pipe'
CXXFLAGS: '-march=x86-64 -mtune=generic -O3 -pipe'
CPPFLAGS: '-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048'
LDFLAGS: '-pipe'
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
strategy:
matrix:
include:
# To mitigate flakiness of MinGW CI, we test only one runtime that newer MSYS2 uses.
# Ruby 3.2 is the first Windows Ruby to use OpenSSL 3.x
- msystem: 'UCRT64'
test_task: 'check'
test-all-opts: '--name=!/TestObjSpace#test_reachable_objects_during_iteration/'
fail-fast: false
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0
id: msys2
with:
msystem: UCRT64
update: true
install: >-
git
make
ruby
autoconf
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-ragel
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-libyaml
mingw-w64-ucrt-x86_64-libffi
- name: Set up env
id: setup-env
working-directory:
run: |
$msys2 = ${env:MSYS2_LOCATION}
echo $msys2\usr\bin $msys2\ucrt64\bin |
Tee-Object ${env:GITHUB_PATH} -Append -Encoding utf-8
# Use the fast device for the temporary directory.
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
$tmp = ${env:RUNNER_TEMP}
echo HOME=$home TMP=$tmp TEMP=$tmp TMPDIR=$tmp |
Tee-Object ${env:GITHUB_ENV} -Append -Encoding utf-8
shell: pwsh # cmd.exe does not strip spaces before `|`.
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
- name: Remove Strawberry Perl pkg-config
working-directory:
# `pkg-config.bat` included in Strawberry Perl is written in
# Perl and doesn't work when another msys2 `perl` precede its
# own `perl`.
#
# ```
# Can't find C:\Strawberry\perl\bin\pkg-config.bat on PATH, '.' not in PATH.
# ```
run: |
Get-Command pkg-config.bat | % { ren $_.path ($_.path + "~") }
shell: pwsh
- name: Misc system & package info
working-directory:
run: |
group() { echo ::group::$'\e[94;1m'"$*"$'\e[m'; }
endgroup() { echo ::endgroup::; }
group Path
cygpath -wa / . $(type -p cygpath bash sh)
endgroup
I() {
group $1
run Where type -pa $1 && { [ $# -eq 1 ] || run Version "$@"; } ||
failed+=($1)
endgroup
}
run() { local w m=$1; shift; w="$("$@")" && show "$m" && indent "$w"; }
indent() { [ -z "$1" ] || echo "$1" | /bin/sed '/^$/!s/^/ /'; }
show() { echo $'\e[96m'"$*"$'\e[m'; }
failed=()
I gcc.exe --version
I ragel.exe --version
I make.exe --version
I openssl.exe version
I libcrypto-3-x64.dll
I libssl-3-x64.dll
group Packages
pacman -Qs mingw-w64-ucrt-x86_64-* | /bin/sed -n "s,local/mingw-w64-ucrt-x86_64-,,p"
endgroup
[ ${#failed[@]} -eq 0 ]
shell: sh
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: configure
run: >
../src/configure --disable-install-doc --prefix=/.
--build=$CHOST --host=$CHOST --target=$CHOST
shell: sh
- name: make all
timeout-minutes: 30
run: make -j4
- name: make install
run: make DESTDIR=../install install-nodoc
- name: Set up Launchable
uses: ./.github/actions/launchable/setup
with:
os: windows-2022
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
test-tasks: '["test", "test-all", "test-spec"]'
continue-on-error: true
timeout-minutes: 3
- name: test
timeout-minutes: 30
run: make test
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-v --tty=no'
if: ${{ matrix.test_task == 'check' || matrix.test_task == 'test' }}
- name: test-all
timeout-minutes: 45
run: |
make ${{ StartsWith(matrix.test_task, 'test/') && matrix.test_task || 'test-all' }}
env:
RUBY_TESTOPTS: >-
--retry --job-status=normal --show-skip --timeout-scale=1.5 -j4
${{ matrix.test-all-opts }}
${{ env.TESTS }}
BUNDLER_VERSION:
if: ${{ matrix.test_task == 'check' || matrix.test_task == 'test-all' || StartsWith(matrix.test_task, 'test/') }}
- name: test-spec
timeout-minutes: 10
run: |
make ${{ StartsWith(matrix.test_task, 'spec/') && matrix.test_task || 'test-spec' }}
if: ${{ matrix.test_task == 'check' || matrix.test_task == 'test-spec' || StartsWith(matrix.test_task, 'spec/') }}
- uses: ./src/.github/actions/slack
with:
label: ${{ matrix.msystem }} / ${{ matrix.test_task }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
defaults:
run:
working-directory: build
shell: cmd

View file

@ -1,178 +0,0 @@
name: ModGC
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
check:
strategy:
matrix:
gc:
- name: default
- name: mmtk
mmtk_build: release
os: [macos-latest, ubuntu-latest]
include:
- test_task: check
fail-fast: false
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUBY_DEBUG: ci
runs-on: ${{ matrix.os }}
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- name: Install libraries (macOS)
uses: ./.github/actions/setup/macos
if: ${{ contains(matrix.os, 'macos') }}
- name: Install libraries (Ubuntu)
uses: ./.github/actions/setup/ubuntu
if: ${{ contains(matrix.os, 'ubuntu') }}
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
if: ${{ contains(matrix.os, 'ubuntu') }}
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
clean: true
dummy-files: false
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: make sure that kern.coredump=1
run: |
sysctl -n kern.coredump
sudo sysctl -w kern.coredump=1
sudo chmod -R +rwx /cores/
if: ${{ contains(matrix.os, 'macos') }}
- name: Delete unused SDKs
# To free up disk space to not run out during the run
run: |
sudo rm -rf ~/.dotnet
sudo rm -rf /Library/Android
sudo rm -rf /Library/Developer/CoreSimulator
continue-on-error: true
if: ${{ contains(matrix.os, 'macos') }}
- name: Setup Ruby GC Directory
run: |
echo "MODULAR_GC_DIR=$HOME/ruby_gc" >> $GITHUB_ENV
- name: Run configure
env:
arch: ${{ matrix.arch }}
run: >-
$SETARCH ../src/configure -C --disable-install-doc --with-modular-gc=${{ env.MODULAR_GC_DIR }}
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set MMTk environment variables
run: |
echo 'EXCLUDES=../src/test/.excludes-mmtk' >> $GITHUB_ENV
echo 'MSPECOPT=-B../src/spec/mmtk.mspec' >> $GITHUB_ENV
if: ${{ matrix.gc.name == 'mmtk' }}
- run: $SETARCH make
- name: Build Modular GC
run: |
echo "RUBY_GC_LIBRARY=${{ matrix.gc.name }}" >> $GITHUB_ENV
make install-modular-gc MODULAR_GC=${{ matrix.gc.name }} MMTK_BUILD=${{ matrix.gc.mmtk_build }}
make distclean-modular-gc MODULAR_GC=${{ matrix.gc.name }}
- run: $SETARCH make hello
- name: Set test options for skipped tests
run: |
set -x
TESTS="$(echo "${{ matrix.skipped_tests }}" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|')"
echo "TESTS=${TESTS}" >> $GITHUB_ENV
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
- name: Set up Launchable
id: launchable
uses: ./.github/actions/launchable/setup
with:
os: ${{ matrix.os || 'ubuntu-22.04' }}
test-opts: ${{ matrix.configure }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
continue-on-error: true
timeout-minutes: 3
- name: make ${{ matrix.test_task }}
run: |
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
$SETARCH make -s ${{ matrix.test_task }} \
${TESTS:+TESTS="$TESTS"} \
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
timeout-minutes: ${{ matrix.gc.timeout || 40 }}
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
PRECHECK_BUNDLED_GEMS: 'no'
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
- name: make skipped tests
run: |
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-v --tty=no'
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
- uses: ./.github/actions/slack
with:
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
defaults:
run:
working-directory: build

View file

@ -1,102 +0,0 @@
name: parse.y
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
strategy:
matrix:
include:
- test_task: check
- test_task: test-bundler-parallel
- test_task: test-bundled-gems
fail-fast: false
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUBY_DEBUG: ci
SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }}
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/ubuntu
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
clean: true
dummy-files: ${{ matrix.test_task == 'check' }}
- name: Run configure
run: ../src/configure -C --disable-install-doc cppflags=-DRUBY_DEBUG --with-parser=parse.y
- run: make
- run: make TESTRUN_SCRIPT='-renvutil -v -e "exit EnvUtil.current_parser == %[parse.y]"' run
env:
RUNOPT0: -I$(tooldir)/lib
- name: make ${{ matrix.test_task }}
run: make -s ${{ matrix.test_task }} RUN_OPTS="$RUN_OPTS" SPECOPTS="$SPECOPTS"
env:
RUBY_TESTOPTS: ${{ matrix.testopts }}
EXCLUDES: '../src/test/.excludes-parsey'
RUN_OPTS: ${{ matrix.run_opts || '--parser=parse.y' }}
SPECOPTS: ${{ matrix.specopts || '-T --parser=parse.y' }}
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
- uses: ./.github/actions/slack
with:
label: ${{ matrix.run_opts }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
defaults:
run:
working-directory: build

View file

@ -1,127 +0,0 @@
name: Post Playground link to PR
on:
pull_request_target:
types: [labeled]
workflow_run:
workflows: ["WebAssembly"]
types: [completed]
jobs:
post-summary:
name: Post Playground link
runs-on: ubuntu-latest
permissions:
pull-requests: write
# Post a comment only if the PR status check is passed and the PR is labeled with `Playground`.
# Triggered twice: when the PR is labeled and when PR build is passed.
if: >-
${{ false
|| (true
&& github.event_name == 'pull_request_target'
&& contains(github.event.pull_request.labels.*.name, 'Playground'))
|| (true
&& github.event_name == 'workflow_run'
&& github.event.workflow_run.conclusion == 'success'
&& github.event.workflow_run.event == 'pull_request')
}}
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs/promises');
const buildWorkflowPath = '.github/workflows/wasm.yml';
const findSuccessfuBuildRun = async (pr) => {
const opts = github.rest.actions.listWorkflowRunsForRepo.endpoint.merge({
owner: context.repo.owner,
repo: context.repo.repo,
status: 'success',
branch: pr.head.ref,
});
const runs = await github.paginate(opts);
const buildRun = runs.find(run => run.path == buildWorkflowPath);
return buildRun;
}
const postComment = async (body, pr) => {
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
});
const commentOpts = { owner: context.repo.owner, repo: context.repo.repo, body: comment };
const existingComment = comments.find(comment => comment.body.startsWith(magicComment));
if (existingComment) {
core.info(`Updating existing comment: ${existingComment.html_url}`);
await github.rest.issues.updateComment({
...commentOpts, comment_id: existingComment.id
});
} else {
await github.rest.issues.createComment({
...commentOpts, issue_number: pr.number
});
}
}
const derivePRNumber = async () => {
if (context.payload.pull_request) {
return context.payload.pull_request.number;
}
// Workaround for https://github.com/orgs/community/discussions/25220
const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
const artifact = artifacts.find(artifact => artifact.name == 'github-pr-info');
if (!artifact) {
throw new Error('Cannot find github-pr-info.txt artifact');
}
const { data } = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
await fs.writeFile('pr-info.zip', Buffer.from(data));
await exec.exec('unzip', ['pr-info.zip']);
return await fs.readFile('github-pr-info.txt', 'utf8');
}
const prNumber = await derivePRNumber();
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
core.info(`Checking if the PR ${prNumber} is labeled with Playground...`);
if (!pr.labels.some(label => label.name == 'Playground')) {
core.info(`The PR is not labeled with Playground.`);
return;
}
core.info(`Checking if the build is successful for ${pr.head.ref} in ${pr.head.repo.owner.login}/${pr.head.repo.name}...`);
const buildRun = await findSuccessfuBuildRun(pr);
if (!buildRun) {
core.info(`No successful build run found for ${buildWorkflowPath} on ${pr.head.ref} yet.`);
return;
}
core.info(`Found a successful build run: ${buildRun.html_url}`);
const runLink = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
const magicComment = `<!-- AUTO-GENERATED-COMMENT-PR-PLAYGROUND -->`;
const comment = `${magicComment}
**Try on Playground**: https://ruby.github.io/play-ruby?run=${buildRun.id}
This is an automated comment by [\`pr-playground.yml\`](${runLink}) workflow.
`;
core.info(`Comment: ${comment}`);
await postComment(comment, pr);

View file

@ -1,18 +0,0 @@
name: Start release workflow
on:
push:
tags:
- '*'
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Build release package
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ruby/actions/dispatches \
-d '{"event_type": "${{ github.ref }}"}'

View file

@ -1,107 +0,0 @@
name: Publish Ruby packages
on:
repository_dispatch:
types:
- release
workflow_dispatch:
inputs:
version:
description: 'Version of the Ruby package to release'
required: true
default: '3.3.4'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
- name: Store Ruby version
run: |
echo "RUBY_VERSION=${{ github.event.client_payload.version || github.event.inputs.version }}" >> $GITHUB_ENV
- name: Store ABI version
run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV
- name: Copy draft package `/tmp` to `/pub` directory
run: tool/release.sh ${{ env.RUBY_VERSION }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.FTP_R_L_O_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.FTP_R_L_O_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-2
- name: Purge URLs of release package
run: |
curl -X POST \
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.gz
curl -X POST \
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.xz
curl -X POST \
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.zip
- name: Create a release on GitHub
run: |
RELEASE_TAG=$(echo v${{ env.RUBY_VERSION }} | sed 's/\./_/g')
echo $RELEASE_TAG
PREVIOUS_RELEASE_TAG=$(echo $RELEASE_TAG | awk 'BEGIN {FS="_"; OFS="_"}{ $NF=$NF-1; print }')
echo $PREVIOUS_RELEASE_TAG
tool/gen-github-release.rb $PREVIOUS_RELEASE_TAG $RELEASE_TAG --no-dry-run
env:
GITHUB_TOKEN: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}
- name: Update versions index
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ruby/actions/dispatches \
-d '{"event_type": "update_index"}'
- name: Build and push Docker images
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ruby/docker-images/dispatches \
-d '{"event_type": "build", "client_payload": {"ruby_version": "${{ env.RUBY_VERSION }}"}}'
- name: Build snapcraft packages
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ruby/snap.ruby/dispatches \
-d '{"event_type": "build", "client_payload": {"ruby_version": "${{ env.RUBY_VERSION }}"}}'
- name: Store the latest LTS version of OpenSSL
run: |
echo "OPENSSL_VERSION=`curl -s https://api.github.com/repos/openssl/openssl/releases | jq -r '.[].tag_name | select(startswith("openssl-3.0"))' | sort -Vr | head -n1 | cut -d'-' -f2`" >> $GITHUB_ENV
- name: Update ruby-build definition
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.RUBY_BUILD_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/rbenv/ruby-build/dispatches \
-d '{"event_type": "update-ruby", "client_payload": {"ruby_version": "${{ env.RUBY_VERSION }}", "openssl_version": "${{ env.OPENSSL_VERSION }}"}}'
- name: Update all-ruby definition
run: |
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ruby/all-ruby/dispatches \
-d '{"event_type": "update"}'

View file

@ -1,53 +0,0 @@
# Surface Rust warnings on PRs that touch any Rust code.
# Not a required check so we never block people over new warnings
# that might come from a new Rust version being released.
name: Rust warnings
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- '**.rs'
- '!**.inc.rs'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
runs-on: ubuntu-24.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
run: rustup default beta
- name: Rust warnings
run: |
set -euo pipefail
cargo check --quiet --all-features --message-format=json \
| jq -r 'select(.reason == "compiler-message" and .message.level == "warning") | .message.rendered' \
> warnings.txt
cat warnings.txt
! grep --quiet '[^[:space:]]' warnings.txt

View file

@ -1,78 +0,0 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '39 3 * * 5'
# push:
# branches: [ "master" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
# file_mode: git
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

View file

@ -1,67 +0,0 @@
name: Rubyspec Version Guards Check
on:
push:
paths:
- '.github/workflows/spec_guards.yml'
- 'spec/**'
- '!spec/*.md'
pull_request:
paths:
- '.github/workflows/spec_guards.yml'
- 'spec/**'
- '!spec/*.md'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
rubyspec:
name: Rubyspec
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
strategy:
matrix:
# Specs from ruby/spec should still run on all supported Ruby versions.
# This also ensures the needed ruby_version_is guards are there, see spec/README.md.
ruby:
- ruby-3.2
- ruby-3.3
- ruby-3.4
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
- run: gem install webrick
- run: ruby ../mspec/bin/mspec
working-directory: spec/ruby
env:
CHECK_LEAKS: true
- uses: ./.github/actions/slack
with:
label: ${{ matrix.ruby }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

View file

@ -25,15 +25,13 @@ jobs:
strategy: strategy:
matrix: matrix:
test_task: [check] test_task: [check]
configure: [''] configure: ['cppflags=-DRUBY_DEBUG']
arch: [''] arch: ['']
os: os:
- ubuntu-22.04
- ubuntu-24.04 - ubuntu-24.04
- ubuntu-24.04-arm - ubuntu-24.04-arm
# FIXME Comment out ppc64le due to failing tests on GitHub Actions - ubuntu-24.04-ppc64le
# ppc64le
# https://bugs.ruby-lang.org/issues/21534
# - ubuntu-24.04-ppc64le
- ubuntu-24.04-s390x - ubuntu-24.04-s390x
# The ppc64le/s390x runners work only in the registered repositories. # The ppc64le/s390x runners work only in the registered repositories.
# They don't work in forked repositories. # They don't work in forked repositories.
@ -49,6 +47,12 @@ jobs:
configure: '--disable-yjit' configure: '--disable-yjit'
- test_task: check - test_task: check
configure: '--enable-shared --enable-load-relative' configure: '--enable-shared --enable-load-relative'
- os: ubuntu-24.04-ppc64le
# FIXME Override the configure options with empty, due to some
# Ractor tests failing with the "./configure cppflags=-DRUBY_DEBUG"
# on ppc64le.
# https://bugs.ruby-lang.org/issues/21534
configure: ''
- test_task: test-bundler-parallel - test_task: test-bundler-parallel
timeout: 50 timeout: 50
- test_task: test-bundled-gems - test_task: test-bundled-gems
@ -122,9 +126,8 @@ jobs:
- name: Run configure - name: Run configure
env: env:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
configure: ${{ matrix.configure }}
run: >- run: >-
$SETARCH ../src/configure -C --disable-install-doc ${configure:-cppflags=-DRUBY_DEBUG} $SETARCH ../src/configure -C --disable-install-doc ${{ matrix.configure }}
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE} ${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
- run: $SETARCH make prepare-gems - run: $SETARCH make prepare-gems

View file

@ -1,181 +0,0 @@
name: WebAssembly
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
make:
strategy:
matrix:
entry:
# # wasmtime can't compile non-optimized Asyncified binary due to locals explosion
# - { name: O0-debuginfo, optflags: '-O0', debugflags: '-g', wasmoptflags: '-O1' }
# - { name: O1, optflags: '-O1', debugflags: '' , wasmoptflags: '-O1' }
- { name: O2, optflags: '-O2', debugflags: '', wasmoptflags: '-O2' }
# - { name: O3, optflags: '-O3', debugflags: '' , wasmoptflags: '-O3' }
# # -O4 is equivalent to -O3 in clang, but it's different in wasm-opt
# - { name: O4, optflags: '-O3', debugflags: '' , wasmoptflags: '-O4' }
# - { name: Oz, optflags: '-Oz', debugflags: '' , wasmoptflags: '-Oz' }
fail-fast: false
env:
RUBY_TESTOPTS: '-q --tty=no'
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
WASI_SDK_VERSION_MAJOR: 25
WASI_SDK_VERSION_MINOR: 0
BINARYEN_VERSION: 113
WASMTIME_VERSION: v15.0.0
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
- name: Install libraries
run: |
set -ex
sudo apt-get update -q || :
sudo apt-get install --no-install-recommends -q -y ruby make autoconf git wget
wasi_sdk_deb="wasi-sdk-${WASI_SDK_VERSION_MAJOR}.${WASI_SDK_VERSION_MINOR}-x86_64-linux.deb"
wget "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION_MAJOR}/${wasi_sdk_deb}"
sudo dpkg -i "$wasi_sdk_deb"
rm -f "$wasi_sdk_deb"
mkdir build-sdk
pushd build-sdk
wasmtime_url="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
wget -O - "$wasmtime_url" | tar xJf -
sudo ln -fs "$PWD/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" /usr/local/bin/wasmtime
binaryen_tarball="binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz"
binaryen_url="https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/${binaryen_tarball}"
wget -O - "$binaryen_url" | tar xfz -
sudo ln -fs "$PWD/binaryen-version_${BINARYEN_VERSION}/bin/wasm-opt" /usr/local/bin/wasm-opt
working-directory: src
- name: Set ENV
run: |
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
- name: Build baseruby
run: |
set -ex
mkdir ../baseruby
pushd ../baseruby
../src/configure --prefix=$PWD/install
make
make install
- name: Download config.guess with wasi version
run: |
rm tool/config.guess tool/config.sub
ruby tool/downloader.rb -d tool -e gnu config.guess config.sub
working-directory: src
- name: Run configure
run: |
../src/configure \
--host wasm32-unknown-wasi \
--with-baseruby=$PWD/../baseruby/install/bin/ruby \
--with-static-linked-ext \
--with-ext=cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,json,json/generator,json/parser,objspace,pathname,rbconfig/sizeof,ripper,stringio,strscan,monitor \
LDFLAGS=" \
-Xlinker --stack-first \
-Xlinker -z -Xlinker stack-size=16777216 \
" \
optflags="${{ matrix.entry.optflags }}" \
debugflags="${{ matrix.entry.debugflags }}" \
wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}"
# miniruby may not be built when cross-compling
- run: make mini ruby
- run: make install DESTDIR=$PWD/../install
- run: tar cfz ../install.tar.gz -C ../install .
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ruby-wasm-install
path: ${{ github.workspace }}/install.tar.gz
- name: Show Playground URL to try the build
run: |
echo "Try on Playground: https://ruby.github.io/play-ruby?run=$GITHUB_RUN_ID" >> $GITHUB_STEP_SUMMARY
- name: Run basictest
run: wasmtime run ./../build/miniruby --mapdir /::./ -- basictest/test.rb
working-directory: src
- name: Run bootstraptest (no thread)
run: |
NO_THREAD_TESTS="$(grep -L Thread -R ./bootstraptest | awk -F/ '{ print $NF }' | uniq | sed -n 's/test_\(.*\).rb/\1/p' | paste -s -d, -)"
ruby ./bootstraptest/runner.rb --ruby="$(which wasmtime) run $PWD/../build/ruby --mapdir /::./ -- " --verbose "--sets=$NO_THREAD_TESTS"
working-directory: src
- uses: ./.github/actions/slack
with:
label: ${{ matrix.entry.name }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
# Workaround for https://github.com/orgs/community/discussions/25220
- name: Save Pull Request number
if: ${{ github.event_name == 'pull_request' }}
run: echo "${{ github.event.pull_request.number }}" >> ${{ github.workspace }}/github-pr-info.txt
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ github.event_name == 'pull_request' }}
with:
name: github-pr-info
path: ${{ github.workspace }}/github-pr-info.txt
defaults:
run:
working-directory: build

View file

@ -1,220 +0,0 @@
name: Windows
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
strategy:
matrix:
include:
- os: 2022
vc: 2022
test_task: check
- os: 2025
vc: 2022
test_task: check
- os: 11-arm
test_task: 'btest test-basic test-tool' # check and test-spec are broken yet.
target: arm64
- os: 2025
vc: 2022
test_task: test-bundled-gems
fail-fast: false
runs-on: windows-${{ matrix.os }}
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
name: Windows ${{ matrix.os }}/Visual C++ ${{ matrix.vc }} (${{ matrix.test_task }})
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target || 'x64' }}-windows
steps:
- run: md build
working-directory:
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
# windows-11-arm has only 3.4.1, 3.4.2, 3.4.3, head
ruby-version: ${{ !endsWith(matrix.os, 'arm') && '3.1' || '3.4' }}
bundler: none
windows-toolchain: none
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
- name: Install tools with scoop
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
scoop install vcpkg uutils-coreutils cmake@3.31.6
shell: pwsh
- name: Restore vcpkg artifact
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: src\vcpkg_installed
key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }}
- name: Install libraries with vcpkg
run: |
vcpkg install --vcpkg-root=%USERPROFILE%\scoop\apps\vcpkg\current
working-directory: src
- name: Save vcpkg artifact
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: src\vcpkg_installed
key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }}
if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'ruby_') }}
- name: setup env
# Available Ruby versions: https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md#ruby
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
run: |
::- Set up VC ${{ matrix.vc }}
set | uutils sort > old.env
call ..\src\win32\vssetup.cmd ^
-arch=${{ matrix.target || 'amd64' }} ^
${{ matrix.vcvars && '-vcvars_ver=' || '' }}${{ matrix.vcvars }}
nmake -f nul
set TMP=%USERPROFILE%\AppData\Local\Temp
set TEMP=%USERPROFILE%\AppData\Local\Temp
set MAKEFLAGS=l
set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
set RUBY_OPT_DIR=%GITHUB_WORKSPACE:\=/%/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
set | uutils sort > new.env
uutils comm -13 old.env new.env >> %GITHUB_ENV%
del *.env
- name: baseruby version
run: ruby -v
- name: compiler version
run: cl
- name: volume info
run: Get-Volume
shell: pwsh
# TODO: We should use `../src` instead of `D:/a/ruby/ruby/src`
- name: Configure
run: >-
../src/win32/configure.bat --disable-install-doc
--with-opt-dir=%RUBY_OPT_DIR%
--with-gmp
- run: nmake prepare-vcpkg
- run: nmake incs
- run: nmake extract-extlibs
# On all other platforms, test-spec depending on extract-gems (in common.mk) is enough.
# But not for this Visual Studio workflow. So here we extract gems before building.
- run: nmake extract-gems
# windows-11-arm runner cannot run `ruby tool/file2lastrev.rb --revision.h --output=revision.h`
- name: make revision.h
run: |
if not exist revision.h (
for /f "tokens=1-3" %%I in ('git log -1 "--date=format-local:%%F %%T" "--format=%%H %%cd" @') do (
set rev=%%I
set dt=%%J
set tm=%%K
)
call set yy=%%dt:~0,4%%
call set /a mm=100%%dt:~5,2%% %%%% 100
call set /a dd=100%%dt:~8,2%% %%%% 100
call set branch=%%GITHUB_REF:refs/heads/=%%
(
call echo #define RUBY_REVISION "%%rev:~,10%%"
call echo #define RUBY_FULL_REVISION "%%rev%%"
call echo #define RUBY_BRANCH_NAME "%%branch%%"
call echo #define RUBY_RELEASE_DATETIME "%%dt%%T%%tm%%"
call echo #define RUBY_RELEASE_YEAR %%yy%%
call echo #define RUBY_RELEASE_MONTH %%mm%%
call echo #define RUBY_RELEASE_DAY %%dd%%
) > revision.h
copy /y NUL .revision.time
)
type revision.h
env:
TZ: UTC
- run: nmake
- name: Set up Launchable
uses: ./.github/actions/launchable/setup
with:
os: windows-${{ matrix.os }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
test-task: ${{ matrix.test_task || 'check' }}
continue-on-error: true
if: ${{ matrix.test_task != 'test-bundled-gems' }}
timeout-minutes: 3
- run: nmake ${{ matrix.test_task || 'check' }}
env:
RUBY_TESTOPTS: -j${{ env.TEST_JOBS || 4 }}
timeout-minutes: 70
- uses: ./.github/actions/slack
with:
label: Windows ${{ matrix.os }} / VC ${{ matrix.vc }} / ${{ matrix.test_task || 'check' }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: windows-latest
needs: [make]
steps:
- run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build
shell: cmd

View file

@ -1,72 +0,0 @@
name: Ubuntu on WSL
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# 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
merge_group:
jobs:
wsl:
runs-on: windows-2025
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- name: Install or update WSL
uses: Ubuntu/WSL/.github/actions/wsl-install@main
with:
distro: Ubuntu-24.04
- name: Install dependencies
uses: Ubuntu/WSL/.github/actions/wsl-bash@main
with:
distro: Ubuntu-24.04
working-dir: /tmp/github/
exec: |
DEBIAN_FRONTEND=noninteractive sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt install -y ruby build-essential autoconf libssl-dev libyaml-dev zlib1g-dev libgmp-dev libffi-dev
- name: Check out the repository
uses: Ubuntu/WSL/.github/actions/wsl-checkout@main
with:
distro: Ubuntu-24.04
working-dir: /tmp/github/
submodules: true
- name: Build
uses: Ubuntu/WSL/.github/actions/wsl-bash@main
with:
distro: Ubuntu-24.04
working-dir: /tmp/github/
exec: |
./autogen.sh
./configure --disable-install-doc
make ruby -j4
make extract-gems
make -j4
- name: Test
uses: Ubuntu/WSL/.github/actions/wsl-bash@main
with:
distro: Ubuntu-24.04
working-dir: /tmp/github/
exec: |
./ruby -v
# make check TESTS="-j4" MSPECOPT="-j"

View file

@ -1,192 +0,0 @@
name: YJIT macOS Arm64
on:
push:
branches:
- master
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
types:
- opened
- synchronize
- reopened
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
cargo:
name: cargo test
runs-on: macos-14
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: RUST_BACKTRACE=1 cargo test
working-directory: yjit
# Also compile and test with all features enabled
- run: RUST_BACKTRACE=1 cargo test --all-features
working-directory: yjit
# Check that we can build in release mode too
- run: cargo build --release
working-directory: yjit
make:
strategy:
matrix:
include:
- test_task: 'check'
configure: '--enable-yjit'
yjit_opts: '--yjit'
- test_task: 'check'
configure: '--enable-yjit=dev'
yjit_opts: '--yjit-call-threshold=1 --yjit-verify-ctx --yjit-code-gc'
specopts: '-T --yjit-call-threshold=1 -T --yjit-verify-ctx -T --yjit-code-gc'
fail-fast: false
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.yjit_opts }}
SPECOPTS: ${{ matrix.specopts }}
runs-on: macos-14
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- name: Install libraries
uses: ./.github/actions/setup/macos
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: Run configure
run: ../src/configure -C --disable-install-doc ${{ matrix.configure }}
- run: make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}
- run: make
- name: Verify that --yjit-dump-disasm works
run: |
./miniruby --yjit-call-threshold=1 --yjit-dump-disasm -e0 | \
wc -l | \
ruby -ne 'raise "Disassembly seems broken in dev build (output has too few lines)" unless $_.to_i > 10'
if: ${{ contains(matrix.configure, 'jit=dev') }}
- name: Enable YJIT through ENV
run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV
- name: Set test options for skipped tests
run: |
set -x
TESTS="$(echo "${{ matrix.skipped_tests }}" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|')"
echo "TESTS=${TESTS}" >> $GITHUB_ENV
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
- name: Set up Launchable
id: launchable
uses: ./.github/actions/launchable/setup
with:
os: macos-14
test-opts: ${{ matrix.configure }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
is-yjit: true
continue-on-error: true
timeout-minutes: 3
- name: make ${{ matrix.test_task }}
run: |
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"} \
RUN_OPTS="$RUN_OPTS" \
SPECOPTS="$SPECOPTS"
timeout-minutes: 60
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
SYNTAX_SUGGEST_TIMEOUT: '5'
PRECHECK_BUNDLED_GEMS: 'no'
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
continue-on-error: ${{ matrix.continue-on-test_task || false }}
- name: make skipped tests
run: |
make -s test-all TESTS="${TESTS//-n!\//-n/}"
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-v --tty=no'
PRECHECK_BUNDLED_GEMS: 'no'
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
- uses: ./.github/actions/slack
with:
label: ${{ matrix.test_task }} ${{ matrix.configure }} ${{ matrix.yjit_opts }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: macos-14
needs: [make]
steps:
- name: ${{ github.workflow }} jobs have failed
run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build

View file

@ -1,238 +0,0 @@
name: YJIT Ubuntu
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
cargo:
name: cargo test
# GitHub Action's image seems to already contain a Rust 1.58.0.
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# For now we can't run cargo test --offline because it complains about the
# capstone dependency, even though the dependency is optional
#- run: cargo test --offline
- run: RUST_BACKTRACE=1 cargo test
working-directory: yjit
# Also compile and test with all features enabled
- run: RUST_BACKTRACE=1 cargo test --all-features
working-directory: yjit
# Check that we can build in release mode too
- run: cargo build --release
working-directory: yjit
lint:
name: cargo clippy
# GitHub Action's image seems to already contain a Rust 1.58.0.
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Check that we don't have linting errors in release mode, too
- run: cargo clippy --all-targets --all-features
working-directory: yjit
make:
strategy:
fail-fast: false
matrix:
include:
- test_task: 'yjit-bindgen'
hint: 'To fix: use patch in logs'
configure: '--with-gcc=clang-14 --enable-yjit=dev'
libclang_path: '/usr/lib/llvm-14/lib/libclang.so.1'
- test_task: 'check'
# YJIT should be automatically built in release mode on x86-64 Linux with rustc present
#configure: "--enable-yjit RUSTC='rustc +1.58.0'"
configure: "RUSTC='rustc +1.58.0'"
rust_version: '1.58.0'
- test_task: 'check'
configure: '--enable-yjit=dev'
- test_task: 'check'
configure: '--enable-yjit=dev'
yjit_opts: '--yjit-call-threshold=1 --yjit-verify-ctx --yjit-code-gc'
specopts: '-T --yjit-call-threshold=1 -T --yjit-verify-ctx -T --yjit-code-gc'
- test_task: 'test-bundled-gems'
configure: '--enable-yjit=dev'
- test_task: 'yjit-bench'
configure: '--enable-yjit=dev'
yjit_bench_opts: '--yjit-stats'
continue-on-test_task: true
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.yjit_opts }}
YJIT_BENCH_OPTS: ${{ matrix.yjit_bench_opts }}
SPECOPTS: ${{ matrix.specopts }}
RUBY_DEBUG: ci
BUNDLE_JOBS: 8 # for yjit-bench
RUST_BACKTRACE: 1
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/ubuntu
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: Install Rust
if: ${{ matrix.rust_version }}
run: rustup install ${{ matrix.rust_version }} --profile minimal
- name: Run configure
run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install ${{ matrix.configure }}
- run: make incs
- run: make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}
- run: make
- name: Verify that --yjit-dump-disasm works
run: |
./miniruby --yjit-call-threshold=1 --yjit-dump-disasm -e0 | \
wc -l | \
ruby -ne 'raise "Disassembly seems broken in dev build (output has too few lines)" unless $_.to_i > 10'
if: ${{ contains(matrix.configure, 'jit=dev') }}
- name: Enable YJIT through ENV
run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV
# Check that the binary was built with YJIT
- name: Check YJIT enabled
run: ./miniruby --yjit -v | grep "+YJIT"
- name: Set up Launchable
id: launchable
uses: ./.github/actions/launchable/setup
with:
os: ubuntu-22.04
test-opts: ${{ matrix.configure }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
is-yjit: true
continue-on-error: true
timeout-minutes: 3
- name: make ${{ matrix.test_task }}
run: |
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"} \
RUN_OPTS="$RUN_OPTS" MSPECOPT=--debug SPECOPTS="$SPECOPTS" \
YJIT_BENCH_OPTS="$YJIT_BENCH_OPTS" YJIT_BINDGEN_DIFF_OPTS="$YJIT_BINDGEN_DIFF_OPTS"
timeout-minutes: 90
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
PRECHECK_BUNDLED_GEMS: 'no'
SYNTAX_SUGGEST_TIMEOUT: '5'
YJIT_BINDGEN_DIFF_OPTS: '--exit-code'
LIBCLANG_PATH: ${{ matrix.libclang_path }}
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
continue-on-error: ${{ matrix.continue-on-test_task || false }}
- name: Show ${{ github.event.pull_request.base.ref }} GitHub URL for yjit-bench comparison
run: echo "https://github.com/${BASE_REPO}/commit/${BASE_SHA}"
env:
BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
if: ${{ matrix.test_task == 'yjit-bench' && startsWith(github.event_name, 'pull') }}
- uses: ./.github/actions/slack
with:
label: ${{ matrix.test_task }} ${{ matrix.configure }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: ubuntu-latest
needs: [make]
steps:
- run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build

View file

@ -1,178 +0,0 @@
name: ZJIT macOS Arm64
on:
push:
branches:
- master
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
types:
- opened
- synchronize
- reopened
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
strategy:
fail-fast: false
matrix:
include:
- test_task: 'zjit-check'
configure: '--enable-yjit=dev --enable-zjit'
rust_version: "1.85.0"
- test_task: 'ruby' # build test for combo build
configure: '--enable-yjit --enable-zjit'
- test_task: 'zjit-test-all'
configure: '--enable-zjit=dev'
testopts: '--seed=11831'
- test_task: 'btest'
configure: '--enable-zjit=dev'
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.zjit_opts }}
SPECOPTS: ${{ matrix.specopts }}
TESTOPTS: ${{ matrix.testopts }}
runs-on: macos-14
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- name: Install libraries
uses: ./.github/actions/setup/macos
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: Install Rust
if: ${{ matrix.rust_version }}
run: |
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}
- uses: taiki-e/install-action@v2
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
- name: Run configure
run: ../src/configure -C --disable-install-doc ${{ matrix.configure }}
- run: make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}
- run: make
- name: Verify that --zjit-dump-disasm works
run: |
./miniruby --zjit-call-threshold=1 --zjit-dump-disasm -e0 | \
wc -l | \
ruby -ne 'raise "Disassembly seems broken in dev build (output has too few lines)" unless $_.to_i > 10'
if: ${{ contains(matrix.configure, 'jit=dev') }}
- name: btest
run: |
RUST_BACKTRACE=1 ruby --disable=gems ../src/bootstraptest/runner.rb --ruby="./miniruby -I../src/lib -I. -I.ext/common --zjit-call-threshold=1" \
../src/bootstraptest/test_attr.rb \
../src/bootstraptest/test_autoload.rb \
../src/bootstraptest/test_block.rb \
../src/bootstraptest/test_class.rb \
../src/bootstraptest/test_constant_cache.rb \
../src/bootstraptest/test_env.rb \
../src/bootstraptest/test_eval.rb \
../src/bootstraptest/test_exception.rb \
../src/bootstraptest/test_fiber.rb \
../src/bootstraptest/test_finalizer.rb \
../src/bootstraptest/test_flip.rb \
../src/bootstraptest/test_flow.rb \
../src/bootstraptest/test_fork.rb \
../src/bootstraptest/test_gc.rb \
../src/bootstraptest/test_insns.rb \
../src/bootstraptest/test_io.rb \
../src/bootstraptest/test_jump.rb \
../src/bootstraptest/test_literal.rb \
../src/bootstraptest/test_literal_suffix.rb \
../src/bootstraptest/test_load.rb \
../src/bootstraptest/test_marshal.rb \
../src/bootstraptest/test_massign.rb \
../src/bootstraptest/test_method.rb \
../src/bootstraptest/test_objectspace.rb \
../src/bootstraptest/test_proc.rb \
../src/bootstraptest/test_ractor.rb \
../src/bootstraptest/test_string.rb \
../src/bootstraptest/test_struct.rb \
../src/bootstraptest/test_syntax.rb \
../src/bootstraptest/test_thread.rb \
../src/bootstraptest/test_yjit_30k_ifelse.rb \
../src/bootstraptest/test_yjit_30k_methods.rb \
../src/bootstraptest/test_yjit_rust_port.rb
# ../src/bootstraptest/test_yjit.rb \
if: ${{ matrix.test_task == 'btest' }}
- name: make ${{ matrix.test_task }}
run: >-
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
RUN_OPTS="$RUN_OPTS"
SPECOPTS="$SPECOPTS"
TESTOPTS="$TESTOPTS"
timeout-minutes: 60
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
SYNTAX_SUGGEST_TIMEOUT: '5'
PRECHECK_BUNDLED_GEMS: 'no'
TESTS: ${{ matrix.tests }}
continue-on-error: ${{ matrix.continue-on-test_task || false }}
if: ${{ matrix.test_task != 'btest' }}
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: macos-14
needs: [make]
steps:
- run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build

View file

@ -1,203 +0,0 @@
name: ZJIT Ubuntu
on:
push:
branches:
- master
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
types:
- opened
- synchronize
- reopened
# Do not use paths-ignore for required status checks
# 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
merge_group:
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
permissions:
contents: read
jobs:
make:
strategy:
fail-fast: false
matrix:
include:
- test_task: 'zjit-bindgen'
hint: 'To fix: use patch in logs'
configure: '--enable-zjit=dev --with-gcc=clang-14'
libclang_path: '/usr/lib/llvm-14/lib/libclang.so.1'
- test_task: 'zjit-check'
configure: '--enable-yjit --enable-zjit=dev'
rust_version: '1.85.0'
- test_task: 'zjit-test-all'
configure: '--enable-zjit=dev'
testopts: '--seed=18140'
- test_task: 'btest'
configure: '--enable-zjit=dev'
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.zjit_opts }}
YJIT_BENCH_OPTS: ${{ matrix.yjit_bench_opts }}
SPECOPTS: ${{ matrix.specopts }}
TESTOPTS: ${{ matrix.testopts }}
RUBY_DEBUG: ci
BUNDLE_JOBS: 8 # for yjit-bench
RUST_BACKTRACE: 1
runs-on: ubuntu-22.04
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Document')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Document')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
- uses: ./.github/actions/setup/ubuntu
- uses: ruby/setup-ruby@a9bfc2ecf3dd40734a9418f89a7e9d484c32b990 # v1.248.0
with:
ruby-version: '3.1'
bundler: none
- uses: taiki-e/install-action@v2
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10
- name: Install Rust
if: ${{ matrix.rust_version }}
run: |
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}
- name: Install rustfmt
if: ${{ matrix.test_task == 'zjit-bindgen' }}
run: rustup component add rustfmt
- name: Run configure
run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install ${{ matrix.configure }}
- run: make incs
- run: make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}
- run: make
- name: Verify that --zjit-dump-disasm works
run: |
./miniruby --zjit-call-threshold=1 --zjit-dump-disasm -e0 | \
wc -l | \
ruby -ne 'raise "Disassembly seems broken in dev build (output has too few lines)" unless $_.to_i > 10'
if: ${{ contains(matrix.configure, 'jit=dev') }}
# Check that the binary was built with ZJIT
- name: Check ZJIT enabled
run: ./miniruby --zjit -v | grep "+ZJIT"
if: ${{ matrix.configure != '--disable-zjit' }}
- name: btest
run: |
RUST_BACKTRACE=1 ruby --disable=gems ../src/bootstraptest/runner.rb --ruby="./miniruby -I../src/lib -I. -I.ext/common --zjit-call-threshold=1" \
../src/bootstraptest/test_attr.rb \
../src/bootstraptest/test_autoload.rb \
../src/bootstraptest/test_block.rb \
../src/bootstraptest/test_class.rb \
../src/bootstraptest/test_constant_cache.rb \
../src/bootstraptest/test_env.rb \
../src/bootstraptest/test_env.rb \
../src/bootstraptest/test_exception.rb \
../src/bootstraptest/test_fiber.rb \
../src/bootstraptest/test_finalizer.rb \
../src/bootstraptest/test_flip.rb \
../src/bootstraptest/test_flow.rb \
../src/bootstraptest/test_fork.rb \
../src/bootstraptest/test_gc.rb \
../src/bootstraptest/test_insns.rb \
../src/bootstraptest/test_io.rb \
../src/bootstraptest/test_jump.rb \
../src/bootstraptest/test_literal.rb \
../src/bootstraptest/test_literal_suffix.rb \
../src/bootstraptest/test_load.rb \
../src/bootstraptest/test_marshal.rb \
../src/bootstraptest/test_massign.rb \
../src/bootstraptest/test_method.rb \
../src/bootstraptest/test_objectspace.rb \
../src/bootstraptest/test_proc.rb \
../src/bootstraptest/test_ractor.rb \
../src/bootstraptest/test_string.rb \
../src/bootstraptest/test_struct.rb \
../src/bootstraptest/test_syntax.rb \
../src/bootstraptest/test_thread.rb \
../src/bootstraptest/test_yjit_30k_ifelse.rb \
../src/bootstraptest/test_yjit_30k_methods.rb \
../src/bootstraptest/test_yjit_rust_port.rb
# ../src/bootstraptest/test_yjit.rb \
if: ${{ matrix.test_task == 'btest' }}
- name: make ${{ matrix.test_task }}
run: >-
make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
RUN_OPTS="$RUN_OPTS" MSPECOPT=--debug SPECOPTS="$SPECOPTS"
TESTOPTS="$TESTOPTS"
ZJIT_BINDGEN_DIFF_OPTS="$ZJIT_BINDGEN_DIFF_OPTS"
timeout-minutes: 90
env:
RUBY_TESTOPTS: '-q --tty=no'
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''
PRECHECK_BUNDLED_GEMS: 'no'
SYNTAX_SUGGEST_TIMEOUT: '5'
ZJIT_BINDGEN_DIFF_OPTS: '--exit-code'
LIBCLANG_PATH: ${{ matrix.libclang_path }}
TESTS: ${{ matrix.tests }}
continue-on-error: ${{ matrix.continue-on-test_task || false }}
if: ${{ matrix.test_task != 'btest' }}
result:
if: ${{ always() }}
name: ${{ github.workflow }} result
runs-on: ubuntu-22.04
needs: [make]
steps:
- name: ${{ github.workflow }} jobs have failed
run: exit 1
working-directory:
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
defaults:
run:
working-directory: build