From d432688d9ff000fbe69e5ec8899fab340a7859a2 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Wed, 16 Dec 2020 21:56:32 +0900 Subject: 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. --- .github/workflows/build.yml | 14 +++++++------- .travis.yml | 2 +- appveyor.yml | 2 +- build_config/appveyor.rb | 18 ------------------ build_config/ci/gcc-clang.rb | 37 +++++++++++++++++++++++++++++++++++++ build_config/ci/msvc.rb | 18 ++++++++++++++++++ build_config/travis.rb | 37 ------------------------------------- 7 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 build_config/appveyor.rb create mode 100644 build_config/ci/gcc-clang.rb create mode 100644 build_config/ci/msvc.rb delete mode 100644 build_config/travis.rb diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 811a11cf5..2e76a5eeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: Ubuntu-1604: runs-on: ubuntu-16.04 env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang steps: - uses: actions/checkout@v1 - name: apt @@ -17,7 +17,7 @@ jobs: Ubuntu-1804-gcc: runs-on: ubuntu-18.04 env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang CC: gcc CXX: g++ steps: @@ -30,7 +30,7 @@ jobs: Ubuntu-1804-clang: runs-on: ubuntu-18.04 env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang CC: clang CXX: clang++ steps: @@ -43,7 +43,7 @@ jobs: macOS: runs-on: macos-latest env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang steps: - uses: actions/checkout@v1 - name: brew @@ -54,7 +54,7 @@ jobs: Windows-MinGW: runs-on: windows-latest env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang CFLAGS: -g -O1 -Wall -Wundef steps: - uses: actions/checkout@v1 @@ -66,7 +66,7 @@ jobs: Windows-Cygwin: runs-on: windows-latest env: - MRUBY_CONFIG: travis + MRUBY_CONFIG: ci/gcc-clang ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - uses: actions/checkout@v1 @@ -92,7 +92,7 @@ jobs: Windows-VC: runs-on: windows-latest env: - MRUBY_CONFIG: appveyor + MRUBY_CONFIG: ci/msvc # TODO(take-cheeze): Re-enable /O2 CFLAGS: "/c /nologo /W3 /we4013 /Zi /MD /D_CRT_SECURE_NO_WARNINGS" CXXFLAGS: "/c /nologo /W3 /Zi /MD /EHs /D_CRT_SECURE_NO_WARNINGS" diff --git a/.travis.yml b/.travis.yml index 7da3d40a9..f3ed6a73e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ jobs: - export PATH="/usr/local/opt/bison/bin:$PATH" env: - - MRUBY_CONFIG=travis + - MRUBY_CONFIG=ci/gcc-clang script: - rake gensym && rake -m && rake test diff --git a/appveyor.yml b/appveyor.yml index e2a79f20d..d05696e69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ init: build_script: - - set MRUBY_CONFIG=appveyor + - set MRUBY_CONFIG=ci/msvc - rake gensym - rake -m all - rake -E $stdout.sync=true test diff --git a/build_config/appveyor.rb b/build_config/appveyor.rb deleted file mode 100644 index e084a6a36..000000000 --- a/build_config/appveyor.rb +++ /dev/null @@ -1,18 +0,0 @@ -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 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 diff --git a/build_config/travis.rb b/build_config/travis.rb deleted file mode 100644 index 7da8c1bf4..000000000 --- a/build_config/travis.rb +++ /dev/null @@ -1,37 +0,0 @@ -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 -- cgit v1.2.3