Skip to content

Commit

Permalink
Use a matrix for nightly valgrind (Take 6)
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 31, 2024
1 parent 1ebb34d commit 315f5d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
cxxflags: "-Os"
# GCC with -Os generates a much slower binary, that won't finish
# before timing out on GH Actions, so we run a reduced set of tests.
target: "valgrind-ct-reduced"
target: "valgrind-ct"

runs-on: ubuntu-24.04

Expand All @@ -193,7 +193,7 @@ jobs:
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: valgrind-full
target: ${{ matrix.target }}
cache-key: linux-x86_64-${ matrix.compiler }-${{ matrix.target }}-${{ env.CACHE_KEY_HASH }}

- name: Valgrind Checks
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/ci/setup_gh_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if type -p "apt-get"; then
sudo apt-get -qq update
sudo apt-get -qq install ccache libbz2-dev liblzma-dev libsqlite3-dev

if [ "$TARGET" = "valgrind" ] || [ "$TARGET" = "valgrind-full" ]; then
if [ "$TARGET" = "valgrind" ] || [ "$TARGET" = "valgrind-full" ] || [ "$TARGET" = "valgrind-ct-full" ] || [ "$TARGET" = "valgrind-ct" ]; then
# (l)ist mode (avoiding https://github.com/actions/runner-images/issues/9996)
sudo NEEDRESTART_MODE=l apt-get -qq install valgrind
build_and_install_jitterentropy
Expand Down
12 changes: 7 additions & 5 deletions src/scripts/ci_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def known_targets():
'static',
'valgrind',
'valgrind-full',
'valgrind-ct',
'valgrind-ct-full',
]

def is_running_in_github_actions():
Expand Down Expand Up @@ -123,7 +125,7 @@ def build_targets(target, target_os):
yield 'bogo_shim'
if target in ['examples', 'amalgamation']:
yield 'examples'
if target in ['valgrind', 'valgrind-full']:
if target in ['valgrind', 'valgrind-full', 'valgrind-ct', 'valgrind-ct-full']:
yield 'ct_selftest'

def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache,
Expand Down Expand Up @@ -252,7 +254,7 @@ def sanitize_kv(some_string):
if target in ['sde']:
test_prefix = ['sde', '-future', '--']

if target in ['valgrind', 'valgrind-full']:
if target in ['valgrind', 'valgrind-full', 'valgrind-ct', 'valgrind-ct-full']:
flags += ['--with-valgrind']

test_prefix = ['valgrind',
Expand All @@ -268,7 +270,7 @@ def sanitize_kv(some_string):
# valgrind is single threaded anyway
test_cmd += ['--test-threads=1']

if target != 'valgrind-full':
if target not in ['valgrind-full', 'valgrind-ct-full']:
# valgrind is slow, so some tests only run in the nightly check
slow_tests = [
'argon2', 'bcrypt', 'bcrypt_pbkdf', 'compression_tests', 'cryptobox',
Expand Down Expand Up @@ -306,7 +308,7 @@ def sanitize_kv(some_string):
else:
flags += ['--enable-sanitizers=address']

if target in ['valgrind', 'valgrind-full', 'sanitizer', 'fuzzers']:
if target in ['valgrind', 'valgrind-full', 'valgrind-ct', 'valgrind-ct-full', 'sanitizer', 'fuzzers']:
flags += ['--disable-modules=locking_allocator']

if target == 'emscripten':
Expand Down Expand Up @@ -816,7 +818,7 @@ def main(args=None):
if target in ['examples', 'amalgamation']:
make_targets += ['examples']

if target in ['valgrind', 'valgrind-full']:
if target in ['valgrind', 'valgrind-full', 'valgrind-ct', 'valgrind-ct-full']:
make_targets += ['ct_selftest']

if target in ['coverage', 'sanitizer'] and options.os not in ['windows']:
Expand Down

0 comments on commit 315f5d7

Please sign in to comment.