diff options
-rw-r--r-- | .github/workflows/compilers.yml | 3 | ||||
-rw-r--r-- | test/ruby/test_bignum.rb | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 8937a5b15f..85769bd879 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -1,3 +1,4 @@ +# Some tests depending on this name 'Compilations' via $GITHUB_WORKFLOW. Make sure to update such tests when renaming this workflow. name: Compilations on: @@ -136,7 +137,7 @@ jobs: - { name: '-O0', env: { optflags: '-O0 -march=x86-64 -mtune=generic' } } # - { name: '-O3', env: { optflags: '-O3 -march=x86-64 -mtune=generic' }, check: true } - - { name: gmp, env: { append_configure: '--with-gmp' } } + - { name: gmp, env: { append_configure: '--with-gmp' }, check: true } - { name: jemalloc, env: { append_configure: '--with-jemalloc' } } - { name: valgrind, env: { append_configure: '--with-valgrind' } } - { name: 'coroutine=ucontext', env: { append_configure: '--with-coroutine=ucontext' } } diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 1f882c6cb9..0179a3c630 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -821,5 +821,11 @@ class TestBignum < Test::Unit::TestCase assert_nil(T1024P.infinite?) assert_nil((-T1024P).infinite?) end + + def test_gmp_version + if RbConfig::CONFIG.fetch('configure_args').include?("'--with-gmp'") + assert_equal(true, defined?(Integer::GMP_VERSION)) + end + end if ENV['GITHUB_WORKFLOW'] == 'Compilations' end end |