.travis.yaml: unquote

It was probably me, 7 years ago, in r33844, who started overly
quoting YAML strings.  But now, this file grown up 50+ times from
6 lines to more than 300.  It is more annoying than convenient to
quote everything to add backslashes here and there.

Just use quotes only when necessary.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-11-28 00:49:24 +00:00
parent 14f47deacc
commit 7cb0965822

View File

@ -60,22 +60,22 @@ addons:
cache: cache:
ccache: true ccache: true
directories: directories:
- "$HOME/config_2nd" - $HOME/config_2nd
env: env:
global: global:
- "CONFIGURE_TTY=no" - CONFIGURE_TTY=no
- "CCACHE_COMPILERCHECK=none" - CCACHE_COMPILERCHECK=none
- "CCACHE_NOCOMPRESS=1" - CCACHE_NOCOMPRESS=1
- "CCACHE_MAXSIZE=512Mi" - CCACHE_MAXSIZE=512Mi
- >- - >-
NPROC="`case ${TRAVIS_OS_NAME} in NPROC="`case ${TRAVIS_OS_NAME} in
osx) sysctl -n hw.activecpu ;; osx) sysctl -n hw.activecpu ;;
linux) nproc ;; linux) nproc ;;
esac`" esac`"
# JOBS and SETARCH are overridden when necessary; see below. # JOBS and SETARCH are overridden when necessary; see below.
- "JOBS=-j$((1+${NPROC}))" - JOBS=-j$((1+${NPROC}))
- "SETARCH=" - SETARCH=
.org.ruby-lang.ci.matrix-definitions: .org.ruby-lang.ci.matrix-definitions:
@ -84,7 +84,7 @@ env:
- &make-test-only - &make-test-only
script: script:
- "$SETARCH make -s test TESTOPTS=\"${TESTOPTS=$JOBS -q --tty=no}\"" - $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
- &linux - &linux
os: linux os: linux
@ -107,7 +107,7 @@ env:
<<: *linux <<: *linux
<<: *cron-only <<: *cron-only
env: env:
- "CONFIG_FLAG='--with-gmp --with-jemalloc --with-valgrind'" - CONFIG_FLAG='--with-gmp --with-jemalloc --with-valgrind'
- &VM_CHECK_MODE - &VM_CHECK_MODE
name: VM_CHECK_MODE=3 name: VM_CHECK_MODE=3
@ -115,14 +115,14 @@ env:
<<: *cron-only <<: *cron-only
<<: *make-test-only <<: *make-test-only
env: env:
- "cppflags=-DVM_CHECK_MODE=0x0003" - cppflags=-DVM_CHECK_MODE=0x0003
- &FIBER_USE_sjlj - &FIBER_USE_sjlj
name: FIBER_USE_NATIVE=0 name: FIBER_USE_NATIVE=0
<<: *linux <<: *linux
<<: *cron-only <<: *cron-only
env: env:
- "cppflags=-DFIBER_USE_NATIVE=0" - cppflags=-DFIBER_USE_NATIVE=0
- &TOKEN_THREADED_CODE - &TOKEN_THREADED_CODE
name: TOKEN_THREADED_CODE name: TOKEN_THREADED_CODE
@ -130,7 +130,7 @@ env:
<<: *cron-only <<: *cron-only
<<: *make-test-only <<: *make-test-only
env: env:
- "cppflags=-DOPT_THREADED_CODE=1" - cppflags=-DOPT_THREADED_CODE=1
- &CALL_THREADED_CODE - &CALL_THREADED_CODE
name: CALL_THREADED_CODE name: CALL_THREADED_CODE
@ -138,7 +138,7 @@ env:
<<: *cron-only <<: *cron-only
<<: *make-test-only <<: *make-test-only
env: env:
- "cppflags=-DOPT_THREADED_CODE=2" - cppflags=-DOPT_THREADED_CODE=2
- &NO_THREADED_CODE - &NO_THREADED_CODE
name: NO_THREADED_CODE name: NO_THREADED_CODE
@ -146,7 +146,7 @@ env:
<<: *cron-only <<: *cron-only
<<: *make-test-only <<: *make-test-only
env: env:
- "cppflags=-DOPT_THREADED_CODE=3" - cppflags=-DOPT_THREADED_CODE=3
- &ASAN - &ASAN
name: -fsanitize=address name: -fsanitize=address
@ -155,12 +155,12 @@ env:
<<: *make-test-only <<: *make-test-only
compiler: clang compiler: clang
env: env:
- "ASAN_OPTIONS=detect_leaks=0" - ASAN_OPTIONS=detect_leaks=0
- "cflags='-march=native -fsanitize=address -fno-omit-frame-pointer'" - cflags='-march=native -fsanitize=address -fno-omit-frame-pointer'
- "debugflags=-ggdb3" - debugflags=-ggdb3
- "optflags='-O1'" - optflags=-O1
- "LD=clang" - LD=clang
- "LDFLAGS=-fsanitize=address" - LDFLAGS=-fsanitize=address
- &MSAN - &MSAN
name: -fsanitize=memory name: -fsanitize=memory
@ -169,11 +169,11 @@ env:
<<: *make-test-only <<: *make-test-only
compiler: clang compiler: clang
env: env:
- "cflags='-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer'" - cflags='-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer'
- "optflags='-O1'" - optflags=-O1
- "LD=clang" - LD=clang
- "LDFLAGS=-fsanitize=memory" - LDFLAGS=-fsanitize=memory
- "CONFIG_FLAG=--with-out-ext=openssl" - CONFIG_FLAG=--with-out-ext=openssl
- &UBSAN - &UBSAN
name: -fsanitize=undefined name: -fsanitize=undefined
@ -182,21 +182,21 @@ env:
<<: *make-test-only <<: *make-test-only
compiler: clang compiler: clang
env: env:
- "cflags='-fsanitize=undefined,integer,nullability -fno-omit-frame-pointer'" - cflags='-fsanitize=undefined,integer,nullability -fno-omit-frame-pointer'
- "cppflags='-DUNALIGNED_WORD_ACCESS=0'" - cppflags=-DUNALIGNED_WORD_ACCESS=0
- "debugflags='-ggdb3'" - debugflags=-ggdb3
- "optflags='-O1 -march=native'" - optflags='-O1 -march=native'
- "LD=clang" - LD=clang
- "LDFLAGS=-fsanitize=undefined,integer,nullability" - LDFLAGS=-fsanitize=undefined,integer,nullability
- &i686-linux - &i686-linux
name: i686-linux name: i686-linux
<<: *linux <<: *linux
sudo: required sudo: required
env: env:
- "GCC_FLAGS=-m32" - GCC_FLAGS=-m32
- "debugflags='-g0'" - debugflags=-g0
- "SETARCH='setarch i686 --verbose --3gb'" - SETARCH='setarch i686 --verbose --3gb'
addons: addons:
apt: apt:
config: config:
@ -222,14 +222,14 @@ env:
- zlib1g:i386 - zlib1g:i386
- &pedanticism - &pedanticism
name: "-ansi -pedantic" name: -ansi -pedantic
<<: *linux <<: *linux
<<: *make-test-only <<: *make-test-only
compiler: clang compiler: clang
env: 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=
- >- - >-
warnflags=' warnflags='
-Wall -Wall
@ -255,7 +255,7 @@ env:
-Wno-unused-parameter -Wno-unused-parameter
-Wunused-variable -Wunused-variable
' '
- "LDFLAGS='-Wno-unused-command-line-argument'" - 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
@ -275,8 +275,8 @@ env:
name: x86_64-darwin17 name: x86_64-darwin17
<<: *osx <<: *osx
env: env:
- "CONFIG_FLAG='--with-opt-dir=/usr/local/opt/openssl@1.1:/usr/local/opt/zlib'" - CONFIG_FLAG=--with-opt-dir=/usr/local/opt/openssl@1.1:/usr/local/opt/zlib
- "TEST_ALL_OPTS=\"$JOBS -q --tty=no --excludes=\\$(TESTSDIR)/excludes/_travis/osx\"" - TEST_ALL_OPTS="$JOBS -q --tty=no --excludes=\$(TESTSDIR)/excludes/_travis/osx"
- &universal-darwin17 - &universal-darwin17
name: uinversal.x86_64h-darwin17 name: uinversal.x86_64h-darwin17
@ -284,8 +284,8 @@ env:
<<: *cron-only <<: *cron-only
<<: *make-test-only <<: *make-test-only
env: env:
- "CONFIG_FLAG='--with-arch=x86_64h,x86_64,i386'" - CONFIG_FLAG=--with-arch=x86_64h,x86_64,i386
- "TEST_ALL_OPTS=\"$JOBS -q --tty=no --excludes=\\$(TESTSDIR)/excludes/_travis/osx\"" - TEST_ALL_OPTS="$JOBS -q --tty=no --excludes=\$(TESTSDIR)/excludes/_travis/osx"
matrix: matrix:
include: include:
@ -312,50 +312,53 @@ matrix:
fast_finish: true fast_finish: true
before_script: before_script:
- "echo JOBS=${JOBS} SETARCH=${SETARCH}" - echo JOBS=${JOBS} SETARCH=${SETARCH}
- "$SETARCH uname -a" - $SETARCH uname -a
- "$SETARCH uname -r" - $SETARCH uname -r
- "rm -fr .ext autom4te.cache" - rm -fr .ext autom4te.cache
- "echo $TERM" - echo $TERM
- "> config.status" - "> config.status"
- "sed -f tool/prereq.status Makefile.in common.mk > Makefile" - sed -f tool/prereq.status Makefile.in common.mk > Makefile
- "make update-config_files" - make update-config_files
- "make touch-unicode-files" - make touch-unicode-files
- "make -s $JOBS srcs UNICODE_FILES=." - make -s $JOBS srcs UNICODE_FILES=.
- "rm config.status Makefile rbconfig.rb .rbconfig.time" - rm config.status Makefile rbconfig.rb .rbconfig.time
- |- - |-
if [ -d ~/config_2nd ]; then if [ -d ~/config_2nd ]; then
cp -pr ~/config_2nd build cp -pr ~/config_2nd build
else else
mkdir build mkdir build
fi fi
- "mkdir config_1st config_2nd" - mkdir config_1st config_2nd
- "chmod -R a-w ." - chmod -R a-w .
- "chmod -R u+w build config_1st config_2nd" - chmod -R u+w build config_1st config_2nd
- "cd build" - cd build
- "ccache --show-stats" - ccache --show-stats
- |- - |-
case "$CC" in case "$CC" in
gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";; gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";;
clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";; clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";;
esac esac
- "[ ! -f config.cache ] || [ \"$CC\" = \"`sed -n s/^ac_cv_prog_CC=//p config.cache`\" ] || (set -x; exec rm config.cache)" - |-
- "$SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix $CONFIG_FLAG" [ ! -f config.cache ] ||
- "cp -pr config.cache config.status .ext/include ../config_1st" [ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
- "$SETARCH make reconfig" (set -x; exec rm config.cache)
- "cp -pr config.cache config.status .ext/include ../config_2nd" - $SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix $CONFIG_FLAG
- "(cd .. && exec diff -ru config_1st config_2nd)" - cp -pr config.cache config.status .ext/include ../config_1st
- "chmod u+w .." - $SETARCH make reconfig
- "rm -r ~/config_2nd" - cp -pr config.cache config.status .ext/include ../config_2nd
- "mv ../config_2nd ~" - (cd .. && exec diff -ru config_1st config_2nd)
- "chmod u-w .." - chmod u+w ..
- "$SETARCH make -s $JOBS && make install" - rm -r ~/config_2nd
- "ccache --show-stats" - mv ../config_2nd ~
- chmod u-w ..
- $SETARCH make -s $JOBS && make install
- ccache --show-stats
script: script:
- "$SETARCH make -s test TESTOPTS=\"${TESTOPTS=$JOBS -q --tty=no}\"" - $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
- "$SETARCH make -s test-all -o exts TESTOPTS=\"${TEST_ALL_OPTS=$TESTOPTS}\"" - $SETARCH make -s test-all -o exts TESTOPTS="${TEST_ALL_OPTS=$TESTOPTS}"
- "$SETARCH make -s test-spec MSPECOPT=-ff" # not using `-j` because sometimes `mspec -j` silently dies - $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
# Branch matrix. Not all branches are Travis-ready so we limit branches here. # Branch matrix. Not all branches are Travis-ready so we limit branches here.
branches: branches: