Skip to content

Commit

Permalink
Simplify Ubuntu builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Jan 5, 2021
1 parent 2cc9016 commit 13157e2
Showing 1 changed file with 17 additions and 36 deletions.
53 changes: 17 additions & 36 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,25 @@ jobs:
strategy:
fail-fast: false
matrix:
# Default configuration corresponds to a release
# build without additional tooling, also provides
# default options for other builds
cxx:
- g++-5
- clang++-6.0
build_type: [Release]
sanitize: ['']
valgrind: [OFF]

# Below are debug builds with tooling
include:
# GCC builds
- cxx: g++-5
build_type: Debug
valgrind: ON
- cxx: g++-5
build_type: Debug
sanitize: address
- cxx: g++-5
build_type: Debug
sanitize: undefined
# Clang builds
- cxx: clang++-6.0
build_type: Debug
config:
# Release build
- build_type: Release
# Debug builds
- build_type: Debug
valgrind: ON
- cxx: clang++-6.0
build_type: Debug
- build_type: Debug
sanitize: address
- cxx: clang++-6.0
build_type: Debug
- build_type: Debug
sanitize: undefined

steps:
- uses: actions/checkout@v2

- name: Install Valgrind
if: ${{matrix.valgrind == 'ON'}}
if: ${{matrix.config.valgrind == 'ON'}}
run: sudo apt install -y valgrind

- name: Configure CMake
Expand All @@ -74,30 +55,30 @@ jobs:
CXX: ${{matrix.cxx}}
run: |
cmake -H${{github.event.repository.name}} -Bbuild \
-DCMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DSANITIZE=${{matrix.sanitize}} \
-DUSE_VALGRIND=${{matrix.valgrind}} \
-DCMAKE_CONFIGURATION_TYPES=${{matrix.config.build_type}} \
-DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
-DSANITIZE=${{matrix.config.sanitize}} \
-DUSE_VALGRIND=${{matrix.config.valgrind}} \
-G"Unix Makefiles" \
-DBUILD_EXAMPLES=ON
- name: Build the test suite
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}} -j 2
run: cmake --build . --config ${{matrix.config.build_type}} -j 2

- name: Run the test suite
if: ${{matrix.valgrind != 'ON'}}
if: ${{matrix.config.valgrind != 'ON'}}
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}}
run: ctest -C ${{matrix.config.build_type}}

- name: Run the test suite with Memcheck
if: ${{matrix.valgrind == 'ON'}}
if: ${{matrix.config.valgrind == 'ON'}}
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: |
ctest -T memcheck -C ${{matrix.build_type}} -j 2
ctest -T memcheck -C ${{matrix.config.build_type}} -j 2
find ./Testing/Temporary -name "MemoryChecker.*.log" -size +1300c | xargs cat;

0 comments on commit 13157e2

Please sign in to comment.