Skip to content

Commit

Permalink
Merge branch 'mmtk' into feature/fork
Browse files Browse the repository at this point in the history
  • Loading branch information
wks committed Mar 25, 2024
2 parents 2b04d0c + ff16207 commit 491e1e7
Show file tree
Hide file tree
Showing 2,011 changed files with 51,272 additions and 28,225 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ fc4acf8cae82e5196186d3278d831f2438479d91
# Make prism_compile.c indentation consistent
40b2c8e5e7e6e5f83cee9276dc9c1922a69292d6
d2c5867357ed88eccc28c2b3bd4a46e206e7ff85

# Miss-and-revived commits
a0f7de814ae5c299d6ce99bed5fb308a05d50ba0
d4e24021d39e1f80f0055b55d91f8d5f22e15084
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# YJIT sources and tests
yjit* @ruby/yjit
yjit/**/* @ruby/yjit
doc/yjit/* @ruby/yjit
bootstraptest/test_yjit* @ruby/yjit
test/ruby/test_yjit* @ruby/yjit
yjit/src/cruby_bindings.inc.rs
149 changes: 149 additions & 0 deletions .github/actions/launchable/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Set up Launchable
description: >-
Install the required dependencies and execute the necessary Launchable commands for test recording
inputs:
report-path:
default: launchable_reports.json
required: true
description: The file path of the test report for uploading to Launchable

os:
required: true
description: The operating system that CI runs on. This value is used in Launchable flavor.

test-opts:
default: none
required: false
description: >-
Test options that determine how tests are run.
This value is used in the Launchable flavor.
launchable-token:
required: false
description: >-
Launchable token is needed if you want to run Launchable on your forked repository.
See https://github.com/ruby/ruby/wiki/CI-Servers#launchable-ci for details.
builddir:
required: false
default: ${{ github.workspace }}
description: >-
Directory to create Launchable report file.
srcdir:
required: false
default: ${{ github.workspace }}
description: >-
Directory to (re-)checkout source codes. Launchable retrives the commit information
from the directory.
outputs:
enable-launchable:
description: "The boolean value indicating whether Launchable is enabled or not"
value: ${{ steps.enable-launchable.outputs.enable-launchable }}

runs:
using: composite

steps:
- name: Enable Launchable conditionally
id: enable-launchable
run: echo "enable-launchable=true" >> $GITHUB_OUTPUT
shell: bash
if: >-
${{
(github.repository == 'ruby/ruby' ||
(github.repository != 'ruby/ruby' && env.LAUNCHABLE_TOKEN)) &&
(matrix.test_task == 'check' || matrix.test_task == 'test-all')
}}
# Launchable CLI requires Python and Java.
# https://www.launchableinc.com/docs/resources/cli-reference/
- name: Set up Python
uses: actions/setup-python@871daa956ca9ea99f3c3e30acb424b7960676734 # v5.0.0
with:
python-version: "3.x"
if: steps.enable-launchable.outputs.enable-launchable

- name: Set up Java
uses: actions/setup-java@7a445ee88d4e23b52c33fdc7601e40278616c7f8 # v4.0.0
with:
distribution: 'temurin'
java-version: '17'
if: steps.enable-launchable.outputs.enable-launchable

- name: Set environment variables for Launchable
shell: bash
run: |
: # GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App.
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42
echo "GITHUB_PULL_REQUEST_URL=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
: # The following envs are necessary in Launchable tokenless authentication.
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20
echo "LAUNCHABLE_ORGANIZATION=${{ github.repository_owner }}" >> $GITHUB_ENV
echo "LAUNCHABLE_WORKSPACE=${{ github.event.repository.name }}" >> $GITHUB_ENV
: # https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71
echo "GITHUB_PR_HEAD_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
echo "LAUNCHABLE_TOKEN=${{ inputs.launchable-token }}" >> $GITHUB_ENV
if: steps.enable-launchable.outputs.enable-launchable

- name: Set up Launchable
shell: bash
working-directory: ${{ inputs.srcdir }}
run: |
set -x
PATH=$PATH:$(python -msite --user-base)/bin
echo "PATH=$PATH" >> $GITHUB_ENV
pip install --user launchable
launchable verify
: # The build name cannot include a slash, so we replace the string here.
github_ref="${{ github.ref }}"
github_ref="${github_ref//\//_}"
: # With the --name option, we need to configure a unique identifier for this build.
: # To avoid setting the same build name as the CI which runs on other branches, we use the branch name here.
: #
: # FIXME: Need to fix `WARNING: Failed to process a change to a file`.
: # https://github.com/launchableinc/cli/issues/786
launchable record build --name ${github_ref}_${GITHUB_PR_HEAD_SHA}
echo "TESTS=${TESTS} --launchable-test-reports=${{ inputs.report-path }}" >> $GITHUB_ENV
if: steps.enable-launchable.outputs.enable-launchable

- name: Variables to report Launchable
id: variables
shell: bash
run: |
set -x
: # flavor
test_opts="${{ inputs.test-opts }}"
test_opts="${test_opts// /}"
test_opts="${test_opts//=/:}"
echo test-opts="$test_opts" >> $GITHUB_OUTPUT
: # report-path from srcdir
if [ "${srcdir}" = "${{ github.workspace }}" ]; then
dir=
else
# srcdir must be equal to or under workspace
dir=$(echo ${srcdir:+${srcdir}/} | sed 's:[^/][^/]*/:../:g')
fi
report_path="${dir}${builddir:+${builddir}/}${report_path}"
echo report-path="${report_path}" >> $GITHUB_OUTPUT
if: steps.enable-launchable.outputs.enable-launchable
env:
srcdir: ${{ inputs.srcdir }}
builddir: ${{ inputs.builddir }}
report_path: ${{ inputs.report-path }}

- name: Record test results in Launchable
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
with:
shell: bash
working-directory: ${{ inputs.srcdir }}
post: |
: # record
launchable record tests --flavor os=${{ inputs.os }} --flavor test_task=${{ matrix.test_task }} --flavor test_opts=${test_opts} raw ${report_path}
rm -f ${report_path}
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
env:
test_opts: ${{ steps.variables.outputs.test-opts }}
report_path: ${{ steps.variables.outputs.report-path }}
43 changes: 40 additions & 3 deletions .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ inputs:
description: >-
If set to true, creates dummy files in build dir.
fetch-depth:
required: false
default: '1'
description: The depth of commit history fetched from the remote repository

clean:
required: false
type: boolean
default: ''
description: >-
If set to true, clean build directory.
outputs: {} # nothing?

runs:
Expand Down Expand Up @@ -79,8 +91,9 @@ runs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: ${{ inputs.srcdir }}
fetch-depth: ${{ inputs.fetch-depth }}

- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: ${{ inputs.srcdir }}/.downloaded-cache
key: downloaded-cache
Expand Down Expand Up @@ -129,9 +142,33 @@ runs:
- if: inputs.dummy-files == 'true'
shell: bash
id: dummy-files
working-directory: ${{ inputs.builddir }}
run: |
: Create dummy files in build dir
for basename in {a..z} {A..Z} {0..9} foo bar test zzz; do
echo > ${basename}.rb "raise %(do not load ${basename}.rb)"
set {{a..z},{A..Z},{0..9},foo,bar,test,zzz}.rb
for file; do \
echo > $file "raise 'do not load $file'"; \
done
# drop {a..z}.rb if case-insensitive filesystem
grep -F A.rb a.rb > /dev/null && set "${@:27}"
echo clean="cd ${{ inputs.builddir }} && rm $*" >> $GITHUB_OUTPUT
- if: inputs.clean == 'true'
shell: bash
id: clean
run: |
echo distclean='make -C ${{ inputs.builddir }} distclean' >> $GITHUB_OUTPUT
echo remained-files='find ${{ inputs.builddir }} -ls' >> $GITHUB_OUTPUT
[ "${{ inputs.builddir }}" = "${{ inputs.srcdir }}" ] ||
echo final='rmdir ${{ inputs.builddir }}' >> $GITHUB_OUTPUT
- name: clean
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
with:
working-directory:
post: |
${{ steps.dummy-files.outputs.clean }}
${{ steps.clean.outputs.distclean }}
${{ steps.clean.outputs.remained-files }}
${{ steps.clean.outputs.final }}
4 changes: 2 additions & 2 deletions .github/actions/setup/macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ runs:
- name: brew
shell: bash
run: |
brew install --quiet gmp libffi [email protected] zlib autoconf automake libtool readline
brew install --quiet gmp libffi [email protected] zlib autoconf automake libtool
- name: Set ENV
shell: bash
run: |
for lib in [email protected] readline; do
for lib in [email protected] gmp; do
CONFIGURE_ARGS="${CONFIGURE_ARGS:+$CONFIGURE_ARGS }--with-${lib%@*}-dir=$(brew --prefix $lib)"
done
echo CONFIGURE_ARGS="${CONFIGURE_ARGS}" >> $GITHUB_ENV
13 changes: 0 additions & 13 deletions .github/auto_request_review.yml

This file was deleted.

28 changes: 8 additions & 20 deletions .github/workflows/annocheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ on:
- '**/.document'
- '.*.yml'
merge_group:
paths-ignore:
- 'doc/**'
- '**/man'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'

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

jobs:
compile:
name: gcc-11 annocheck
name: test-annocheck

runs-on: ubuntu-latest

Expand All @@ -46,7 +39,9 @@ jobs:
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Documentation')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Documentation')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.actor == 'dependabot[bot]')
)}}
Expand Down Expand Up @@ -79,6 +74,11 @@ jobs:
builddir: build
makeup: true

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
with:
ruby-version: '3.0'
bundler: none

# Minimal flags to pass the check.
# -g0 disables backtraces when SEGV. Do not set that.
- name: Run configure
Expand All @@ -100,18 +100,6 @@ jobs:

- run: make

- run: make test

- run: make install

- run: make test-tool

### test-all doesn't work: https://github.com/ruby/ruby/actions/runs/4340112185/jobs/7578344307
# - run: make test-all TESTS='-- ruby -ext-'

### test-spec doesn't work: https://github.com/ruby/ruby/actions/runs/4340193212/jobs/7578505652
# - run: make test-spec

- run: make test-annocheck

- uses: ./.github/actions/slack
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/auto_request_review.yml

This file was deleted.

12 changes: 3 additions & 9 deletions .github/workflows/baseruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ on:
- '**/.document'
- '.*.yml'
merge_group:
paths-ignore:
- 'doc/**'
- '**/man'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'

concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
Expand All @@ -42,22 +35,23 @@ jobs:
if: >-
${{!(false
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.head_commit.message, 'Documentation')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.title, 'Documentation')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|| (github.event_name == 'push' && github.actor == 'dependabot[bot]')
)}}
strategy:
matrix:
ruby:
- ruby-2.7
- ruby-3.0
- ruby-3.1
- ruby-3.2
- ruby-3.3

steps:
- uses: ruby/setup-ruby@5daca165445f0ae10478593083f72ca2625e241d # v1.169.0
- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/bundled_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
- '.github/workflows/bundled_gems.yml'
- 'gems/bundled_gems'
merge_group:
branches: ['master']
paths:
- '.github/workflows/bundled_gems.yml'
- 'gems/bundled_gems'
schedule:
- cron: '45 6 * * *'
workflow_dispatch:
Expand Down
Loading

0 comments on commit 491e1e7

Please sign in to comment.