Skip to content

Commit

Permalink
Added memcheck to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Nov 11, 2024
1 parent 60cbe31 commit a659606
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
include:
- ruby: 3.3
os: ubuntu-24.04
- ruby: 3.2
os: ubuntu-22.04
- ruby: 3.1
os: ubuntu-20.04
- ruby: 3.2
os: macos-14
- ruby: 3.1
os: macos-13
# - ruby: 3.2
# os: ubuntu-22.04
# - ruby: 3.1
# os: ubuntu-20.04
# - ruby: 3.2
# os: macos-14
# - ruby: 3.1
# os: macos-13
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand All @@ -25,3 +25,8 @@ jobs:
bundler-cache: true
- run: bundle exec rake compile
- run: bundle exec rake test

- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update && sudo apt-get install valgrind
bundle exec rake test:valgrind
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ gemspec
gem "rake"
gem "rake-compiler"
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

Rake::ExtensionTask.new("or-tools") do |ext|
ext.name = "ext"
Expand Down

0 comments on commit a659606

Please sign in to comment.