forked from ruby/ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit creates a github actions workflow that builds Ruby with the latest commit of the mmtk-ruby binding and runs `make test-all` with MMTk enabled. Several changes were necessary to make this CI pipeline pass: - C99 prohibits empty compile units, so some code had to be moved around in mmtk_support.c to introduce some superfluous #include directives. These should either be optimised out or remain unused so have little impact on the final binary. - Correct the dependancy lists in common.mk, by building with the appropiate flags defined in `tool/update-deps` and subsequently running `make update-deps` - Pre-fixing all externally visible MMTk related symbols and globals with `rb_` - Skipping tests related to GC compaction or other functionality specific to Ruby's GC. - Updating YJIT bindings
- Loading branch information
1 parent
1be8640
commit 5aa5789
Showing
18 changed files
with
316 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: MMTK | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**/man/*' | ||
- '**.md' | ||
- '**.rdoc' | ||
- '**/.document' | ||
- '.*.yml' | ||
pull_request: | ||
# Do not use paths-ignore for required status checks | ||
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
merge_group: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} | ||
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
make: | ||
strategy: | ||
matrix: | ||
include: | ||
- test_task: btest | ||
os: ubuntu-20.04 | ||
fail-fast: false | ||
|
||
env: | ||
GITPULLOPTIONS: --no-tags origin ${{ github.ref }} | ||
RUBY_DEBUG: ci | ||
|
||
runs-on: ${{ matrix.os || 'ubuntu-22.04' }} | ||
|
||
if: >- | ||
${{!(false | ||
|| contains(github.event.head_commit.message, '[DOC]') | ||
|| contains(github.event.head_commit.message, 'Document') | ||
|| contains(github.event.pull_request.title, '[DOC]') | ||
|| contains(github.event.pull_request.title, 'Document') | ||
|| contains(github.event.pull_request.labels.*.name, 'Document') | ||
|| (github.event_name == 'push' && github.actor == 'dependabot[bot]') | ||
)}} | ||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
sparse-checkout-cone-mode: false | ||
sparse-checkout: /.github | ||
|
||
- uses: ./.github/actions/setup/ubuntu | ||
with: | ||
arch: ${{ matrix.arch }} | ||
|
||
- uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1 | ||
with: | ||
ruby-version: '3.0' | ||
bundler: none | ||
|
||
- uses: ./.github/actions/setup/directories | ||
with: | ||
srcdir: src | ||
builddir: build | ||
makeup: true | ||
clean: true | ||
dummy-files: ${{ matrix.test_task == 'check' }} | ||
# Set fetch-depth: 10 so that Launchable can receive commits information. | ||
fetch-depth: 10 | ||
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Clone and build MMTK | ||
run: >- | ||
git clone https://github.com/mmtk/mmtk-ruby && | ||
cd mmtk-ruby/mmtk && | ||
cargo build --release | ||
- name: Run configure | ||
env: | ||
arch: ${{ matrix.arch }} | ||
configure: ${{ matrix.configure }} | ||
run: >- | ||
$SETARCH ../src/configure -C --disable-install-doc ${configure:-cppflags=-DRUBY_DEBUG} | ||
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE} | ||
--with-mmtk-ruby=./mmtk-ruby | ||
- run: $SETARCH make prepare-gems | ||
if: ${{ matrix.test_task == 'test-bundled-gems' }} | ||
|
||
- run: $SETARCH make | ||
|
||
- name: make ${{ matrix.test_task }} --mmtk | ||
run: >- | ||
$SETARCH make -s ${{ matrix.test_task }} | ||
${TESTS:+TESTS="$TESTS"} | ||
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }} | ||
timeout-minutes: 40 | ||
env: | ||
TESTS: $(cat $srcdir/mmtk_tests.txt | ruby -e 'puts ARGF.map(&:strip).reject { |line| line.start_with?("#") }.join(" ")') | ||
RUBY_TESTOPTS: '-q --tty=no' | ||
TEST_BUNDLED_GEMS_ALLOW_FAILURES: '' | ||
PRECHECK_BUNDLED_GEMS: 'no' | ||
|
||
- name: Clean build directory | ||
run: rm -rf $builddir/mmtk-ruby | ||
|
||
result: | ||
if: ${{ always() }} | ||
name: ${{ github.workflow }} result | ||
runs-on: ubuntu-latest | ||
needs: [make] | ||
steps: | ||
- run: exit 1 | ||
working-directory: | ||
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | ||
|
||
defaults: | ||
run: | ||
working-directory: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.