.travis.yml: avoid bashism

We can set environment variables to avoid before_script.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-11-26 02:46:50 +00:00
parent 9e2acbca2a
commit bf5c84a41d

View File

@ -230,9 +230,8 @@ env:
- "GCC_FLAGS='-ansi -Werror=pedantic -pedantic-errors -std=iso9899:1990'" - "GCC_FLAGS='-ansi -Werror=pedantic -pedantic-errors -std=iso9899:1990'"
- "CONFIG_FLAG=" - "CONFIG_FLAG="
- "JOBS=" - "JOBS="
# construct warnflags (using bashism...) - >-
before_install: | warnflags='
warnflags_array=(
-Wall -Wall
-Wextra -Wextra
-Werror=declaration-after-statement -Werror=declaration-after-statement
@ -255,10 +254,8 @@ env:
-Wno-unused-local-typedef -Wno-unused-local-typedef
-Wno-unused-parameter -Wno-unused-parameter
-Wunused-variable -Wunused-variable
) '
CONFIG_FLAG_ARRAY=( - "LDFLAGS='-Wno-unused-command-line-argument'"
warnflags="${warnflags_array[*]}"
LDFLAGS=-Wno-unused-command-line-argument)
- &rubyspec - &rubyspec
name: ruby/spec on Ruby 2.3 # to ensure version guards are correctly added name: ruby/spec on Ruby 2.3 # to ensure version guards are correctly added
@ -342,8 +339,7 @@ before_script:
gcc*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-diagnostics-color) ;; gcc*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-diagnostics-color) ;;
clang*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-color-diagnostics) ;; clang*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-color-diagnostics) ;;
esac esac
- |- - "$SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix --with-gcc=\"${the_gcc[*]}\" $CONFIG_FLAG"
$SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix --with-gcc="${the_gcc[*]}" $CONFIG_FLAG "${CONFIG_FLAG_ARRAY[@]}"
- "cp -pr config.cache config.status .ext/include ../config_1st" - "cp -pr config.cache config.status .ext/include ../config_1st"
- "$SETARCH make reconfig" - "$SETARCH make reconfig"
- "cp -pr config.cache config.status .ext/include ../config_2nd" - "cp -pr config.cache config.status .ext/include ../config_2nd"