Require Ruby 3.1
This commit is contained in:
parent
fc25915359
commit
987ebe3d6d
27
.github/workflows/tests.yml
vendored
27
.github/workflows/tests.yml
vendored
@ -294,12 +294,6 @@ jobs:
|
|||||||
- name: tests (macOS 13)
|
- name: tests (macOS 13)
|
||||||
test-flags: --coverage
|
test-flags: --coverage
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
- name: tests (Ubuntu 22.04; Ruby 2.6)
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
ruby: '2.6'
|
|
||||||
- name: tests (macOS 13; Ruby 2.6)
|
|
||||||
runs-on: macos-13
|
|
||||||
ruby: '2.6'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Homebrew
|
- name: Set up Homebrew
|
||||||
id: set-up-homebrew
|
id: set-up-homebrew
|
||||||
@ -313,21 +307,8 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
|
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
|
||||||
key: ${{ matrix.runs-on }}-tests-rubygems${{ matrix.ruby }}-${{ steps.set-up-homebrew.outputs.gems-hash }}
|
key: ${{ matrix.runs-on }}-tests-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
|
||||||
restore-keys: ${{ matrix.runs-on }}-tests-rubygems${{ matrix.ruby }}-
|
restore-keys: ${{ matrix.runs-on }}-tests-rubygems-
|
||||||
|
|
||||||
- name: Setup Ruby
|
|
||||||
if: matrix.ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ matrix.ruby }}
|
|
||||||
bundler: none
|
|
||||||
|
|
||||||
- name: Setup Ruby environment
|
|
||||||
if: matrix.ruby
|
|
||||||
run: |
|
|
||||||
echo "HOMEBREW_USE_RUBY_FROM_PATH=1" >> "${GITHUB_ENV}"
|
|
||||||
rm -rf "${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew/vendor/portable-ruby"
|
|
||||||
|
|
||||||
- run: brew config
|
- run: brew config
|
||||||
|
|
||||||
@ -341,8 +322,8 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: tests
|
path: tests
|
||||||
key: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec${{ matrix.ruby }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec-${{ github.sha }}
|
||||||
restore-keys: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec${{ matrix.ruby }}-
|
restore-keys: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec-
|
||||||
|
|
||||||
- name: Install brew tests dependencies
|
- name: Install brew tests dependencies
|
||||||
if: matrix.name != 'tests (generic OS)'
|
if: matrix.name != 'tests (generic OS)'
|
||||||
|
@ -504,9 +504,6 @@ case "$*" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# TODO: remove this after we want Dependabot to point to 3.1 minimum and system macOS Ruby code is gone
|
|
||||||
export HOMEBREW_RUBY3="1"
|
|
||||||
|
|
||||||
# TODO: bump version when new macOS is released or announced and update references in:
|
# TODO: bump version when new macOS is released or announced and update references in:
|
||||||
# - docs/Installation.md
|
# - docs/Installation.md
|
||||||
# - https://github.com/Homebrew/install/blob/HEAD/install.sh
|
# - https://github.com/Homebrew/install/blob/HEAD/install.sh
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# When bumping, run `brew vendor-gems --update=--ruby`
|
# When bumping, run `brew vendor-gems --update=--ruby`
|
||||||
# When bumping to a new major/minor version, also update the bounds in the Gemfile
|
# When bumping to a new major/minor version, also update the bounds in the Gemfile
|
||||||
export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.10
|
export HOMEBREW_REQUIRED_RUBY_VERSION=3.1
|
||||||
|
|
||||||
|
# TODO: remove this after we want Dependabot to point to 3.1 minimum
|
||||||
|
export HOMEBREW_RUBY3="1"
|
||||||
|
|
||||||
# HOMEBREW_LIBRARY is from the user environment
|
# HOMEBREW_LIBRARY is from the user environment
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
@ -10,24 +13,9 @@ test_ruby() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
supported_ruby_versions=()
|
"$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt \
|
||||||
if [[ -n "${HOMEBREW_RUBY3}" && -z "${HOMEBREW_USE_RUBY_FROM_PATH}" ]]
|
|
||||||
then
|
|
||||||
supported_ruby_versions+=("3.1.0")
|
|
||||||
fi
|
|
||||||
supported_ruby_versions+=("${HOMEBREW_REQUIRED_RUBY_VERSION}")
|
|
||||||
|
|
||||||
for ruby_version in "${supported_ruby_versions[@]}"
|
|
||||||
do
|
|
||||||
if "$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt \
|
|
||||||
"${HOMEBREW_LIBRARY}/Homebrew/utils/ruby_check_version_script.rb" \
|
"${HOMEBREW_LIBRARY}/Homebrew/utils/ruby_check_version_script.rb" \
|
||||||
"${ruby_version}" 2>/dev/null
|
"${HOMEBREW_REQUIRED_RUBY_VERSION}" 2>/dev/null
|
||||||
then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
can_use_ruby_from_path() {
|
can_use_ruby_from_path() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user