Skip to content

Refactor testing workflow, add sanitizer and valgrind workflow, fix sanitizer and valgrind reports #36

Refactor testing workflow, add sanitizer and valgrind workflow, fix sanitizer and valgrind reports

Refactor testing workflow, add sanitizer and valgrind workflow, fix sanitizer and valgrind reports #36

Workflow file for this run

name: testing
on:
workflow_dispatch:
pull_request:
push:
branches: [ "master" ]
tags: [ "*" ]
jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
runs-on:
- ubuntu-20.04
- ubuntu-22.04
- macos-11
- macos-12
mode:
- Debug
- Release
test-ssl:
- Disabled
sanitizers:
- Enabled
- Disabled
valgrind:
- Enabled
- Disabled
exclude:
- sanitizers: Enabled
valgrind: Enabled
- runs-on: macos-11
valgrind: Enabled
- runs-on: macos-12
valgrind: Enabled
runs-on: ${{ matrix.runs-on }}
name: ${{ matrix.runs-on }} \
(${{ matrix.mode }},
Sanitizers ${{ matrix.sanitizers }}, \
Valgrind ${{ matrix.valgrind }}, \
${{ matrix.test-ssl }} ssl test)
steps:
- name: Clone the connector
uses: actions/checkout@v3
- name: Setup tarantool 2.11
if: startsWith(matrix.runs-on, 'ubuntu')
uses: tarantool/setup-tarantool@v1
with:
tarantool-version: '2.11'
- name: Setup stable tarantool from brew
if: startsWith(matrix.runs-on, 'macos')
run: brew install tarantool
- name: Install valgrind
if: matrix.valgrind == 'Enabled'
run: sudo apt install valgrind
- name: build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DTNTCXX_BUILD_TESTING=ON -DTNTCXX_ENABLE_SANITIZERS=${{ matrix.sanitizers == 'Enabled' }} -DTNTCXX_ENABLE_SSL=ON ..
make -j
- name: test
run: |
cd build
ctest \
${{ matrix.valgrind == 'Enabled' && '-T memcheck' || '' }} \
--output-on-failure \
-E ${{ matrix.test-ssl == 'Disabled' && 'ClientSSL.test' || ''}}