Sha256: 0c891bea694999efdac4799dc61fd3af2ea7587c335e4441869cef605a3abc6b

Contents?: true

Size: 855 Bytes

Versions: 6

Compression:

Stored size: 855 Bytes

Contents

# frozen_string_literal: true

require "rbconfig"
require "bundler/gem_tasks"
require "rake/testtask"

# Mac OS with rbenv users keep leaving behind build artifacts from
#   when they tried to build against a statically linked Ruby and then
#   try against a dynamically linked one causing errors in the build result.
desc "Preventative work"
task :tidy_up do
  sh "cargo clean"
end

desc "Build Rust extension"
task :build_lib do
  sh "cargo build --release"
end

desc "bundle install"
task :bundle_install do
  sh "bundle install"
end

Rake::TestTask.new(test: %i[]) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/*_test.rb"]
end

Rake::TestTask.new(test_clean: %i[tidy_up bundle_install build_lib]) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/*_test.rb"]
end

task default: :build_lib

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cranelift_ruby-0.1.6 Rakefile
cranelift_ruby-0.1.5 Rakefile
cranelift_ruby-0.1.4 Rakefile
cranelift_ruby-0.1.3 Rakefile
cranelift_ruby-0.1.2 Rakefile
cranelift_ruby-0.1.1 Rakefile