-
Notifications
You must be signed in to change notification settings - Fork 16
65 lines (59 loc) · 1.76 KB
/
memcheck.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
name: Memcheck
on:
workflow_dispatch:
inputs:
ruby-version:
description: "Ruby version to memcheck"
required: true
default: "3.3"
type: choice
options:
- "head"
- "3.3"
- "3.2"
- "3.1"
- "3.0"
debug:
description: "Enable debug mode"
required: false
default: "false"
type: boolean
push:
branches: ["*"]
tags-ignore: ["v*"] # Skip Memcheck for releases
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
memcheck:
name: Memcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ inputs.ruby-version || '3.3' }}
bundler-cache: true
cargo-cache: true
cache-version: v2
- name: Install deps
run: |
bundle config unset deployment
bundle add ruby_memcheck --version '~> 1.3.1' # avoid usage in Gemfile bc it pulls in nokogiri
sudo apt-get update
sudo apt-get install -y valgrind
bundle config set deployment true
- name: Run "mem:check" task
env:
RSPEC_FORMATTER: "progress"
RSPEC_FAILURE_EXIT_CODE: "0"
GC_AT_EXIT: "1"
DEBUG: ${{ inputs.debug || 'false' }}
RB_SYS_CARGO_PROFILE: ${{ inputs.debug == 'true' && 'dev' || 'release' }}
WASMTIME_TARGET: "x86_64-unknown-linux-gnu" # use generic target for memcheck
run: |
if ! bundle exec rake mem:check; then
echo "::error::Valgrind memory check failed, for more info please see ./suppressions/readme.md"
exit 1
fi