Skip to content

Commit

Permalink
Test Valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Mar 13, 2024
1 parent 0a806f7 commit db45ff2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ jobs:
ruby-version: 3.3
bundler-cache: true
- run: MAKE="make -j$(nproc)" bundle exec rake compile
- run: bundle exec rake test
- run: sudo apt-get update && sudo apt-get install valgrind
- run: bundle exec rake test:valgrind
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ gem "rake"
gem "rake-compiler"
gem "rake-compiler-dock"
gem "minitest", ">= 5"
gem "ruby_memcheck"
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
require "bundler/gem_tasks"
require "rake/testtask"
require "rake/extensiontask"
require "ruby_memcheck"

task default: :test
Rake::TestTask.new do |t|
test_config = lambda do |t|
t.libs << "test"
t.pattern = "test/**/*_test.rb"
end
Rake::TestTask.new(:test, &test_config)

namespace :test do
RubyMemcheck::TestTask.new(:valgrind, &test_config)
end

ENV["RUBY_CC_VERSION"] = "3.3.0:3.2.0:3.1.0:3.0.0"
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.15"
Expand Down

0 comments on commit db45ff2

Please sign in to comment.