From b6d33212ac17c3de17887a86ee4e4181b387f25b Mon Sep 17 00:00:00 2001 From: Kunshan Wang Date: Fri, 25 Jul 2025 10:40:41 +0800 Subject: [PATCH] Enable YJIT in CI We currently only test YJIT with StickyImmix. --- .github/scripts/ci-btest.sh | 4 ++-- .github/scripts/ci-test-all.sh | 2 +- .github/scripts/common.sh | 5 +++++ .github/workflows/main.yml | 13 ++++++++++++- mmtk/Cargo.toml | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/scripts/ci-btest.sh b/.github/scripts/ci-btest.sh index 1d69417..4ef91cf 100755 --- a/.github/scripts/ci-btest.sh +++ b/.github/scripts/ci-btest.sh @@ -8,7 +8,7 @@ cd $RUBY_BUILD_PATH echo "============ Bootstrape tests (btest) ($DEBUG_LEVEL) =============" if test "$DEBUG_LEVEL" == "vanilla"; then - make btest TESTOPTS="-v -j${CI_JOBS}" + make btest TESTOPTS="-v -j${CI_JOBS} ${YJIT_OPTS}" else # Some test cases take too much time to run in debug mode, resulting in timeout. It is # because the default GC trigger (dynamic heap size) does not scale the heap size fast @@ -26,5 +26,5 @@ else test_and_delete thread 400m # Run other btests in the regular way. - make btest RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" TESTOPTS="-v -j${CI_JOBS}" + make btest RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" TESTOPTS="-v -j${CI_JOBS} ${YJIT_OPTS}" fi diff --git a/.github/scripts/ci-test-all.sh b/.github/scripts/ci-test-all.sh index 6378aef..2e51793 100755 --- a/.github/scripts/ci-test-all.sh +++ b/.github/scripts/ci-test-all.sh @@ -13,7 +13,7 @@ case $DEBUG_LEVEL in ;; release) make test-all \ - RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN" \ + RUN_OPTS="--mmtk-plan=$CHOSEN_PLAN ${YJIT_OPTS}" \ TESTOPTS="-v --excludes-dir=../test/.excludes-mmtk -j${CI_JOBS}" ;; vanilla) diff --git a/.github/scripts/common.sh b/.github/scripts/common.sh index 778f338..f313055 100644 --- a/.github/scripts/common.sh +++ b/.github/scripts/common.sh @@ -10,3 +10,8 @@ CI_JOBS=4 if test -z "$CHOSEN_PLAN"; then CHOSEN_PLAN=$DEFAULT_PLAN fi + +YJIT_OPTS=" " +if test "$USE_YJIT" == "yes"; then + YJIT_OPTS=" --yjit" +fi diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0dc0340..ab5ad78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,13 +33,24 @@ jobs: strategy: fail-fast: true matrix: + special: ["normal"] debug-level: ["debug", "release"] plan: ["MarkSweep", "Immix", "StickyImmix"] include: - - debug-level: vanilla + - special: "special" + debug-level: "vanilla" + - special: "special" + debug-level: "debug" + plan: "StickyImmix" + yjit: "yjit" + - special: "special" + debug-level: "release" + plan: "StickyImmix" + yjit: "yjit" env: DEBUG_LEVEL: ${{ matrix.debug-level }} CHOSEN_PLAN: ${{ matrix.plan }} + USE_YJIT: ${{ matrix.yjit }} steps: - name: Checkout MMTk Ruby binding uses: actions/checkout@v4 diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index c6d451c..ce087c8 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" # Metadata for the Ruby repository [package.metadata.ci-repos.ruby] repo = "mmtk/ruby" # This is used by actions/checkout, so the format is "owner/repo", not URL. -rev = "e3be189efb1ddd31949519d9a7201abd7a62a0f2" +rev = "64c07dcd7ca763e25607848df3be909135e02589" [lib] name = "mmtk_ruby"