-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR enables CI for MMTk's fork of CRuby. There are a few notable changes: - Adds CI builds via github actions for all mmtk plans. - Adds skip files for all the tests that can't run on mmtk because of implementation details (ie no garbage compaction, tracepoints, etc). - Fixes issues in the tests, see original PR commits for descriptions. What's not fixed: - All the plans still sometimes fail. Immix, StickyImmix, and MarkSweep sometimes pass so the CRuby tests are fixed, but there are panics coming from the rust side of things that we need to fix. I've not been able to repro these on macos yet. - NoGC in the current state, can't pass because github actions doesn't have enough memory. Co-authored-by: Matthew Valentine-House <[email protected]> Co-authored-by: Peter Zhu <[email protected]>
- Loading branch information
1 parent
1be8640
commit 9c68561
Showing
38 changed files
with
528 additions
and
83 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,135 @@ | ||
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: | ||
|
||
env: | ||
# -O1 is faster than -O3 in our tests... Majority of time are consumed trying | ||
# to optimize binaries. Also GitHub Actions run on relatively modern CPUs | ||
# compared to, say, GCC 4 or Clang 3. We don't specify `-march=native` | ||
# because compilers tend not understand what the CPU is. | ||
optflags: '-O1' | ||
|
||
# -g0 disables backtraces when SEGV. Do not set that. | ||
debugflags: '-ggdb3' | ||
|
||
default_configure: >- | ||
--enable-debug-env | ||
--disable-install-doc | ||
CONFIGURE_TTY: never | ||
GITPULLOPTIONS: --no-tags origin ${{ github.ref }} | ||
RUBY_DEBUG: ci | ||
RUBY_TESTOPTS: >- | ||
-q | ||
--color=always | ||
--tty=no | ||
--excludes-dir="../src/test/.excludes-mmtk" | ||
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: | ||
fail-fast: false | ||
matrix: | ||
entry: | ||
- { name: "MMTk disabled", opts: '' } | ||
- { name: "MMTk enabled", opts: '--mmtk-plan=NoGC --mmtk-max-heap=16GiB' } | ||
- { name: "MMTk enabled", opts: '--mmtk-plan=MarkSweep' } | ||
- { name: "MMTk enabled", opts: '--mmtk-plan=Immix' } | ||
- { name: "MMTk enabled", opts: '--mmtk-plan=StickyImmix' } | ||
|
||
runs-on: ubuntu-latest | ||
|
||
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 }} | ||
run: >- | ||
$SETARCH ../src/configure -C ${default_configure} --with-mmtk-ruby=./mmtk-ruby | ||
- run: $SETARCH make | ||
|
||
- name: make test-all (${{ matrix.entry.name }}) | ||
run: >- | ||
$SETARCH make -s test-all RUN_OPTS="${{ matrix.entry.opts }}" | ||
timeout-minutes: 40 | ||
env: | ||
RUBY_TESTOPTS: '-q --tty=no --excludes-dir=../src/test/.excludes-mmtk' | ||
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
Oops, something went wrong.