@@ -25,7 +25,7 @@ def self.exit_on_failure?
2525 to the compilation.
2626 MSG
2727 def compile
28- run_rake_tasks! ( :compile )
28+ run_rake_tasks! ( "easy_compile:setup" , :compile )
2929 end
3030
3131 desc "package" , "Compile and package a 'fat gem'." , hide : true
@@ -44,12 +44,20 @@ def compile
4444 def package
4545 ENV [ "RUBY_CC_VERSION" ] ||= compilation_task . ruby_cc_version
4646
47- run_rake_tasks! ( :cross , :native , :gem )
47+ run_rake_tasks! ( "easy_compile:setup" , :cross , :native , :gem )
48+ end
49+
50+ desc "test" , "Run the test suites of the target gem"
51+ long_desc <<~EOM
52+ EasyCompile will run the test suite of the gem. It either expects a `spec` or `test` task defined.
53+ EOM
54+ def test
55+ run_rake_tasks! ( :test )
4856 end
4957
5058 desc "copy_from_staging_to_lib" , "Copy the staging binary. For internal usage." , hide : true
5159 def copy_from_staging_to_lib
52- run_rake_tasks! ( "copy:stage:lib" )
60+ run_rake_tasks! ( "easy_compile:setup" , " copy:stage:lib")
5361 end
5462
5563 desc "clean" , "Cleanup temporary compilation artifacts."
@@ -60,7 +68,7 @@ def copy_from_staging_to_lib
6068 to cleanup by adding files to the vanilla CLEAN rake list.
6169 MSG
6270 def clean
63- run_rake_tasks! ( :clean )
71+ run_rake_tasks! ( "easy_compile:setup" , :clean )
6472 end
6573
6674 desc "clobber" , "Remove compiled binaries."
@@ -71,7 +79,7 @@ def clean
7179 to remove by adding files to the vanilla CLOBBER rake list.
7280 MSG
7381 def clobber
74- run_rake_tasks! ( :clobber )
82+ run_rake_tasks! ( "easy_compile:setup" , :clobber )
7583 end
7684
7785 desc "ci_template" , "Generate CI template files."
0 commit comments