Skip to content

Commit

Permalink
Prevent cross build checks from running on ruby-head
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Dec 26, 2020
1 parent c80a35f commit 29e37b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ci/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
- 2.3
- 2.2
- 2.1.9
- 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"
Expand Down
22 changes: 22 additions & 0 deletions ci/script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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.
Expand Down
2 changes: 1 addition & 1 deletion ci/script/run_build
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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
Expand Down

0 comments on commit 29e37b7

Please sign in to comment.