generated from sakuro/gem-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
52 lines (38 loc) · 1.19 KB
/
Rakefile
File metadata and controls
52 lines (38 loc) · 1.19 KB
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
43
44
45
46
47
48
49
50
51
52
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/clean"
CLEAN.include("coverage", ".rspec_status", ".yardoc")
CLOBBER.include("doc/api", "pkg", "lib/**/*.bundle", "lib/**/*.so", "lib/**/*.dll", "spec/fixtures/*.postcard")
require "rb_sys/extensiontask"
gemspec = Gem::Specification.load("icu4x.gemspec")
RbSys::ExtensionTask.new("icu4x", gemspec) do |ext|
ext.lib_dir = "lib/icu4x"
ext.cross_compile = true
ext.cross_platform = %w[
x86_64-linux
aarch64-linux
x86_64-darwin
arm64-darwin
x64-mingw-ucrt
]
end
# Development tasks are not needed during cross-compilation (RUBY_TARGET is set by rb-sys-dock)
unless ENV["RUBY_TARGET"]
require "rubocop/rake_task"
RuboCop::RakeTask.new
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
require "icu4x/data_gem_task"
require "icu4x/rake_task"
TEST_BLOB = "spec/fixtures/test-data.postcard"
ICU4X::RakeTask.new do |t|
t.locales = %w[en ja ru ar de]
t.output = TEST_BLOB
end
ICU4X::DataGemTask.new
Rake::Task[TEST_BLOB].enhance([:compile])
Rake::Task[:spec].enhance([TEST_BLOB])
require "yard"
YARD::Rake::YardocTask.new(:doc)
task default: %i[spec rubocop]
end