Enables rapidcheck extras for gmock and gtest #45
This file contains 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: Run Demo | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all | |
# matrix combinations. Consider changing this to true when your workflow | |
# is stable. | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
build_type: [Debug, Release] | |
algorithm: [--standard, --transposition, --merge-and-split] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache lib6-dev | |
uses: actions/cache@v4 | |
id: cache-libc6-dbg | |
with: | |
path: "~/libc6-dbg" | |
key: liblevenshtein-demo-libc6-dbg-${{ runner.os }} | |
- name: Install libc6-dbg | |
env: | |
CACHE_HIT: ${{steps.cache-libc6-dbg.outputs.cache-hit}} | |
run: | | |
if [[ "$CACHE_HIT" == 'true' ]]; then | |
sudo cp --verbose --force --recursive ~/libc6-dbg/* / | |
else | |
sudo apt-get update | |
sudo apt-get install --yes libc6-dbg | |
mkdir -p ~/libc6-dbg | |
sudo dpkg -L libc6-dbg | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/libc6-dbg/ | |
fi | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-activate-base: false | |
environment-file: environment-demo.yml | |
activate-environment: ll-cpp-demo | |
miniforge-version: latest | |
use-mamba: true | |
channels: conda-forge | |
- name: Configure liblevenshtein-cpp | |
shell: bash -el {0} | |
run: > | |
cmake -B build | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX | |
- name: Build liblevenshtein-cpp | |
shell: bash -el {0} | |
run: cmake --build build --config ${{ matrix.build_type }} | |
- name: Install liblevenshtein-cpp | |
shell: bash -el {0} | |
run: cmake --install build --config ${{ matrix.build_type }} | |
- name: Configure liblevenshtein-demo | |
working-directory: example | |
shell: bash -el {0} | |
run: > | |
cmake -B build | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX | |
- name: Build liblevenshtein-demo | |
working-directory: example | |
shell: bash -el {0} | |
run: cmake --build build --config ${{ matrix.build_type }} | |
- name: Run liblevenshtein-demo | |
working-directory: example | |
shell: bash -el {0} | |
run: > | |
./scripts/run-demo.exp ./build/liblevenshtein-demo | |
--dictionary-path resources/programming-languages.txt | |
--serialization-path build/programming-languages.pb | |
${{ matrix.algorithm }} |