From 91714aa1c10aac06573c92118a505e3fc4507dfc Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Fri, 11 Oct 2024 13:57:34 +0100 Subject: [PATCH] Verify the MMTk bindgen in CI --- .github/workflows/sharedgc-macos.yml | 11 +++++++++++ .github/workflows/sharedgc-ubuntu.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/sharedgc-macos.yml b/.github/workflows/sharedgc-macos.yml index 794eef82055ac7..d34a20cb7419a6 100644 --- a/.github/workflows/sharedgc-macos.yml +++ b/.github/workflows/sharedgc-macos.yml @@ -104,6 +104,17 @@ jobs: echo "RUBY_GC_LIBRARY=librubygc.${{ matrix.gc_name }}.dylib" >> $GITHUB_ENV make shared-gc SHARED_GC=${{ matrix.gc_name }} MMTK_BUILD=${{ matrix.build }} + - name: Verify MMTk bindgen + run: | + cd ../src/gc/mmtk + cargo install --force cbindgen@0.26.0 + cbindgen --config cbindgen.toml --output ../mmtk.h + if read -n1 -d '' < <(git diff ../mmtk.h); then + git diff ../mmtk.h + exit 1 + fi + if: ${{ matrix.gc_name == 'mmtk' }} + - run: make prepare-gems if: ${{ matrix.test_task == 'test-bundled-gems' }} diff --git a/.github/workflows/sharedgc-ubuntu.yml b/.github/workflows/sharedgc-ubuntu.yml index 7989b90b8a059b..7f91229b240dec 100644 --- a/.github/workflows/sharedgc-ubuntu.yml +++ b/.github/workflows/sharedgc-ubuntu.yml @@ -104,6 +104,17 @@ jobs: echo "RUBY_GC_LIBRARY=librubygc.${{ matrix.gc_name }}.so" >> $GITHUB_ENV make shared-gc SHARED_GC=${{ matrix.gc_name }} MMTK_BUILD=${{ matrix.build }} + - name: Verify MMTk bindgen + run: | + cd ../src/gc/mmtk + cargo install --force cbindgen@0.26.0 + cbindgen --config cbindgen.toml --output ../mmtk.h + if read -n1 -d '' < <(git diff ../mmtk.h); then + git diff ../mmtk.h + exit 1 + fi + if: ${{ matrix.gc_name == 'mmtk' }} + - run: $SETARCH make - run: |