Sync stat with upstream and fix stat[:count] #93
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
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 |