|
| 1 | +name: MMTk |
| 2 | +on: |
| 3 | + push: |
| 4 | + paths-ignore: |
| 5 | + - '**.md' |
| 6 | + pull_request: |
| 7 | + # Do not use paths-ignore for required status checks |
| 8 | + # 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 |
| 9 | + merge_group: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + check: |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + gc: |
| 20 | + - mmtk_plan: MarkSweep |
| 21 | + mmtk_build: release |
| 22 | + timeout: 120 |
| 23 | + - mmtk_plan: MarkSweep |
| 24 | + mmtk_build: debug |
| 25 | + timeout: 120 |
| 26 | + os: [macos-latest, ubuntu-latest] |
| 27 | + |
| 28 | + env: |
| 29 | + GITPULLOPTIONS: --no-tags origin ${{ github.ref }} |
| 30 | + RUBY_DEBUG: ci |
| 31 | + |
| 32 | + runs-on: ${{ matrix.os }} |
| 33 | + |
| 34 | + if: >- |
| 35 | + ${{!(false |
| 36 | + || contains(github.event.head_commit.message, '[DOC]') |
| 37 | + || contains(github.event.head_commit.message, 'Document') |
| 38 | + || contains(github.event.pull_request.title, '[DOC]') |
| 39 | + || contains(github.event.pull_request.title, 'Document') |
| 40 | + || contains(github.event.pull_request.labels.*.name, 'Documentation') |
| 41 | + || (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]') |
| 42 | + )}} |
| 43 | +
|
| 44 | + steps: |
| 45 | + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 |
| 46 | + |
| 47 | + - name: Install libraries (macOS) |
| 48 | + uses: ./.github/actions/setup/macos |
| 49 | + if: ${{ contains(matrix.os, 'macos') }} |
| 50 | + |
| 51 | + - name: Install libraries (Ubuntu) |
| 52 | + uses: ./.github/actions/setup/ubuntu |
| 53 | + if: ${{ contains(matrix.os, 'ubuntu') }} |
| 54 | + |
| 55 | + - uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 56 | + - name: Set MMTk environment variables |
| 57 | + run: | |
| 58 | + if [[ ${{ matrix.gc.mmtk_build }} == debug ]]; then |
| 59 | + echo 'RUST_LOG=' >> $GITHUB_ENV |
| 60 | + fi |
| 61 | + echo 'RUBY_TEST_TIMEOUT_SCALE=20' >> $GITHUB_ENV |
| 62 | + echo 'SYNTAX_SUGGEST_TIMEOUT=60' >> $GITHUB_ENV |
| 63 | + echo 'EXCLUDES=./test/.excludes-mmtk' >> $GITHUB_ENV |
| 64 | + echo 'MSPECOPT=-B./spec/mmtk.mspec' >> $GITHUB_ENV |
| 65 | + echo 'MMTK_PLAN=${{ matrix.gc.mmtk_plan }}' >> $GITHUB_ENV |
| 66 | + echo 'GITHUB_WORKFLOW=MMTk' >> $GITHUB_ENV |
| 67 | +
|
| 68 | + - name: Install Bundler dependencies |
| 69 | + run: bundle install |
| 70 | + |
| 71 | + - uses: actions/checkout@v4 |
| 72 | + with: |
| 73 | + repository: ruby/ruby |
| 74 | + path: ruby |
| 75 | + |
| 76 | + - name: configure ruby |
| 77 | + working-directory: ruby |
| 78 | + run: | |
| 79 | + bash autogen.sh |
| 80 | + ./configure \ |
| 81 | + --prefix=/opt/homebrew \ |
| 82 | + --disable-install-doc \ |
| 83 | + --with-modular-gc=${{ github.workspace }}/tmp/binaries |
| 84 | + make -j |
| 85 | + make install |
| 86 | + echo '/opt/homebrew/bin' >> $GITHUB_PATH |
| 87 | +
|
| 88 | + - name: build Ruby & MMTk shared GC |
| 89 | + run: | |
| 90 | + bundle install |
| 91 | + bundle exec rake compile |
| 92 | +
|
| 93 | + - name: make test-all |
| 94 | + run: >- |
| 95 | + RUST_LOG= make -s test-all |
| 96 | + ${TESTS:+TESTS="$TESTS"} |
| 97 | + timeout-minutes: ${{ matrix.gc.timeout || 40 }} |
| 98 | + working-directory: ruby |
| 99 | + env: |
| 100 | + RUBY_TESTOPTS: '-q --tty=no' |
| 101 | + TEST_BUNDLED_GEMS_ALLOW_FAILURES: 'typeprof' |
| 102 | + PRECHECK_BUNDLED_GEMS: 'no' |
| 103 | + RUBY_GC_LIBRARY: mmtk |
| 104 | + |
| 105 | + |
| 106 | + |
0 commit comments