Skip to content

Commit

Permalink
Updated travis build scripts (from rspec-dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Nov 13, 2014
1 parent 2a7b518 commit e53ae6e
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08: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
Expand Down
25 changes: 25 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file was generated on 2014-11-13T15:30:21-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"

# Disable normal Windows builds in favor of our test script.
build: off

install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler
- bundler --version
- bundle install
- cinst ansicon

test_script:
- bundle exec rspec

environment:
matrix:
# ruby_version: '20' doesn't work for some reason
- ruby_version: '193'
- ruby_version: '21'
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08: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
Expand Down
21 changes: 18 additions & 3 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

source script/travis_functions.sh
source script/predicate_functions.sh
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/travis_functions.sh
source $SCRIPT_DIR/predicate_functions.sh

# idea taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
export JRUBY_OPTS="${JRUBY_OPTS} -X-C" # disable JIT since these processes are so short lived
Expand Down Expand Up @@ -94,6 +95,20 @@ function check_documentation_coverage {
exit(1)
end
"

# Some warnings only show up when generating docs, so do that as well.
bin/yard doc --no-cache | ruby -e "
while line = gets
has_warnings ||= line.start_with?('[warn]:')
has_errors ||= line.start_with?('[error]:')
puts line
end
if has_warnings || has_errors
puts \"\n\nYARD emitted documentation warnings or errors.\"
exit(1)
end
"
}

function check_style_and_lint {
Expand Down
20 changes: 18 additions & 2 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08: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 {
Expand All @@ -23,6 +23,18 @@ function is_mri_192 {
fi
}

function is_mri_2plus {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f > 2.0)"; then
return 0
else
return 1
fi
else
return 1
fi
}

function rspec_support_compatible {
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
return 0
Expand All @@ -33,7 +45,11 @@ function rspec_support_compatible {

function documentation_enforced {
if [ -x ./bin/yard ]; then
return 0
if is_mri_2plus; then
return 0
else
return 1
fi
else
return 1
fi
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08: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
Expand Down
4 changes: 3 additions & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2014-10-30T08:23:40-07:00 from the rspec-dev repo.
# This file was generated on 2014-11-13T15:30:21-08: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:
Expand Down Expand Up @@ -63,4 +63,6 @@ fold() {
else
STATUS="$status"
fi

return $status
}

0 comments on commit e53ae6e

Please sign in to comment.