-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
35 lines (26 loc) · 794 Bytes
/
Rakefile
File metadata and controls
35 lines (26 loc) · 794 Bytes
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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
require "yard"
YARD::Rake::YardocTask.new do |t|
t.files = ["lib/**/*.rb", "ext/**/*.c"]
end
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/test_*.rb"]
end
require "rake/extensiontask"
task build: :compile
Rake::ExtensionTask.new("roaring") do |ext|
ext.lib_dir = "lib/roaring"
end
desc "Update vendored CRoaring library"
task :update_roaring do
rm_rf "tmp/CRoaring"
sh "git clone --depth=1 https://github.com/RoaringBitmap/CRoaring tmp/CRoaring"
sh "cd tmp/CRoaring && sh amalgamation.sh"
cp "tmp/CRoaring/roaring.c", "ext/roaring/roaring.c"
cp "tmp/CRoaring/roaring.h", "ext/roaring/roaring.h"
end
task default: %i[compile test]