Skip to content

Fix invoke_result with libc++ #735

Fix invoke_result with libc++

Fix invoke_result with libc++ #735

Workflow file for this run

# Copyright (c) 2021-2024 Morwenn
# SPDX-License-Identifier: MIT
name: Ubuntu Builds
on:
push:
paths:
- '.github/workflows/build-ubuntu.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'tests/**'
pull_request:
paths:
- '.github/workflows/build-ubuntu.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'tests/**'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
cxx:
- g++-7
- clang++-6.0
config:
# Release build
- build_type: Release
# Debug builds
- build_type: Debug
valgrind: ON
- build_type: Debug
sanitize: address
- build_type: Debug
sanitize: undefined
steps:
- uses: actions/checkout@v4
- name: Install GCC
if: ${{matrix.cxx == 'g++-7'}}
run: sudo apt-get install -y g++-7
- name: Install Clang
if: ${{matrix.cxx == 'clang++-6.0'}}
run: sudo apt-get install -y clang-6.0 lld-6.0
- name: Install Valgrind
if: ${{matrix.config.valgrind == 'ON'}}
run: sudo apt-get update && sudo apt-get install -y valgrind
- name: Configure CMake
working-directory: ${{runner.workspace}}
env:
CXX: ${{matrix.cxx}}
run: |
cmake -H${{github.event.repository.name}} -Bbuild \
-DCMAKE_CONFIGURATION_TYPES=${{matrix.config.build_type}} \
-DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
-DCPPSORT_SANITIZE=${{matrix.config.sanitize}} \
-DCPPSORT_USE_VALGRIND=${{matrix.config.valgrind}} \
-G"Unix Makefiles" \
-DCPPSORT_BUILD_EXAMPLES=ON
- name: Build the test suite
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.config.build_type}} -j 2
- name: Run the test suite
if: ${{matrix.config.valgrind != 'ON'}}
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.config.build_type}}
- name: Run the test suite with Memcheck
if: ${{matrix.config.valgrind == 'ON'}}
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: ctest -T memcheck -C ${{matrix.config.build_type}} --no-tests=error -j 2
- name: Show Valgrind logs
if: ${{failure() && matrix.config.valgrind == 'ON'}}
working-directory: ${{runner.workspace}}/build
run: find ./Testing/Temporary -name "MemoryChecker.*.log" -size +1300c | xargs cat