From a80f1dc6b1dcde1cf47c30b4e2e35f8f9a1baa54 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sun, 27 Dec 2020 12:28:55 +0000 Subject: [PATCH] [expectations] Updated ci build scripts (from rspec-dev)4-0-dev This commit was imported from https://github.com/rspec/rspec-expectations/commit/058463f2bd13371c52e915ce93a50c847cca337e. --- rspec-expectations/.github/workflows/ci.yml | 8 ++++--- rspec-expectations/.rubocop_rspec_base.yml | 2 +- rspec-expectations/script/ci_functions.sh | 2 +- .../script/clone_all_rspec_repos | 2 +- rspec-expectations/script/functions.sh | 2 +- .../script/predicate_functions.sh | 24 ++++++++++++++++++- rspec-expectations/script/run_build | 4 ++-- .../update_rubygems_and_install_bundler | 2 +- 8 files changed, 35 insertions(+), 11 deletions(-) diff --git a/rspec-expectations/.github/workflows/ci.yml b/rspec-expectations/.github/workflows/ci.yml index bd016a09d..200992891 100644 --- a/rspec-expectations/.github/workflows/ci.yml +++ b/rspec-expectations/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI @@ -22,17 +22,19 @@ jobs: strategy: matrix: ruby: - - 3.0.0-rc1 + - 3.0 - 2.7 - 2.6 - 2.5 - 2.4 - 2.3 - - ruby-head env: - DIFF_LCS_VERSION: "> 1.4.3" include: + - ruby: ruby-head + env: + RUBY_HEAD: true - ruby: jruby-9.2.13.0 env: JRUBY_OPTS: "--dev" diff --git a/rspec-expectations/.rubocop_rspec_base.yml b/rspec-expectations/.rubocop_rspec_base.yml index 3f9a49c0b..8e85a4b2b 100644 --- a/rspec-expectations/.rubocop_rspec_base.yml +++ b/rspec-expectations/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/rspec-expectations/script/ci_functions.sh b/rspec-expectations/script/ci_functions.sh index 3e41a097c..b89f191d4 100644 --- a/rspec-expectations/script/ci_functions.sh +++ b/rspec-expectations/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # Taken from: diff --git a/rspec-expectations/script/clone_all_rspec_repos b/rspec-expectations/script/clone_all_rspec_repos index 881880406..bc60e8b41 100755 --- a/rspec-expectations/script/clone_all_rspec_repos +++ b/rspec-expectations/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/rspec-expectations/script/functions.sh b/rspec-expectations/script/functions.sh index b8ffb66fa..0acbfc7e3 100644 --- a/rspec-expectations/script/functions.sh +++ b/rspec-expectations/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/rspec-expectations/script/predicate_functions.sh b/rspec-expectations/script/predicate_functions.sh index 6c10d1543..ec63e52bf 100644 --- a/rspec-expectations/script/predicate_functions.sh +++ b/rspec-expectations/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. function is_mri { @@ -11,6 +11,28 @@ function is_mri { fi; } +function is_ruby_head { + # This checks for the presence of our CI's ruby-head env variable + if [ -z ${RUBY_HEAD+x} ]; then + return 1 + else + return 0 + fi; +} + +function supports_cross_build_checks { + if is_mri; then + # We don't run cross build checks on ruby-head + if is_ruby_head; then + return 1 + else + return 0 + fi + else + return 1 + fi +} + function is_jruby { if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then # RUBY_ENGINE only returns 'ruby' on MRI. diff --git a/rspec-expectations/script/run_build b/rspec-expectations/script/run_build index bcbc19cfb..5799542ff 100755 --- a/rspec-expectations/script/run_build +++ b/rspec-expectations/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e @@ -28,7 +28,7 @@ if style_and_lint_enforced; then fold "rubocop" check_style_and_lint fi -if is_mri; then +if supports_cross_build_checks; then fold "one-by-one specs" run_specs_one_by_one run_all_spec_suites else diff --git a/rspec-expectations/script/update_rubygems_and_install_bundler b/rspec-expectations/script/update_rubygems_and_install_bundler index d8fd66ff7..d797637ee 100755 --- a/rspec-expectations/script/update_rubygems_and_install_bundler +++ b/rspec-expectations/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-21T20:11:14+00:00 from the rspec-dev repo. +# This file was generated on 2020-12-27T12:28:55+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e