Skip to content

PKG: Restructure headers into base and extension #259

PKG: Restructure headers into base and extension

PKG: Restructure headers into base and extension #259

Workflow file for this run

name: Valgrind Tests
on:
pull_request:
branches:
- stable
- unstable
push:
branches:
- unstable
defaults:
run:
shell: bash
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: 'true'
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
valgrind:
name: "Valgrind"
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: "Default settings",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc-9",
cxx: "g++-9",
generators: "Ninja",
target: "all",
options: ""
}
- {
name: "Hard steal",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc-9",
cxx: "g++-9",
generators: "Ninja",
target: "all",
options: "-DENABLE_CARMA_HARD_STEAL=ON"
}
- {
name: "Soft steal",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc-9",
cxx: "g++-9",
generators: "Ninja",
target: "all",
options: "-DENABLE_CARMA_HARD_STEAL=ON"
}
- {
name: "Not own data",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc-9",
cxx: "g++-9",
generators: "Ninja",
target: "all",
options: "-DENABLE_CARMA_DONT_REQUIRE_OWNDATA=ON"
}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on ubuntu
run: |
python -m pip install --upgrade cmake
sudo apt install -y valgrind
ninja --version
cmake --version
- name: Install python pacakges
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy pytest pytest-valgrind
- name: Configure
run: |
mkdir build
cd build
export PY_CMD=$(python -c 'import sys; print(sys.executable)')
cmake \
${{ matrix.config.options }} \
-DCARMA_BUILD_TESTS=ON \
-DVALGRIND_TEST_WRAPPER=ON \
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_INSTALL_PREFIX:PATH=. \
-DPython3_EXECUTABLE=${PY_CMD} \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
..
- name: Build
run: |
cd build
cmake \
--build . \
--target ${{ matrix.config.target }} \
--config ${{ matrix.config.build_type }}
- name: Test
run: |
cd build
ctest \
--verbose --rerun-failed --output-on-failure \
-C ${{ matrix.config.build_type }}