-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
47 lines (35 loc) · 1.07 KB
/
Rakefile
File metadata and controls
47 lines (35 loc) · 1.07 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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/clean"
require "rake/testtask"
require "rake/extensiontask"
Rake::ExtensionTask.new("um_ext") do |ext|
ext.ext_dir = "ext/um"
end
task :recompile => [:clean, :compile]
task :default => [:compile, :test]
test_config = -> (t) {
t.libs << "test"
t.test_files = FileList["test/**/test_*.rb"]
}
Rake::TestTask.new(test: :compile, &test_config)
task :stress_test do
exec 'ruby test/stress.rb'
end
CLEAN.include "**/*.o", "**/*.so", "**/*.so.*", "**/*.a", "**/*.bundle", "**/*.jar", "pkg", "tmp"
task :release do
require_relative './lib/uringmachine/version'
version = UringMachine::VERSION
puts 'Building uringmachine...'
`gem build uringmachine.gemspec`
puts "Pushing uringmachine #{version}..."
`gem push uringmachine-#{version}.gem`
puts "Cleaning up..."
`rm *.gem`
end
require 'yard'
YARD_FILES = FileList['ext/um/*.c', 'lib/uringmachine.rb', 'lib/uringmachine/**/*.rb']
YARD::Rake::YardocTask.new do |t|
t.files = YARD_FILES
t.options = %w( --verbose -o yard --readme README.md)
end