-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Rakefile
39 lines (29 loc) · 869 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 "bundler/gem_tasks"
require "rake/clean"
require "rake/testtask"
require "rake/extensiontask"
Rake::ExtensionTask.new("polyphony_ext") do |ext|
ext.ext_dir = "ext/polyphony"
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/polyphony/version'
version = Polyphony::VERSION
puts 'Building polyphony...'
`gem build polyphony.gemspec`
puts "Pushing polyphony #{version}..."
`gem push polyphony-#{version}.gem`
puts "Cleaning up..."
`rm *.gem`
end