Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-v…
Browse files Browse the repository at this point in the history
…ersion-3
  • Loading branch information
rm155 committed Jul 19, 2024
2 parents ba6a53e + aa3030a commit aed24eb
Show file tree
Hide file tree
Showing 1,494 changed files with 36,509 additions and 36,612 deletions.
26 changes: 23 additions & 3 deletions .github/actions/launchable/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ inputs:
Directory to (re-)checkout source codes. Launchable retrives the commit information
from the directory.
launchable-workspace:
required: true
default: ${{ github.event.repository.name }}
description: >-
A workspace name in Launchable
test-task:
required: true
default: ${{ matrix.test_task }}
description: >-
A test task that determine which tests are executed.
This value is used in the Launchable flavor.
runs:
using: composite

Expand Down Expand Up @@ -77,18 +90,25 @@ runs:
: # 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
echo "LAUNCHABLE_WORKSPACE=${{ inputs.launchable-workspace }}" >> $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 path
shell: bash
working-directory: ${{ inputs.srcdir }}
# Since updated PATH variable will be available in only subsequent actions, we need to add the path beforehand.
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
run: echo "$(python -msite --user-base)/bin" >> $GITHUB_PATH
if: steps.enable-launchable.outputs.enable-launchable && startsWith(inputs.os, 'macos')

- name: Set up Launchable
shell: bash
working-directory: ${{ inputs.srcdir }}
run: |
set -x
echo "$(python -msite --user-base)/bin" >> $GITHUB_PATH
pip install --user launchable
launchable verify || true
: # The build name cannot include a slash, so we replace the string here.
Expand Down Expand Up @@ -135,7 +155,7 @@ runs:
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}
launchable record tests --flavor os=${{ inputs.os }} --flavor test_task=${{ inputs.test-task }} --flavor test_opts=${test_opts} raw ${report_path}
rm -f ${report_path}
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/annocheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
builddir: build
makeup: true

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/baseruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- ruby-3.3

steps:
- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

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

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
jobs:
analyze:
name: Analyze
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
Expand All @@ -56,10 +56,7 @@ jobs:
matrix:
include:
- language: cpp
os: ubuntu-latest
# ruby analysis used large memory. We need to use a larger runner.
- language: ruby
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'ubuntu-latest' }}

steps:
- name: Checkout repository
Expand All @@ -80,15 +77,15 @@ jobs:
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb

- name: Initialize CodeQL
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
with:
category: '/language:${{ matrix.language }}'
upload: False
Expand Down Expand Up @@ -118,7 +115,7 @@ jobs:
continue-on-error: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Dependabot metadata
uses: dependabot/fetch-metadata@5e5f99653a5b510e8555840e80cbf1514ad4af38 # v2.1.0
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
id: metadata

- name: Wait for status checks
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ jobs:
matrix:
include:
- test_task: check
os: macos-14
- 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-12
- test_task: check
Expand All @@ -39,7 +43,7 @@ jobs:
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}

runs-on: ${{ matrix.os || (github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14') }}
runs-on: ${{ matrix.os }}

if: >-
${{!(false
Expand Down Expand Up @@ -94,7 +98,7 @@ jobs:
- name: Set up Launchable
uses: ./.github/actions/launchable/setup
with:
os: ${{ matrix.os || (github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14') }}
os: ${{ matrix.os }}
test-opts: ${{ matrix.test_opts }}
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
Expand Down Expand Up @@ -129,7 +133,7 @@ jobs:

- uses: ./.github/actions/slack
with:
label: ${{ matrix.os || (github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14') }} / ${{ matrix.test_task }}
label: ${{ matrix.os }} / ${{ matrix.test_task }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
steps:
- name: Set up Ruby & MSYS2
uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: ${{ matrix.baseruby }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rjit-bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.1'

Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/rjit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
srcdir: src
builddir: build
makeup: true
# Set fetch-depth: 10 so that Launchable can receive commits information.
fetch-depth: 10

- name: Run configure
env:
Expand All @@ -77,19 +79,33 @@ jobs:
- run: $SETARCH make

- name: Set up Launchable
uses: ./.github/actions/launchable/setup
with:
os: ubuntu-22.04
test-task: test
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
builddir: build
srcdir: src
launchable-workspace: ruby-make-btest
test-opts: ${{ matrix.run_opts }}
continue-on-error: true

- name: make test
run: |
$SETARCH make -s test RUN_OPTS="$RUN_OPTS"
timeout-minutes: 30
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '--tty=no'
RUBY_TESTOPTS: >-
${{ env.TESTS }}
--tty=no
RUN_OPTS: ${{ matrix.run_opts }}

- name: make test-all
run: |
$SETARCH make -s test-all RUN_OPTS="$RUN_OPTS"
timeout-minutes: 40
timeout-minutes: 60
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-q --tty=no'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v2.1.27
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v2.1.27
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/spec_guards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
- test_task: check
configure: '--enable-shared --enable-load-relative'
- test_task: check
configure: '--with-shared-gc'
shared_gc: true
shared_gc_dir: '/home/runner/ruby_gc'
configure: '--with-shared-gc=/home/runner/ruby_gc'
- test_task: test-bundler-parallel
- test_task: test-bundled-gems
- test_task: check
Expand Down Expand Up @@ -67,7 +69,7 @@ jobs:
with:
arch: ${{ matrix.arch }}

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.0'
bundler: none
Expand All @@ -93,6 +95,13 @@ jobs:
- run: $SETARCH make prepare-gems
if: ${{ matrix.test_task == 'test-bundled-gems' }}

- name: Build shared GC
run: >
echo "RUBY_GC_LIBRARY=librubygc.default.so" >> $GITHUB_ENV &&
mkdir ${{ matrix.shared_gc_dir }} &&
make shared-gc SHARED_GC=default
if: ${{ matrix.shared_gc }}

- run: $SETARCH make

- name: Set test options for skipped tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: |
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.0'
bundler: none
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- run: tar cfz ../install.tar.gz -C ../install .

- name: Upload artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: ruby-wasm-install
path: ${{ github.workspace }}/install.tar.gz
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
- 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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: ${{ github.event_name == 'pull_request' }}
with:
name: github-pr-info
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
OS_VER: windows-${{ matrix.vs < 2022 && '2019' || matrix.vs }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target || 'x64' }}-windows

steps:
- run: md build
Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
${{ steps.find-tools.outputs.needs }}
if: ${{ steps.find-tools.outputs.needs != '' }}

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0
with:
ruby-version: '3.0'
bundler: none
Expand Down Expand Up @@ -143,25 +144,16 @@ jobs:

- name: Install libraries with vcpkg
run: |
vcpkg install --triplet x64-windows
vcpkg install
working-directory: src
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

# We use OpenSSL instealled by vcpkg instead
- name: disable system OpenSSL
run: |
for %%I in (libcrypto-1_1-x64 libssl-1_1-x64) do (
ren c:\Windows\System32\%%I.dll %%I.dll_
)
# windows-2019 image doesn't have OpenSSL as of 2023/9/14
if: ${{ matrix.vs != 2019 }}

# 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=D:/a/ruby/ruby/src/vcpkg_installed/x64-windows
--with-opt-dir=D:/a/ruby/ruby/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
- run: nmake prepare-vcpkg

Expand Down
Loading

0 comments on commit aed24eb

Please sign in to comment.