Merge pull request #792 from laurynas-biveinis/benchmark-v1.9.3 #375
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: examples | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| BUILD_TYPE: ${{matrix.BUILD_TYPE}} | |
| TESTS: ${{matrix.TESTS}} | |
| BENCHMARKS: ${{matrix.BENCHMARKS}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| BUILD_TYPE: [Release, Debug] | |
| TESTS: [ON, OFF] | |
| BENCHMARKS: [ON, OFF] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Setup dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libboost-dev libc6-dev-i386 libc6-dbg \ | |
| libgtest-dev libgmock-dev libbenchmark-dev | |
| # Install a newer version than the one in APT | |
| sudo snap install --classic valgrind | |
| - name: Configure CMake | |
| # Use a bash shell so we can use the same syntax for environment | |
| # variable access regardless of the host operating system | |
| shell: bash | |
| run: | | |
| cmake -B build "$GITHUB_WORKSPACE/examples" \ | |
| "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DTESTS=$TESTS" \ | |
| "-DBENCHMARKS=$BENCHMARKS" | |
| - name: Examples | |
| working-directory: ${{github.workspace}}/build | |
| run: make -j3 -k examples | |
| - name: Valgrind examples | |
| working-directory: ${{github.workspace}}/build | |
| run: make -j3 -k valgrind_examples |