aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/check_branch.yml2
-rw-r--r--.github/workflows/macos.yml2
-rw-r--r--.github/workflows/mjit.yml77
-rw-r--r--.github/workflows/ubuntu.yml2
-rw-r--r--.github/workflows/windows.yml2
-rw-r--r--test/excludes/_wercker/jit-wait/TestDelegateClass.rb2
-rw-r--r--test/excludes/_wercker/jit-wait/TestGemRemoteFetcher.rb4
-rw-r--r--test/excludes/_wercker/jit-wait/TestParallel/TestParallel.rb2
-rw-r--r--test/excludes/_wercker/jit-wait/TestThreadQueue.rb2
-rw-r--r--test/excludes/_wercker/jit/TestThreadQueue.rb2
-rw-r--r--wercker.yml111
11 files changed, 81 insertions, 127 deletions
diff --git a/.github/workflows/check_branch.yml b/.github/workflows/check_branch.yml
index 4a74cbd458..37cf3a9a8f 100644
--- a/.github/workflows/check_branch.yml
+++ b/.github/workflows/check_branch.yml
@@ -6,7 +6,7 @@
# to prevent us from accidentally pushing commits to GitHub directly.
#
# Details: https://bugs.ruby-lang.org/issues/16094
-name: pull_request
+name: Pull Request
on: [pull_request]
jobs:
check_branch:
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index d7437a2f2d..b0cd602d30 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -1,4 +1,4 @@
-name: macos
+name: macOS
on:
push:
branches:
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
new file mode 100644
index 0000000000..39a05ae419
--- /dev/null
+++ b/.github/workflows/mjit.yml
@@ -0,0 +1,77 @@
+name: MJIT
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - '*'
+jobs:
+ test:
+ strategy:
+ matrix:
+ jit_opts: [ "--jit", "--jit-wait" ]
+ fail-fast: false
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ steps:
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
+ # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
+ - name: Checkout ruby/ruby
+ run: |
+ git clone --depth=50 https://github.com/ruby/ruby src
+ git -C src reset --hard "$GITHUB_SHA"
+ if: github.event_name == 'push'
+ - name: Checkout a pull request
+ run: |
+ git clone --depth=50 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
+ git -C src reset --hard "$GITHUB_REV"
+ env:
+ GITHUB_REV: ${{ github.event.pull_request.head.sha }}
+ GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
+ GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
+ if: github.event_name == 'pull_request'
+ - name: Fixed world writable dirs
+ run: |
+ chmod go-w $HOME
+ sudo chmod -R go-w /usr/share
+ - name: Set ENV
+ run: |
+ echo '::set-env name=JOBS::'-j$((1 + $(nproc --all)))
+ - name: Autoconf
+ run: cd src && exec autoconf
+ - name: configure
+ run: |
+ mkdir build
+ cd build
+ ../src/configure -C --disable-install-doc
+ - name: make all
+ run: make -C build $JOBS
+ - name: make install
+ run: sudo make -C build $JOBS install
+ - name: make test
+ run: "make -C build $JOBS -s test TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
+ - name: make test-all
+ run: "make -C build $JOBS -s test-all TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
+ - name: make test-spec
+ run: "make -C build $JOBS -s test-spec RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
+ - name: Leaked Globals
+ run: make -C build -s leaked-globals
+ - uses: k0kubun/action-slack@v2.0.0
+ with:
+ payload: |
+ {
+ "attachments": [{
+ "text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ matrix.os }} / ${{ matrix.test_task }}> " +
+ "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
+ "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
+ "color": "danger"
+ }]
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+ if: failure() && github.event_name == 'push'
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 1a59bc333a..847e4a1e97 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,4 +1,4 @@
-name: ubuntu
+name: Ubuntu
on:
push:
branches:
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index efa371d4a0..8dd546bda6 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,4 +1,4 @@
-name: windows
+name: Windows
on:
push:
branches:
diff --git a/test/excludes/_wercker/jit-wait/TestDelegateClass.rb b/test/excludes/_wercker/jit-wait/TestDelegateClass.rb
deleted file mode 100644
index 384bb03b4c..0000000000
--- a/test/excludes/_wercker/jit-wait/TestDelegateClass.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# https://app.wercker.com/ruby/ruby/runs/mjit-test2/5bda979a191eda000655a8d2?step=5bda9fe4591ca80007653f64
-exclude(:test_frozen, 'somehow FrozenError is not raised with --jit-wait')
diff --git a/test/excludes/_wercker/jit-wait/TestGemRemoteFetcher.rb b/test/excludes/_wercker/jit-wait/TestGemRemoteFetcher.rb
deleted file mode 100644
index 30ece81992..0000000000
--- a/test/excludes/_wercker/jit-wait/TestGemRemoteFetcher.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c18fd67c0c3d7001190a14d?step=5c18fda8cfa0fc0007fcc633
-# https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c1a3db51eea2b000777144a?step=5c1a3def78c72000078df9cf
-# https://app.wercker.com/ruby/ruby/runs/mjit-test2/5c1b3a71c0c3d7001191f66e?step=5c1b5ed978c7200007961577
-exclude(/./, 'most of tests are too fragile with --jit-wait and this remote fetcher cannot configure timeout')
diff --git a/test/excludes/_wercker/jit-wait/TestParallel/TestParallel.rb b/test/excludes/_wercker/jit-wait/TestParallel/TestParallel.rb
deleted file mode 100644
index e241a78b47..0000000000
--- a/test/excludes/_wercker/jit-wait/TestParallel/TestParallel.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd040d19b1e440006d52516?step=5bd0410c591ca8000721e3e4
-exclude(:test_separate, 'this test randomly fails with --jit-wait')
diff --git a/test/excludes/_wercker/jit-wait/TestThreadQueue.rb b/test/excludes/_wercker/jit-wait/TestThreadQueue.rb
deleted file mode 100644
index 5d0ba88cf4..0000000000
--- a/test/excludes/_wercker/jit-wait/TestThreadQueue.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bcfd19aa9806e000655c598?step=5bcfd1d5acc4510006e00f77
-exclude(:test_queue_with_trap, 'this test randomly fails with --jit-wait')
diff --git a/test/excludes/_wercker/jit/TestThreadQueue.rb b/test/excludes/_wercker/jit/TestThreadQueue.rb
deleted file mode 100644
index 2a968ab04c..0000000000
--- a/test/excludes/_wercker/jit/TestThreadQueue.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# https://app.wercker.com/ruby/ruby/runs/test-mjit/5bcf51409b1e440006d47831?step=5bcf517d87436a000649326d
-exclude(:test_queue_with_trap, 'this test fails with --jit')
diff --git a/wercker.yml b/wercker.yml
deleted file mode 100644
index c8b252567c..0000000000
--- a/wercker.yml
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# Wercker is dedicated for testing MJIT. Please use Travis or AppVeyor for non-MJIT testing.
-# This runs all Ruby tests with --jit, or --jit-wait which synchronously JITs all methods.
-#
-box: ruby:2.5-stretch
-no-response-timeout: 30
-command-timeout: 60
-
-# --jit + --jit-wait (test, test-spec)
-mjit-test1:
- 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
- - script:
- name: install mjit-debug-on-fail
- code: |
- cat <<'EOS' > /usr/local/bin/mjit-debug-on-fail
- #!/bin/bash -x
- if ! "$@"; then
- 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"
-
- git config --global user.email "ruby@app.wercker.com"
- git config --global user.name "Wercker ruby/ruby"
- git add "$debug_dir"
- git commit -m "Debug ${debug_dir}: ${WERCKER_BUILD_URL}"
- git push origin master
- exit 1
- fi
- EOS
- chmod +x /usr/local/bin/mjit-debug-on-fail
- # 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
-
- # --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)
- 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 --timeout-scale=3.0 --excludes=test/excludes/_wercker/jit"
-
- # --jit-wait (test, test-spec)
- - script:
- name: make test (JIT wait)
- code: /usr/bin/sudo -H -u test -- make test RUN_OPTS="--disable-gems --jit-wait --jit-warnings"
- - 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"
-
- after-steps:
- - wantedly/pretty-slack-notify:
- webhook_url: $SLACK_WEBHOOK_URL
- username: Wercker mjit-test1
- channel: alerts
- notify_on: "failed"
- branches: ^master$
-
-# --jit-wait (test-all)
-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
-
- # --jit-wait (test-all)
- - script:
- name: make test-all (JIT wait)
- 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 --timeout-scale=3.0 --excludes=test/excludes/_wercker/jit-wait"
-
- after-steps:
- - wantedly/pretty-slack-notify:
- webhook_url: $SLACK_WEBHOOK_URL
- username: Wercker mjit-test2
- channel: alerts
- notify_on: "failed"
- branches: ^master$