summaryrefslogtreecommitdiffhomepage
path: root/build_config/ci
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2020-12-16 21:56:32 +0900
committerKOBAYASHI Shuji <[email protected]>2020-12-16 21:56:32 +0900
commitd432688d9ff000fbe69e5ec8899fab340a7859a2 (patch)
tree8f2c3cc719523452906a0e636d42e0730b6c69ee /build_config/ci
parent1b7197622f770ce4ae3f3f2aaae1ea427ff3b902 (diff)
downloadmruby-d432688d9ff000fbe69e5ec8899fab340a7859a2.tar.gz
mruby-d432688d9ff000fbe69e5ec8899fab340a7859a2.zip
Rename build configuration files for CI
Currently, there are build configuration files for CI, `travis.rb` and `appveyor.rb`, but they are used for GCC/Clang and MSVC, not for Travis CI and Appveyor, respectively. Therefore, rename them to `gcc-clang.rb` and `msvc.rb`, respectively, and move them under `build_config/ci/` to clarify that they are for CI.
Diffstat (limited to 'build_config/ci')
-rw-r--r--build_config/ci/gcc-clang.rb37
-rw-r--r--build_config/ci/msvc.rb18
2 files changed, 55 insertions, 0 deletions
diff --git a/build_config/ci/gcc-clang.rb b/build_config/ci/gcc-clang.rb
new file mode 100644
index 000000000..7da8c1bf4
--- /dev/null
+++ b/build_config/ci/gcc-clang.rb
@@ -0,0 +1,37 @@
+MRuby::Build.new('full-debug') do |conf|
+ conf.toolchain
+ conf.enable_debug
+
+ # include all core GEMs
+ conf.gembox 'full-core'
+ conf.cc.defines += %w(MRB_GC_STRESS MRB_USE_DEBUG_HOOK)
+
+ conf.enable_test
+end
+
+MRuby::Build.new do |conf|
+ conf.toolchain
+
+ # include all core GEMs
+ conf.gembox 'full-core'
+ conf.compilers.each do |c|
+ c.defines += %w(MRB_GC_FIXED_ARENA)
+ end
+ conf.enable_bintest
+ conf.enable_test
+end
+
+MRuby::Build.new('cxx_abi') do |conf|
+ conf.toolchain
+
+ conf.gembox 'full-core'
+ conf.cc.flags += %w(-fpermissive)
+ conf.compilers.each do |c|
+ c.defines += %w(MRB_GC_FIXED_ARENA)
+ end
+ conf.enable_test
+
+ conf.enable_cxx_abi
+
+ conf.build_mrbc_exec
+end
diff --git a/build_config/ci/msvc.rb b/build_config/ci/msvc.rb
new file mode 100644
index 000000000..e084a6a36
--- /dev/null
+++ b/build_config/ci/msvc.rb
@@ -0,0 +1,18 @@
+def setup_option(conf)
+ conf.cc.flags[0].delete("/Zi") unless ENV['CFLAGS']
+ conf.cxx.flags[0].delete("/Zi") unless ENV['CFLAGS'] || ENV['CXXFLAGS']
+ conf.linker.flags << "/DEBUG:NONE" unless ENV['LDFLAGS']
+end
+
+MRuby::Build.new do |conf|
+ toolchain :visualcpp
+
+ # include all core GEMs
+ conf.gembox 'full-core'
+ conf.compilers.each do |c|
+ c.defines += %w(MRB_GC_FIXED_ARENA)
+ end
+ setup_option(conf)
+ conf.enable_bintest
+ conf.enable_test
+end