-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
42 lines (34 loc) · 969 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require "rake/extensiontask"
require "rake/testtask"
require "rdoc/task"
require "rubygems/package_task"
load "ruby-zstds.gemspec"
Rake::ExtensionTask.new do |ext|
ext.name = "zstds_ext"
ext.ext_dir = "ext"
ext.lib_dir = "lib"
ext.tmp_dir = "tmp"
ext.source_pattern = "*.{c,h}"
if File.directory? "/opt/homebrew"
ext.config_options << "--with-opt-include=/opt/homebrew/include"
ext.config_options << "--with-opt-lib=/opt/homebrew/lib"
end
end
Rake::TestTask.new do |task|
task.libs << %w[lib]
pathes = `find test | grep "\.test\.rb$"`
task.test_files = ["test/coverage_helper.rb"] + pathes.split("\n")
end
RDoc::Task.new do |rdoc|
rdoc.title = "Ruby ZSTDS rdoc"
rdoc.main = "README.md"
rdoc.rdoc_dir = "docs"
rdoc.rdoc_files.include(
"lib/**/*.rb",
"AUTHORS",
"LICENSE",
"README.md"
)
end
task :default => %i[compile test]
Gem::PackageTask.new(GEMSPEC).define