mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Bumps the github-actions group with 1 update in the / directory: [ruby/setup-ruby](https://github.com/ruby/setup-ruby). Updates `ruby/setup-ruby` from 1.334.0 to 1.335.0 - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/26e5b7d197ebf60545ee9667bcbace0be11ccaec...7f797815d8adceb1c412e7abefdd1ab4abc47a5f) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.335.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
174 lines
6.2 KiB
YAML
174 lines
6.2 KiB
YAML
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
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
persist-credentials: false
|
|
|
|
- uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
|
|
with:
|
|
ruby-version: head
|
|
|
|
- uses: ./.github/actions/setup/directories
|
|
with:
|
|
makeup: true
|
|
# Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
|
|
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
|
|
|
|
- name: Re-generate Makefiles
|
|
run: |
|
|
# config.status needs to run as a shell script
|
|
{ echo ':&&exit'; cat tool/prereq.status; } > config.status
|
|
: # same as actions/setup/directories/action.yml
|
|
for mk in Makefile GNUmakefile; do
|
|
sed -f tool/prereq.status template/$mk.in > $mk
|
|
done
|
|
|
|
- name: Check for code styles
|
|
run: |
|
|
set -x
|
|
ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA"
|
|
env:
|
|
GITHUB_OLD_SHA: ${{ github.event.pull_request.base.sha }}
|
|
GITHUB_NEW_SHA: ${{ github.event.pull_request.merge_commit_sha }}
|
|
# Skip 'push' events because post_push.yml fixes them on push
|
|
if: ${{ github.repository == 'ruby/ruby' && startsWith(github.event_name, 'pull') }}
|
|
|
|
- name: Check if date in man pages is up-to-date
|
|
run: |
|
|
git fetch origin --depth=1 "${GITHUB_OLD_SHA}"
|
|
make V=1 GIT=git BASERUBY=ruby update-man-date \
|
|
MANPAGES_TO_UPDATE="$(git diff --exit-code --name-only "${GITHUB_OLD_SHA}" HEAD -- man)"
|
|
git diff --color --no-ext-diff --ignore-submodules --exit-code -- man
|
|
env:
|
|
GITHUB_OLD_SHA: ${{ github.event.pull_request.base.sha }}
|
|
if: ${{ startsWith(github.event_name, 'pull') }}
|
|
|
|
- name: Check for bash specific substitution in configure.ac
|
|
run: |
|
|
git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac | sed "s/^/::error::/"
|
|
test ${PIPESTATUS[0]} != 0
|
|
if: always()
|
|
|
|
- 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 "::error::$header"
|
|
done
|
|
exit $fail
|
|
working-directory: include
|
|
if: always()
|
|
|
|
- name: Check for __has_builtin functions
|
|
run: |
|
|
missing=()
|
|
for check in $(git grep -h --no-line-number -o '__has_builtin(__[_a-zA-Z0-9]*)' | sort -u); do
|
|
func="${check#__has_builtin(}"
|
|
func="${func%)}"
|
|
git -P grep -w "RBIMPL_HAS_BUILTIN_$func" > /dev/null || missing+=("-e" "$check")
|
|
done
|
|
[ ${#missing[@]} = 0 ] || {
|
|
echo "::error::Missing __has_builtin fallbacks:"
|
|
git -P grep -F "${missing[@]}" | sed 's/^/::error::/' | head
|
|
false
|
|
}
|
|
if: always()
|
|
|
|
- id: now
|
|
run: |
|
|
date +"mon=%-m"%n"day=%-d" >> $GITHUB_OUTPUT
|
|
env:
|
|
TZ: Asia/Tokyo
|
|
if: always()
|
|
|
|
- id: deprecation
|
|
run: |
|
|
eval $(sed -n 's/^#define RUBY_API_VERSION_\(MAJOR\|MINOR\) /\1=/p' include/ruby/version.h)
|
|
if git --no-pager grep --color -o 'rb_warn_deprecated_to_remove_at('$MAJOR'\.'$MINOR',.*' -- '*.c' >&2; then
|
|
false
|
|
else
|
|
true
|
|
fi
|
|
continue-on-error: ${{ steps.now.outputs.mon < 12 }}
|
|
if: always()
|
|
|
|
- run: make check-depends
|
|
if: always()
|
|
|
|
- name: Check if to generate documents
|
|
id: rdoc
|
|
run: |
|
|
set -- $(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems)
|
|
{ echo version=$2; echo ref=$4; } >> $GITHUB_OUTPUT
|
|
if: always()
|
|
|
|
- name: Checkout rdoc
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: ruby/rdoc
|
|
ref: ${{ steps.rdoc.outputs.ref }}
|
|
path: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }}
|
|
persist-credentials: false
|
|
if: ${{ always() && steps.rdoc.outputs.ref != '' }}
|
|
|
|
- name: Generate rdoc scripts
|
|
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-${{ steps.rdoc.outputs.version }}
|
|
if: ${{ always() && steps.rdoc.outputs.ref != '' }}
|
|
|
|
- name: Core docs coverage
|
|
run: |
|
|
make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig rdoc-coverage
|
|
if: always()
|
|
|
|
- name: Generate docs
|
|
id: docs
|
|
run: |
|
|
make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig HTMLOUT=html html
|
|
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
|
|
# Generate only when document commit/PR
|
|
if: >-
|
|
${{always() && (false
|
|
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|
|
|| contains(github.event.head_commit.message, '[DOC]')
|
|
|| contains(github.event.pull_request.title, '[DOC]')
|
|
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|
|
)}}
|
|
|
|
- name: Upload docs
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
path: html
|
|
name: ${{ steps.docs.outputs.htmlout }}
|
|
if: ${{ always() && 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() }}
|