-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
39 lines (32 loc) · 804 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
# frozen_string_literal: true
require "rake/testtask"
require "rake/extensiontask"
task default: :test
spec = Bundler.load_gemspec("halton.gemspec")
spec.requirements.clear
spec.required_ruby_version = nil
spec.required_rubygems_version = nil
spec.extensions.clear
spec.files -= Dir["ext/**/*"]
Rake::ExtensionTask.new("halton", spec) do |c|
c.lib_dir = "lib/halton"
c.cross_compile = true
c.cross_platform = [
"aarch64-linux",
"arm64-darwin",
"x64-mingw-ucrt",
"x64-mingw32",
"x86_64-darwin",
"x86_64-linux",
"x86_64-linux-musl"]
end
task :dev do
ENV["RB_SYS_CARGO_PROFILE"] = "dev"
end
Rake::TestTask.new do |t|
t.deps << :compile
t.test_files = FileList[File.expand_path("test/*_test.rb", __dir__)]
end
task bench: :compile do
ruby "test/bench.rb"
end