merge revision(s) 22e4eeda65, 1ab7c412d2, fd549b229b: [Backport #20515]

ci: Test whether GMP is working in compilers.yml (#10875)

	Avoid reoccurence of [Bug #20515]

	Requires https://github.com/ruby/ruby/pull/10876 since 18eaf0be90

	bug: https://bugs.ruby-lang.org/issues/20515

	RUBY_CHECK_HEADER didn't define HAVE_{header-file} (#10876)

	--with-gmp is not working at all because HAVE_GMP_H
	was missing since 18eaf0be90. [Bug #20515]

	bug: https://bugs.ruby-lang.org/issues/20515
	follow-up: https://bugs.ruby-lang.org/issues/20494
	follow-up: 18eaf0be90
	follow-up: https://github.com/ruby/ruby/pull/10805

	test_bignum: defined? returns String (#10880)
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	didn't verify the test is working properly due to mistaken auto-merge… [Bug #20515]

	bug: https://bugs.ruby-lang.org/issues/20515
	follow-up: 22e4eeda65
	follow-up: https://github.com/ruby/ruby/pull/10875
This commit is contained in:
nagachika 2024-06-15 13:13:19 +09:00
parent ec30266267
commit dc4ca25e0a
4 changed files with 10 additions and 3 deletions

View file

@ -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 name: Compilations
on: on:
@ -147,7 +148,7 @@ jobs:
- { name: '-O0', env: { optflags: '-O0 -march=x86-64 -mtune=generic' } } - { name: '-O0', env: { optflags: '-O0 -march=x86-64 -mtune=generic' } }
# - { name: '-O3', env: { optflags: '-O3 -march=x86-64 -mtune=generic' }, check: true } # - { 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: jemalloc, env: { append_configure: '--with-jemalloc' } }
- { name: valgrind, env: { append_configure: '--with-valgrind' } } - { name: valgrind, env: { append_configure: '--with-valgrind' } }
- { name: 'coroutine=ucontext', env: { append_configure: '--with-coroutine=ucontext' } } - { name: 'coroutine=ucontext', env: { append_configure: '--with-coroutine=ucontext' } }

View file

@ -821,5 +821,11 @@ class TestBignum < Test::Unit::TestCase
assert_nil(T1024P.infinite?) assert_nil(T1024P.infinite?)
assert_nil((-T1024P).infinite?) assert_nil((-T1024P).infinite?)
end end
def test_gmp_version
if RbConfig::CONFIG.fetch('configure_args').include?("'--with-gmp'")
assert_kind_of(String, Integer::GMP_VERSION)
end
end if ENV['GITHUB_WORKFLOW'] == 'Compilations'
end end
end end

View file

@ -3,6 +3,6 @@ AC_DEFUN([RUBY_CHECK_HEADER],
[# RUBY_CHECK_HEADER($@) [# RUBY_CHECK_HEADER($@)
save_CPPFLAGS="$CPPFLAGS" save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS m4_if([$5], [], [$INCFLAGS], [$5])" CPPFLAGS="$CPPFLAGS m4_if([$5], [], [$INCFLAGS], [$5])"
AC_CHECK_HEADER([$1], [$2], [$3], [$4]) AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"
unset save_CPPFLAGS]) unset save_CPPFLAGS])

View file

@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 4 #define RUBY_VERSION_TEENY 4
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
#define RUBY_PATCHLEVEL 177 #define RUBY_PATCHLEVEL 178
#include "ruby/version.h" #include "ruby/version.h"
#include "ruby/internal/abi.h" #include "ruby/internal/abi.h"