2018-10-23 09:34:50 -04:00
|
|
|
#
|
|
|
|
# Wercker is dedicated for testing MJIT. Please use Travis or AppVeyor for non-MJIT testing.
|
2018-10-24 06:29:39 -04:00
|
|
|
# This runs all Ruby tests with --jit, or --jit-wait which synchronously JITs all methods.
|
2018-10-23 09:34:50 -04:00
|
|
|
#
|
2018-10-23 11:54:11 -04:00
|
|
|
box: ruby:2.5-stretch
|
2018-10-22 20:19:53 -04:00
|
|
|
no-response-timeout: 30
|
|
|
|
command-timeout: 60
|
2018-10-23 12:23:55 -04:00
|
|
|
|
2019-03-01 09:09:41 -05:00
|
|
|
# --jit + --jit-wait (test, test-spec)
|
2018-11-01 01:03:59 -04:00
|
|
|
mjit-test1:
|
2018-10-23 12:23:55 -04:00
|
|
|
steps:
|
|
|
|
- install-packages:
|
|
|
|
packages: bison sudo
|
|
|
|
- script:
|
|
|
|
name: workaround ipv6 localhost
|
|
|
|
code: ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)"
|
|
|
|
- script:
|
|
|
|
name: create user # some file permission tests don't succeed with root.
|
|
|
|
code: useradd --shell /bin/bash --create-home test && chown -R test:test .
|
|
|
|
- script:
|
|
|
|
name: configure
|
|
|
|
code: /usr/bin/sudo -H -u test -- bash -c 'autoconf && ./configure --disable-install-doc --prefix=/tmp/ruby-prefix'
|
|
|
|
- script:
|
|
|
|
name: make all install
|
|
|
|
code: /usr/bin/sudo -H -u test -- make -j$(nproc) all install
|
2019-05-08 03:25:25 -04:00
|
|
|
- script:
|
|
|
|
name: install mjit-debug-on-fail
|
|
|
|
code: |
|
|
|
|
cat <<'EOS' > /usr/local/bin/mjit-debug-on-fail
|
2019-05-30 18:24:08 -04:00
|
|
|
#!/bin/bash -x
|
2019-05-08 03:51:37 -04:00
|
|
|
if ! "$@"; then
|
2019-05-23 11:41:18 -04:00
|
|
|
git clone --depth=1 git@github.com:ruby/mjit-debug
|
|
|
|
cd mjit-debug
|
|
|
|
|
|
|
|
debug_dir="$(date '+%F_%T')"
|
|
|
|
mkdir "$debug_dir"
|
|
|
|
cp /tmp/_ruby_mjit*.c "$debug_dir"
|
|
|
|
|
2019-05-30 18:24:08 -04:00
|
|
|
git config --global user.email "ruby@app.wercker.com"
|
|
|
|
git config --global user.name "Wercker ruby/ruby"
|
2019-05-23 11:41:18 -04:00
|
|
|
git add "$debug_dir"
|
|
|
|
git commit -m "Debug ${debug_dir}: ${WERCKER_BUILD_URL}"
|
|
|
|
git push origin master
|
2019-05-08 03:25:25 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
EOS
|
2019-05-08 03:26:53 -04:00
|
|
|
chmod +x /usr/local/bin/mjit-debug-on-fail
|
2019-05-23 11:41:18 -04:00
|
|
|
# git push access to ruby/mjit-debug (private repository)
|
|
|
|
- add-ssh-key:
|
|
|
|
keyname: MJIT_DEBUG
|
|
|
|
host: github.com
|
|
|
|
- add-to-known_hosts:
|
|
|
|
hostname: github.com
|
2018-11-01 00:43:40 -04:00
|
|
|
|
|
|
|
# --jit
|
|
|
|
- script:
|
|
|
|
name: make test (JIT)
|
|
|
|
code: /usr/bin/sudo -H -u test -- make test RUN_OPTS="--disable-gems --jit --jit-warnings"
|
|
|
|
- script:
|
|
|
|
name: make test-spec (JIT)
|
|
|
|
code: /usr/bin/sudo -H -u test -- make test-spec RUN_OPTS="--disable-gems --jit --jit-warnings"
|
|
|
|
- script:
|
|
|
|
name: make test-all (JIT)
|
2019-05-08 03:25:25 -04:00
|
|
|
code: /usr/local/bin/mjit-debug-on-fail /usr/bin/sudo -H -u test -- make test-all RUN_OPTS="--disable-gems --jit-verbose=1 --jit-save-temps --jit-warnings" TESTOPTS="-v --color=never --job-status=normal --longest 10 --subprocess-timeout-scale=3.0 --excludes=test/excludes/_wercker/jit"
|
2018-11-01 00:43:40 -04:00
|
|
|
|
2019-03-01 09:09:41 -05:00
|
|
|
# --jit-wait (test, test-spec)
|
2018-10-23 12:23:55 -04:00
|
|
|
- script:
|
2018-10-24 08:19:39 -04:00
|
|
|
name: make test (JIT wait)
|
|
|
|
code: /usr/bin/sudo -H -u test -- make test RUN_OPTS="--disable-gems --jit-wait --jit-warnings"
|
2018-11-01 00:43:40 -04:00
|
|
|
- script:
|
|
|
|
name: make test-spec (JIT wait)
|
|
|
|
code: /usr/bin/sudo -H -u test -- make test-spec RUN_OPTS="--disable-gems --jit-wait --jit-warnings"
|
2018-10-31 22:50:10 -04:00
|
|
|
|
2018-11-01 02:03:29 -04:00
|
|
|
after-steps:
|
|
|
|
- wantedly/pretty-slack-notify:
|
|
|
|
webhook_url: $SLACK_WEBHOOK_URL
|
2018-11-02 20:44:04 -04:00
|
|
|
username: Wercker mjit-test1
|
2018-11-01 02:03:29 -04:00
|
|
|
channel: alerts
|
|
|
|
notify_on: "failed"
|
2019-05-22 12:07:16 -04:00
|
|
|
branches: ^master$
|
2018-11-01 02:03:29 -04:00
|
|
|
|
2019-03-01 09:09:41 -05:00
|
|
|
# --jit-wait (test-all)
|
2018-11-01 02:03:29 -04:00
|
|
|
mjit-test2:
|
|
|
|
steps:
|
|
|
|
- install-packages:
|
|
|
|
packages: bison sudo
|
|
|
|
- script:
|
|
|
|
name: workaround ipv6 localhost
|
|
|
|
code: ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)"
|
|
|
|
- script:
|
|
|
|
name: create user # some file permission tests don't succeed with root.
|
|
|
|
code: useradd --shell /bin/bash --create-home test && chown -R test:test .
|
|
|
|
- script:
|
|
|
|
name: configure
|
|
|
|
code: /usr/bin/sudo -H -u test -- bash -c 'autoconf && ./configure --disable-install-doc --prefix=/tmp/ruby-prefix'
|
|
|
|
- script:
|
|
|
|
name: make all install
|
|
|
|
code: /usr/bin/sudo -H -u test -- make -j$(nproc) all install
|
|
|
|
|
2019-03-01 09:09:41 -05:00
|
|
|
# --jit-wait (test-all)
|
2018-10-31 22:50:10 -04:00
|
|
|
- script:
|
2019-03-01 09:09:41 -05:00
|
|
|
name: make test-all (JIT wait)
|
2019-05-28 19:04:48 -04:00
|
|
|
code: /usr/bin/sudo -H -u test -- make test-all RUN_OPTS="--disable-gems --jit-wait --jit-warnings" TESTOPTS="-v --test-order=random --color=never --job-status=normal --subprocess-timeout-scale=3.0 --excludes=test/excludes/_wercker/jit-wait"
|
2019-03-01 09:09:41 -05:00
|
|
|
|
2018-10-22 20:19:53 -04:00
|
|
|
after-steps:
|
|
|
|
- wantedly/pretty-slack-notify:
|
|
|
|
webhook_url: $SLACK_WEBHOOK_URL
|
2018-11-02 20:44:04 -04:00
|
|
|
username: Wercker mjit-test2
|
2018-10-22 20:19:53 -04:00
|
|
|
channel: alerts
|
|
|
|
notify_on: "failed"
|
2019-05-22 12:07:16 -04:00
|
|
|
branches: ^master$
|